Skip to content

Tests #26

@gjoseph92

Description

@gjoseph92

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 .pyi file of TypedDicts 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).
  • 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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions