Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor changes after deployment #3426

Merged
merged 9 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/qiita-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,7 @@ jobs:
- name: Install plugins
shell: bash -l {0}
run: |
wget https://data.qiime2.org/distro/core/qiime2-2022.11-py38-linux-conda.yml
conda env create --quiet -n qtp-biom --file qiime2-2022.11-py38-linux-conda.yml
rm qiime2-2022.11-py38-linux-conda.yml
conda env create -n qtp-biom --file https://data.qiime2.org/distro/amplicon/qiime2-amplicon-2024.5-py39-linux-conda.yml
export QIITA_ROOTCA_CERT=`pwd`/qiita_core/support_files/ci_rootca.crt
export QIITA_CONFIG_FP=`pwd`/qiita_core/support_files/config_test.cfg
export REDBIOM_HOST="http://localhost:7379"
Expand Down
45 changes: 28 additions & 17 deletions qiita_db/artifact.py
Original file line number Diff line number Diff line change
Expand Up @@ -1342,23 +1342,6 @@ def _helper(sql_edges, edges, nodes):
# If the job is in success we don't need to do anything
# else since it would've been added by the code above
if jstatus != 'success':
# Connect the job with his input artifacts, the
# input artifacts may or may not exist yet, so we
# need to check both the input_artifacts and the
# pending properties
for in_art in n_obj.input_artifacts:
iid = in_art.id
if iid not in nodes and iid in extra_nodes:
nodes[iid] = extra_nodes[iid]
_add_edge(edges, nodes[iid], nodes[n_obj.id])

pending = n_obj.pending
for pred_id in pending:
for pname in pending[pred_id]:
in_node_id = '%s:%s' % (
pred_id, pending[pred_id][pname])
_add_edge(edges, nodes[in_node_id],
nodes[n_obj.id])

if jstatus != 'error':
# If the job is not errored, we can add the
Expand All @@ -1380,6 +1363,34 @@ def _helper(sql_edges, edges, nodes):
queue.append(cjob.id)
if cjob.id not in nodes:
nodes[cjob.id] = ('job', cjob)

# including the outputs
for o_name, o_type in cjob.command.outputs:
node_id = '%s:%s' % (cjob.id, o_name)
node = TypeNode(
id=node_id, job_id=cjob.id,
name=o_name, type=o_type)
if node_id not in nodes:
nodes[node_id] = ('type', node)

# Connect the job with his input artifacts, the
# input artifacts may or may not exist yet, so we
# need to check both the input_artifacts and the
# pending properties
for in_art in n_obj.input_artifacts:
iid = in_art.id
if iid not in nodes and iid in extra_nodes:
nodes[iid] = extra_nodes[iid]
_add_edge(edges, nodes[iid], nodes[n_obj.id])

pending = n_obj.pending
for pred_id in pending:
for pname in pending[pred_id]:
in_node_id = '%s:%s' % (
pred_id, pending[pred_id][pname])
_add_edge(edges, nodes[in_node_id],
nodes[n_obj.id])

elif n_type == 'type':
# Connect this 'future artifact' with the job that will
# generate it
Expand Down
3 changes: 2 additions & 1 deletion qiita_db/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -2775,7 +2775,7 @@ def update_resource_allocation_table(weeks=1, test=None):
sacct = [
'sacct', '-p',
'--format=JobID,ElapsedRaw,MaxRSS,Submit,Start,End,CPUTimeRAW,'
'ReqMem,AllocCPUs,AveVMSize', '--starttime',
'ReqMem,AllocCPUs,AveVMSize,MaxVMSizeNode', '--starttime',
dates[0].strftime('%Y-%m-%d'), '--endtime',
dates[1].strftime('%Y-%m-%d'), '--user', 'qiita', '--state', 'CD']

Expand Down Expand Up @@ -2894,6 +2894,7 @@ def merge_rows(rows):
df['MaxRSSRaw'] = df.MaxRSS.apply(lambda x: MaxRSS_helper(str(x)))
df['ElapsedRawTime'] = df.ElapsedRaw.apply(
lambda x: timedelta(seconds=float(x)))
df.replace({np.nan: None}, inplace=True)

for index, row in df.iterrows():
with qdb.sql_connection.TRN:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
install_requires=['psycopg2', 'click', 'bcrypt', 'pandas<2.0',
'biom-format', 'tornado<6.0', 'toredis', 'redis',
'scp', 'pyparsing', 'h5py', 'natsort', 'nose', 'pep8',
'networkx', 'humanize', 'wtforms<3.0.0', 'nltk',
'networkx', 'humanize', 'wtforms<3.0.0', 'nltk<=3.8.1',
'openpyxl', 'sphinx-bootstrap-theme', 'Sphinx<3.0',
'gitpython', 'redbiom', 'pyzmq', 'sphinx_rtd_theme',
'paramiko', 'seaborn', 'matplotlib', 'scipy<=1.10.1',
Expand Down
Loading