Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pooch for testdata management, modernize #261

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

Zeitsperre
Copy link
Contributor

@Zeitsperre Zeitsperre commented Oct 23, 2024

Overview

Changes:

  • Refactored the testing setup to make use of the clisops testing utilities and pytest fixtures.
  • Removed gitpython: mini-esgf-data is now managed by the clisops setup code.
  • Gave the package the birdhouse-rook name in preparation for a release of this library on PyPI
  • Modified the pre-commit and linting steps to rely solely on ruff (faster, more modern).
  • Moved the requirement files into the pyprojec.toml file.
  • Sorted imports and removed lots of dead code.

Related Issue / Discussion

Some of these changes are being made to ensure that projects using the mini-esgf-data repository can make use of the new layout using pooch (see the restructuring/v1 branches). Once this has been done, we can start using a versioned approach to test data collection and management (with pooch and the stratus class from clisops).

I've also renamed the library to birdhouse-rook (rook was taken on PyPI). This is no different from a few other birdhouse projects that have been added to PyPI (birdhouse-raven, birdhouse-finch). This name does not impact the existing module name (still rook), so no changes will be needed when using it as a library.

Additional Information

@cehbrecht

My changes seem to have affected some of the configuration defaults. My theory is that there are some hard-coded filepaths that are causing the FileNotFound errors. If you could point me in the right direction, I would be willing to make the final adjustments here.

It also appears that the db code is fully deprecated. We will need to update the SQL handling here to be able to support modern daops and pandas.

@Zeitsperre Zeitsperre added enhancement New feature or request help wanted Extra attention is needed labels Oct 23, 2024
@Zeitsperre Zeitsperre requested a review from cehbrecht October 23, 2024 19:20
@Zeitsperre Zeitsperre self-assigned this Oct 23, 2024
@cehbrecht
Copy link
Collaborator

cehbrecht commented Nov 12, 2024

My changes seem to have affected some of the configuration defaults. My theory is that there are some hard-coded filepaths that are causing the FileNotFound errors. If you could point me in the right direction, I would be willing to make the final adjustments here.

@Zeitsperre the rook tests are using a generated roocs.ini file pointing to the directory with the test data. This should always overwrite the defaults in roocs_utils:

def write_roocs_cfg():

@cehbrecht
Copy link
Collaborator

cehbrecht commented Nov 12, 2024

It also appears that the db code is fully deprecated. We will need to update the SQL handling here to be able to support modern daops and pandas.

Still using pandas < 2.0 and sqlalchemy < 2.0. I probably also need to update the intake catalogs which we are using. And the CDS needs to update as well. Maybe we can handle this in separate PR series.

@Zeitsperre
Copy link
Contributor Author

@cehbrecht Agreed. I think that some of the work in here can be reused, but there's a lot to sort out first with the underlying libraries. My priorities are to get roocs-utils into CLISOPS and then clisops.core into its own library.

Once the dust has settled, it'll be much easier to bring this service up to speed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants