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

chore: modernize build backend and require Python 3.8+ #137

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

Conversation

henryiii
Copy link
Member

@henryiii henryiii commented Oct 18, 2024

Some modernization to bring in line with other scikit-hep packages:

  • Use hatching as a build backend
  • Require Python 3.8+ (3.8 is now EoL, but most other packages in Scikit-HEP are still 3.8+ for now. 3.8 is the oldest supported Python on ubuntu-latest (and macos-latest))
  • Update Ruff checks, use ruff-format, remove checks that overlap
  • Update exits - exit() is not a Python built-in, but only a site.py thing, so sys.exit() or preferably raise SystemExit() should be used instead.
  • Some updates for typing
  • Use uv to speed up the CI

Signed-off-by: Henry Schreiner <[email protected]>
@henryiii henryiii marked this pull request as ready for review October 18, 2024 15:26
default_language_version:
# force all unspecified python hooks to run python3.9
# Latest version that can easily be isntalled on Ubuntu 20.04 LTS
python: python3.9
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I needed to add this to ensure that the pre-commit hooks run on my laptop, which is Ubuntu 20.04 LTS. Without this, they try to use the default Python 3.8, and some of the pre-commit checks seem to not support that. Is it harmful in any way to just keep this in for now?

except ValueError:
pass

# Try to interpret file as CSV file
try:
data_handle.seek(0)
_histoprint_csv(data_handle, **kwargs)
exit(0)
raise SystemExit(0)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this a SystemExit and the other ones return?

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