cleaning up biosample and participant#312
Conversation
| nskey="dandi", | ||
| ) | ||
|
|
||
| wasDerivedFrom: Optional[List["BioSample"]] = Field(None, nskey="prov") |
There was a problem hiding this comment.
this recursive formulation should allow us to have cell ids, slice ids, and tissue ids.
|
|
||
|
|
||
| class Participant(DandiBaseModel): | ||
| """Description about the sample that was studied""" |
There was a problem hiding this comment.
separating out participant details
| wasAttributedTo: List[Participant] = Field( | ||
| None, description="Participant(s) to which this file belongs to", nskey="prov" | ||
| ) |
There was a problem hiding this comment.
a given asset may have multiple participants potentially. how we deal with this in the name is something we will have to figure out.
Codecov Report
@@ Coverage Diff @@
## master #312 +/- ##
==========================================
+ Coverage 70.33% 70.42% +0.09%
==========================================
Files 55 55
Lines 5077 5096 +19
==========================================
+ Hits 3571 3589 +18
- Misses 1506 1507 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
* upstream/master: Close a file in a test case
|
now master should be 3.9 testing friendly , so the only issues are of the lint errorsRun tox -e lint
lint create: /home/runner/work/dandi-cli/dandi-cli/.tox/lint
lint installdeps: flake8
lint installed: flake8==3.8.4,importlib-metadata==3.3.0,mccabe==0.6.1,pycodestyle==2.6.0,pyflakes==2.2.0,typing-extensions==3.7.4.3,zipp==3.4.0
lint run-test-pre: PYTHONHASHSEED='1970909900'
lint run-test: commands[0] | flake8 --config=setup.cfg dandi setup.py
dandi/tests/test_metadata.py:592:101: E501 line too long (132 > 100 characters)
dandi/tests/test_metadata.py:638:101: E501 line too long (109 > 100 characters)
dandi/tests/test_metadata.py:673:101: E501 line too long (221 > 100 characters)
dandi/tests/test_metadata.py:741:101: E501 line too long (109 > 100 characters)
dandi/tests/test_metadata.py:766:101: E501 line too long (109 > 100 characters)
dandi/tests/test_metadata.py:787:101: E501 line too long (106 > 100 characters)
dandi/tests/test_metadata.py:808:101: E501 line too long (106 > 100 characters)
dandi/tests/test_metadata.py:834:101: E501 line too long (131 > 100 characters)
dandi/tests/test_metadata.py:870:101: E501 line too long (221 > 100 characters)
dandi/tests/test_metadata.py:880:101: E501 line too long (133 > 100 characters)
dandi/tests/test_metadata.py:901:101: E501 line too long (119 > 100 characters)
dandi/tests/test_metadata.py:942:101: E501 line too long (119 > 100 characters)
dandi/tests/test_metadata.py:963:101: E501 line too long (109 > 100 characters)
dandi/tests/test_metadata.py:1002:101: E501 line too long (109 > 100 characters)
dandi/tests/test_metadata.py:1012:101: E501 line too long (106 > 100 characters)
dandi/tests/test_metadata.py:1022:101: E501 line too long (133 > 100 characters)
dandi/tests/test_metadata.py:1032:101: E501 line too long (127 > 100 characters)
dandi/tests/test_metadata.py:1042:101: E501 line too long (155 > 100 characters)
dandi/tests/test_metadata.py:1097:101: E501 line too long (102 > 100 characters)
dandi/tests/test_metadata.py:1127:101: E501 line too long (1147 > 100 characters)
dandi/tests/test_metadata.py:1149:101: E501 line too long (124 > 100 characters)
ERROR: InvocationError for command /home/runner/work/dandi-cli/dandi-cli/.tox/lint/bin/flake8 --config=setup.cfg dandi setup.py (exited with code 1)
___________________________________ summary ____________________________________
ERROR: lint: commands failed
Error: Process completed with exit code 1.aren't you using pre-commit?! |
* upstream/master: Add comment explaining why Python 3.9 on Windows testing is disabled Downgrade hdf5 on macOS to 1.8 Install hdf5 for Python 3.9 tests
|
pre-commit isn't catching these linting things. do remember pre-commit uses black which is opinionated. |
|
hm, I just remember it splitting long lines for me and staying largely inline with what we have setup for linters... odd |
|
@yarikoptic Delinted. |
* upstream/master: Split up download methods Simplify code Download method for new API Update pagination Fix more API calls Include dandiset ID and version ID in `file_name` Correct the calls to the validation endpoints Wait for Django API Docker container to be ready Test of new upload method upload() method for new API Set API URL for Docker Compose to point to API container Basic updates for new API Fix tests Ensure log path is always printed, even on error Record sys.argv and os.getcwd() as logfile-specific log messages Tee all logs to user log directory
* upstream/enh/subject: Break long lines
|
@yarikoptic - the tests that fail here are the same tests that fail on master and unrelated to this PR. |
this is a draft PR to try and clean up the asset model. i haven't updated tests yet. putting the model changes here up for discussion.