Skip to content

Tests #26

Closed
Closed

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.
  • 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).

Activity

  1. scottyhq commented on Apr 21, 2021

    @scottyhq
    Contributor

    thanks for writing this down @gjoseph92 lots of new resources to explore!

    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.

    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

  2. gjoseph92 commented on Feb 2, 2022

    @gjoseph92
    OwnerAuthor
  3. gjoseph92 commented on Feb 3, 2022

    @gjoseph92
    OwnerAuthor

    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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions