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

Analysis refactor gui part6 #2116

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
3601c29
fix #1505
antgonza Jan 2, 2017
0d6788e
improving some GUI stuff
antgonza Jan 3, 2017
12406cc
improving some GUI stuff - missing lines
antgonza Jan 3, 2017
958fcbe
pull upstream master
antgonza Jan 4, 2017
a57ef23
addressing all comments
antgonza Jan 5, 2017
2ead7a6
ready for review
antgonza Jan 5, 2017
73a78e7
fix #1987
antgonza Jan 16, 2017
e64a22a
Merge pull request #2036 from antgonza/fix-1505
josenavas Jan 16, 2017
0dcae8b
Merge pull request #2047 from antgonza/fix-1987
josenavas Jan 17, 2017
4a5bbbc
initial commit
antgonza Jan 18, 2017
f99975c
requested changes
antgonza Jan 18, 2017
ed899a8
Merge pull request #2049 from antgonza/add-processing-suggestions
josenavas Jan 18, 2017
d508320
fix filter job list
antgonza Jan 18, 2017
025cc1e
Merge pull request #2050 from antgonza/fix-filter-job-list
josenavas Jan 18, 2017
599bcde
Fixing server cert (#2051)
josenavas Jan 19, 2017
d12ccfe
fix get_studies
antgonza Jan 20, 2017
b33983b
flake8
antgonza Jan 20, 2017
b4f1b1f
fix #503
antgonza Jan 20, 2017
62a1b93
fix #2010
antgonza Jan 20, 2017
2e36141
fix #1913
antgonza Jan 21, 2017
e006e20
fix errors
antgonza Jan 21, 2017
c174693
Merge pull request #2052 from antgonza/fix-get_studies
josenavas Jan 23, 2017
131dd6a
Merge pull request #2053 from antgonza/fix-by-blinking
josenavas Jan 23, 2017
ccb55bd
addressing @josenavas comment
antgonza Jan 24, 2017
dfe2e83
flake8
antgonza Jan 24, 2017
15fcceb
Merge pull request #2056 from antgonza/fix-1913
josenavas Jan 24, 2017
7f97f2a
fix #1010
antgonza Jan 26, 2017
9eb9dbb
fix #1066 (#2058)
antgonza Jan 26, 2017
23104d7
addressing @josenavas comments
antgonza Jan 27, 2017
1f1e826
fix #1961
antgonza Jan 27, 2017
19a9dda
fix #1837
antgonza Jan 27, 2017
19889f9
Automatic jobs & new stats (#2057)
antgonza Jan 27, 2017
4e380e0
Merge pull request #2060 from antgonza/fix-1961
wasade Jan 28, 2017
6f0dd71
generalizing this functionality
antgonza Jan 28, 2017
ed9fc65
fix #1816
antgonza Jan 29, 2017
4b19b45
fix #1959
antgonza Jan 30, 2017
d9b41e8
addressing @josenavas comments
antgonza Feb 1, 2017
5ef06ae
addressing @josenavas comments
antgonza Feb 2, 2017
5e3504a
fixing error
antgonza Feb 2, 2017
d10096a
Merge branch 'master' of https://github.com/biocore/qiita into fix-1010
antgonza Feb 2, 2017
661342f
fixed?
antgonza Feb 2, 2017
fcd249b
addressing @josenavas comments
antgonza Feb 3, 2017
f3c1216
Merge pull request #2063 from antgonza/fix-1816
josenavas Feb 3, 2017
a91a6fd
Merge pull request #2064 from antgonza/fix-1959
tanaes Feb 3, 2017
7b9fa6f
addressing @wasade comments
antgonza Feb 3, 2017
33bcbe5
Merge pull request #2059 from antgonza/fix-1010
josenavas Feb 3, 2017
5e4bd9b
Merge branch 'master' of https://github.com/biocore/qiita into fix-1837
antgonza Feb 3, 2017
8bf3d6e
fix flake8
antgonza Feb 3, 2017
7807bac
Merge pull request #2061 from antgonza/fix-1837
josenavas Feb 3, 2017
6360675
generate biom and metadata release (#2066)
antgonza Feb 3, 2017
811b7a7
database changes to fix 969
antgonza Feb 3, 2017
751d4ad
adding delete
antgonza Feb 3, 2017
65a86df
addressing @josenavas comments
antgonza Feb 3, 2017
b1817dd
addressing @ElDeveloper comments
antgonza Feb 4, 2017
18d77e1
duh!
antgonza Feb 4, 2017
01c656c
Merge pull request #2071 from antgonza/fix-969-db
josenavas Feb 6, 2017
53188a6
fix generate_biom_and_metadata_release (#2072)
antgonza Feb 7, 2017
1ab4e3b
Fixing merge conflicts with master
josenavas Feb 8, 2017
1e8332e
Merge branch 'analysis-refactor' of https://github.com/biocore/qiita …
josenavas Feb 9, 2017
cb67d3d
Removing qiita ware code that will not be used anymore
josenavas Feb 9, 2017
5a5127d
Merge branch 'analysis-refactor' of https://github.com/biocore/qiita …
josenavas Feb 9, 2017
0033480
Organizing the handlers and new analysis description page
josenavas Feb 9, 2017
3e3f6e1
fixing timestamp
antgonza Feb 9, 2017
6a20c1b
rm formats
antgonza Feb 9, 2017
a1b3c90
st -> pt
antgonza Feb 9, 2017
3809ad5
Connecting the analysis creation and making interface responsive
josenavas Feb 9, 2017
067f14f
Addressing @antgonza's comments
josenavas Feb 10, 2017
cf4862d
Solving merge conflicts
josenavas Feb 10, 2017
3b07151
Initial artifact GUI refactor
josenavas Feb 10, 2017
a6595a9
Removing unused code
josenavas Feb 10, 2017
6343b49
Merge branch 'analysis-refactor-gui-part2' into analysis-refactor-gui…
josenavas Feb 10, 2017
a3505c2
moving to ISO 8601 - wow :'(
antgonza Feb 13, 2017
c8113ea
fix errors
antgonza Feb 13, 2017
f4835d5
addressing @wasade comments
antgonza Feb 13, 2017
f731768
Adding can_edit call to the analysis
josenavas Feb 14, 2017
7542658
Fixing artifact rest API since not all artifacts have study
josenavas Feb 14, 2017
e0180e8
Adding can_be_publicized call to analysis
josenavas Feb 15, 2017
f55ca5c
Adding QiitaHTTPError to handle errors gracefully
josenavas Feb 15, 2017
1fa4b19
Adding safe_execution contextmanager
josenavas Feb 15, 2017
b61ae87
Fixing typo
josenavas Feb 15, 2017
bb68303
Adding qiita test checker
josenavas Feb 15, 2017
b31a025
Adapting some artifact handlers
josenavas Feb 15, 2017
378d7ff
Fixing merge conflicts
josenavas Feb 15, 2017
444da08
Merge branch 'analysis-refactor-gui-part2' into analysis-refactor-gui…
josenavas Feb 15, 2017
f6b4c46
Abstracting the graph reloading and adding some documentation
josenavas Feb 15, 2017
e9d3af3
Fixing typo
josenavas Feb 15, 2017
69b6412
Merge branch 'analysis-refactor-gui-part3' into analysis-refactor-gui…
josenavas Feb 15, 2017
60cd430
Fixing changing artifact visibility
josenavas Feb 15, 2017
be099cb
Fixing delete
josenavas Feb 15, 2017
819e9a5
Fixing artifact deletion
josenavas Feb 15, 2017
e941fa7
Adding default parameters to the commands
josenavas Feb 15, 2017
d6ebcb4
Fixing processing page
josenavas Feb 15, 2017
6ada2ba
Fixing variable name
josenavas Feb 15, 2017
7d70a38
fixing private/public studies
antgonza Feb 15, 2017
e8ca9db
Changing bdiv metrics to single choice
josenavas Feb 15, 2017
4bf4808
Merge pull request #2080 from antgonza/fix-private_public-stats-page
josenavas Feb 15, 2017
aa68a21
Merge pull request #2075 from antgonza/fix-timestamp
wasade Feb 15, 2017
0c6ffa7
sanbox-to-sandbox
antgonza Feb 15, 2017
586660b
flake8
antgonza Feb 15, 2017
6cdc574
Fixing patch
josenavas Feb 15, 2017
7bae13e
fixing other issues
antgonza Feb 16, 2017
cf801a4
Merge pull request #2082 from antgonza/sanbox-to-sandbox
josenavas Feb 16, 2017
7c2454e
adding share documentation
antgonza Mar 3, 2017
c2eb6ae
psycopg2 <= 2.7
antgonza Mar 3, 2017
aeeac62
psycopg2 < 2.7
antgonza Mar 3, 2017
2795046
Merge pull request #2085 from antgonza/sharing-help
josenavas Mar 3, 2017
a77b040
Various small fixes to be able to run tests on the plugins
josenavas Mar 15, 2017
ff9eda9
Merging with master
josenavas Mar 15, 2017
85d4aa7
Solving merge conflicts
josenavas Apr 24, 2017
1ffa231
Solving merge conflicts
josenavas Apr 24, 2017
9e14cc6
Merge branch 'analysis-refactor-gui-part5' into analysis-refactor-gui…
josenavas Apr 24, 2017
a3d7c88
Solving merge conflicts
josenavas Apr 25, 2017
c5bd291
Solving merge conflicts
josenavas Apr 25, 2017
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
1 change: 1 addition & 0 deletions qiita_core/tests/test_configuration_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ def test_get_portal(self):
obs._get_portal(self.conf)
self.assertEqual(obs.portal_dir, "/gold_portal")


CONF = """
# ------------------------------ Main settings --------------------------------
[main]
Expand Down
1 change: 1 addition & 0 deletions qiita_core/tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,6 @@ def test_get_qiita_version(self):
# testing just the version
self.assertEqual(exp_version, qdb.__version__)


if __name__ == '__main__':
main()
1 change: 1 addition & 0 deletions qiita_db/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,5 @@ class QiitaDBWarning(UserWarning):
"""Warning specific for the QiitaDB domain"""
pass


warnings.simplefilter('always', QiitaDBWarning)
1 change: 1 addition & 0 deletions qiita_db/handlers/tests/test_artifact.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,5 +239,6 @@ def test_post(self):
data=data)
self.assertEqual(obs.code, 200)


if __name__ == '__main__':
main()
1 change: 1 addition & 0 deletions qiita_db/handlers/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ def test_post(self):
self.assertEqual(obs.code, 200)
self.assertFalse(qdb.user.User.exists('new_user@test.foo'))


if __name__ == '__main__':
main()
1 change: 1 addition & 0 deletions qiita_db/handlers/tests/test_oauth2.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,5 +294,6 @@ def test_authenticate_password_missing_info(self):
'error_description': 'Oauth2 error: missing user information'}
self.assertEqual(obs_body, exp)


if __name__ == "__main__":
main()
1 change: 1 addition & 0 deletions qiita_db/handlers/tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,5 +197,6 @@ def test_post(self):
data={})
self.assertEqual(obs.code, 200)


if __name__ == '__main__':
main()
20 changes: 12 additions & 8 deletions qiita_db/handlers/tests/test_prep_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,18 @@ def test_get(self):
path_builder = partial(join, db_test_template_dir)

obs = loads(obs.body)
exp = {'data_type': '18S',
'artifact': 1,
'investigation_type': 'Metagenomics',
'study': 1,
'status': 'private',
'qiime-map': path_builder('1_prep_1_qiime_19700101-000000.txt'),
'prep-file': path_builder('1_prep_1_19700101-000000.txt')}
self.assertEqual(obs, exp)

# have to check per key because since patch 51 we are updating the
# test info files
self.assertEqual(obs['data_type'], '18S')
self.assertEqual(obs['artifact'], 1)
self.assertEqual(obs['investigation_type'], 'Metagenomics')
self.assertEqual(obs['study'], 1)
self.assertEqual(obs['status'], 'private')
self.assertTrue(obs['qiime-map'].startswith(
path_builder('1_prep_1_qiime_')))
self.assertTrue(obs['prep-file'].startswith(
path_builder('1_prep_1_')))


class PrepTemplateDataHandlerTests(OauthTestingBase):
Expand Down
1 change: 1 addition & 0 deletions qiita_db/handlers/tests/test_processing_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,5 +274,6 @@ def test_post_processing_job_status(self):
self.assertEqual(qdb.processing_job.ProcessingJob(job_id).status,
'running')


if __name__ == '__main__':
main()
1 change: 1 addition & 0 deletions qiita_db/handlers/tests/test_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,6 @@ def test_get(self):
exp = {'name': 'Greengenes', 'version': '13_8', 'files': fps}
self.assertEqual(loads(obs.body), exp)


if __name__ == '__main__':
main()
9 changes: 5 additions & 4 deletions qiita_db/meta_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ def update_redis_stats():
artifact filepaths that are not present in the file system
"""
STUDY = qdb.study.Study
studies = {'public': STUDY.get_by_status('private'),
'private': STUDY.get_by_status('public'),
'sanbox': STUDY.get_by_status('sandbox')}
studies = {'public': STUDY.get_by_status('public'),
'private': STUDY.get_by_status('private'),
'sandbox': STUDY.get_by_status('sandbox')}
number_studies = {k: len(v) for k, v in viewitems(studies)}

number_of_samples = {}
Expand Down Expand Up @@ -186,7 +186,8 @@ def update_redis_stats():

lat_longs = get_lat_longs()

num_studies_ebi = len(ebi_samples_prep)
num_studies_ebi = len([k for k, v in viewitems(ebi_samples_prep)
if v >= 1])
number_samples_ebi_prep = sum([v for _, v in viewitems(ebi_samples_prep)])

# generating file size stats
Expand Down
13 changes: 7 additions & 6 deletions qiita_db/metadata_template/base_metadata_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -1430,7 +1430,11 @@ def validate(self, restriction_dict):
else:
valid_null = qdb.metadata_template.constants.EBI_NULL_VALUES
for column, datatype in viewitems(restriction.columns):
for sample, val in viewitems(self.get_category(column)):
# sorting by key (sample id) so we always check in the
# same order, helpful for testing
cats_by_column = self.get_category(column)
for sample in sorted(cats_by_column):
val = cats_by_column[sample]
# ignore if valid null value
if val in valid_null:
continue
Expand All @@ -1439,11 +1443,8 @@ def validate(self, restriction_dict):
val = str(val)
formats = [
# 4 digits year
'%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M',
'%m/%d/%Y %H', '%m/%d/%Y', '%m/%Y', '%Y',
# 2 digits year
'%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M',
'%m/%d/%y %H', '%m/%d/%y', '%m/%y', '%y'
'%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M',
'%Y-%m-%d %H', '%Y-%m-%d', '%Y-%m', '%Y'
]
date = None
for fmt in formats:
Expand Down
1 change: 1 addition & 0 deletions qiita_db/metadata_template/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,5 @@ def _col_iterator():
for cols in viewkeys(restriction.columns):
yield cols


CONTROLLED_COLS = set(col for col in _col_iterator())
2 changes: 2 additions & 0 deletions qiita_db/metadata_template/test/test_prep_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,8 @@ def test_create_qiime_mapping_file(self):
exp = pd.read_csv(
exp_fp, sep='\t', infer_datetime_format=False,
parse_dates=False, index_col=False, comment='\t')
obs = obs.reindex_axis(sorted(obs.columns), axis=1)
exp = exp.reindex_axis(sorted(exp.columns), axis=1)

assert_frame_equal(obs, exp)

Expand Down
Loading