Repository navigation
Closed
Description
We need them. Very much so.
Jotting down some thoughts on what I'd like testing to look like for this project:
- Lean on typechecking; only write tests for logic.
- Use hypothesis as much as possible.
- I'd like to work off of https://github.com/inspera/jsonschema-typed to make a utility for basically converting JSON schema to a
.pyifile ofTypedDicts for that schema. From that (and a bit more logic), we can basically have Hypothesis any valid STAC JSON for us (and be sure our typechecking is correct too).
- I'd like to work off of https://github.com/inspera/jsonschema-typed to make a utility for basically converting JSON schema to a
- Prefer real-world / e2e-ish tests over unit tests. If there's a clear unit to test, test it, but otherwise don't worry about passing through a lot of logic in a test.
- Add some data fixtures, of both STAC metadata and actual assets that have tripped us up.
- Run mindeps tests like dask. Unlike dask, it would be great to automate figuring out those versions. Poetry doesn't support this yet, but it's probably possible: Support lock dependencies with lowest solvable versions python-poetry/poetry#3527.
- Continue using poetry, not conda. Conda is great for data science when you need system dependencies, but the ability to get deterministic environments from poetry makes it better for developing and testing packages.
- shed for formatting (probably).
Reacted by Scott Henderson
Reacted by Kyle Barron
Metadata
Metadata
Assignees
Labels
No labels
Activity
scottyhq commentedon Apr 21, 2021
thanks for writing this down @gjoseph92 lots of new resources to explore!
Agreed that poetry is nice for having everything in pyproject.toml and also facilitating pypi publishing. For locking environments with conda I've been getting a lot of mileage out of conda-lock, worth keeping an eye on: https://github.com/conda-incubator/conda-lock
gjoseph92 commentedon Feb 2, 2022
Going to close this now that a few tests have been added, so hopefully the barrier to adding more will be lower!
Specific follow-up issues:
And then all of these need tests: https://github.com/gjoseph92/stackstac/issues?q=label%3Aneeds-future-test
gjoseph92 commentedon Feb 3, 2022
Wanted to note I just noticed https://github.com/Zac-HD/hypothesis-jsonschema, which should let us generate random STAC data from the STAC json schema!