Closed hitz closed 10 months ago
ok I wrote some code to do this but don't want to expand test suite over the internet to use URIs. @sbooeshaghi how do you run tests locally?
Hi, could you clarify what you mean by "read seqspec from URI"? Do mean something akin to
seqspec print http://myurl.com/customspec.yaml
?
Also @detrout setup the testing framework and maybe can comment a bit about it and how to effectively write tests for new functionality.
You could either use a mocking library https://pypi.org/project/requests-mock/
or alternatively launch a local HTTP server instance to host a test seqspec. https://docs.python.org/3/library/http.server.html https://pytest-httpserver.readthedocs.io/en/latest/
seqspec print http://myurl.com/customspec.yaml
No, not the seqspec file itself, but rather the the references within it to the fastqs and index files. Ha, which means I think I modified the wrong function.
Ben asked for test documentation in slack, this look good enough for a pull request?
+Test can be run with
+```bash
+tox
+```
+Which will install pytest and pytest-cov, but requires you have already
+installed tox or
+
+```bash
+pytest --cov=seqspec
+```
+which requires that you install pytest and pytest-cov.
+
+
those should be in dev-requirements.txt right?
Yes, the package dependencies are listed in dev-requirements.
Though maybe it doesn't hurt to give people the option to ignore pip install -r dev-requirements (In case they forget it's there. like me)
onlists can now be supplied a uri
https://github.com/IGVF/seqspec/commit/242cdf09c58cd8864a3d98f58563910cdc5fe354
It would be cool if the lib could read seqspec from a URI instead of just a local file path