Skip to content

Conversation

plaplant
Copy link

@plaplant plaplant commented Oct 18, 2024

This PR does a few things:

  • Moves package installation from a setup.py model to pyproject.toml.
  • Starts using the tmp_path fixture from pytest for temporary directories.

The larger goal here is to start hosting this repo on PyPI. Some outstanding issues that still require addressing:

  • Selecting a unique name for the package on PyPI (as ares is already taken 😢).
  • Refactoring how data files are installed/generated.
  • Writing auxiliary helper functions for the ares command-line utility to support initial package setup/installation.

Some of the above may be broken off into separate PRs, but I wanted to make a list of issues that should probably be addressed before uploading to PyPI.

plaplant and others added 22 commits October 18, 2024 13:28
…l notes and acknowledgements to separate files INSTALL.rst and THANKS.rst
…eh kwarg to hmf setup as per SGM's suggestion
@mirochaj
Copy link
Owner

Hi @plaplant, I've been working my way through this stuff and we might be ready for some initial checks. Here's what I've done:

  • For tests that create output files, I've modified the script to save them to RUNNER_TEMP, if it is defined. This is a temporary directory setup by github actions that gets wiped after the test suite runs. It's a bit clunky in that one has to add a 7 line snippet (see the end of, e.g., tests/test_physics_halo_mf.py), but the other options I found online seemed more invasive/complicated. It's only required by a few tests now. If this environment variable isn't found, files will just be saved in a new folder in the CWD called _tmp_ares_data.
  • I've done some re-organizing of the data required for tests to run and moved several files to Google Drive instead of my Dropbox. This adds a new dependency gdown, but this seems to be working seamlessly. One can simply do ares download tests to retrieve exclusively those files needed for the test suite to run. I'll add a few more options like this in the near future.
  • Re: the name. Perhaps we should go with ares-astro or ares-ast to indicate this is an astronomy code. Open to other suggestions.

Hopefully this is the kind of stuff you were thinking about, but let me know if you have other suggestions. Note that the test suite will still fail right now (I get 6 failures), but none of the failures are related to missing files. They are known issues I'm working on but I can fix separately from this PR.

Anyways, let me know if you have other ideas and/or if we could proceed to merge this into the v1 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants