Conversation
sbillinge
left a comment
There was a problem hiding this comment.
this looks good, but let's discuss a bit what we what the API interace to look like. what do we want to hand to find_one and what do we want it to return?
Is this how it is done in regolith, passing in strings? Or do we pass in a dabase object?
Suggest if you think it is not a great idea, but I think stealing everything from regolith, which we know works quite well, is a good idea. It means that to implement your test we may need to bit the bullet and grab runcontrol.py from regolith and the rest of the rc setup. If there is another model that is not regolith, but a more or less standard python CRUD setup, we can steal that too.
|
|
||
| **Changed:** | ||
|
|
||
| * find_one function for filesystem |
There was a problem hiding this comment.
We just need here under Added: find_one function for fs client.
The way to think about "news" is it is for users of the software to see what changed since the last release (this gets built into the changelog) so it serves a different purpose than the commit messages...no need to mention there is a test for the function you are building.
tests/test_fsclient.py
Outdated
| def test_find_one(): | ||
| pass | ||
| client = FileSystemClient(rc) | ||
| cif_path1 = "../docs/examples/cifs/calculated/bs0018IIIsup4.rtv.simulated.cif" |
There was a problem hiding this comment.
this is brittle and bound to break. copy-paste the content into a variable in a python module and import it. Call the module something like testing_cif_inputs. Then use TempDirectory to write them to a tempfile.
|
function to find one document from the database using filesystem