PermafrostDiscoveryGateway / viz-staging

PDG Visualization staging pipeline
Apache License 2.0
2 stars 1 forks source link

setup package build and testing framework for pdg-staging #37

Open mbjones opened 3 months ago

mbjones commented 3 months ago

In discussing the need to better package testing, we discussed the need to run unit and integration tests for all packages. This issue is to set up poetry package metadata and pytest as a testing framework and create example tests to be expanded.

mbjones commented 3 months ago

Started implementation of this build and test framework in branch https://github.com/PermafrostDiscoveryGateway/viz-staging/tree/feature-37-poetry-build . This provides a pyproject.toml file and a basic pytest setup with tests in the tests directory. Example tests are currently just no-ops, and this is meant to be a starting point for a discussion on package build and setup for testing.

To build the package, run poetry build, to install it run poetry install. To run the tests, run pytest from the root of the package directory.

@julietcohen @westminsterabi feedback appreciated, and let's discuss if this would help build out a better package test suite

mbjones commented 3 months ago

After successful test run by @westminsterabi , I went ahead and merged PR #38 into develop. Let's follow this same package and test structure for the other packages, viz-workflow, viz-raster, etc.

mbjones commented 2 months ago

Found an issue that pydantic was a required package but was not listed in the package dependencies. Fixed in sha 50449ab3 and pushed to develop.