silx-kit / h5web

React components for data visualization and exploration
https://h5web.panosc.eu/
MIT License
165 stars 17 forks source link

Remove reliance on external server to test providers #1596

Closed axelboc closed 3 months ago

axelboc commented 3 months ago

I've set up two Python projects inside a new support folder at the root of the monorepo: one to create sample.h5 and one to start an h5grove tornado server. I've then changed the API tests as follows:

Both support projects are managed with Poetry. I've added pnpm scripts for convenience and documented everything in CONTRIBUTING.md. Concerning the Python version, I've set it to 3.12 with a .python-version file at the root of the monorepo, and I explain how to use pyenv in the contributing guide.

Of course, I've also updated the CI test job with steps to set up Python, install Poetry, create/cache the Poetry environments, create the sample file and start h5grove. It's surprisingly fast; once everything is cached (including the installation of Poetry itself), it adds only a few seconds to the test job, which is awesome.