-
Notifications
You must be signed in to change notification settings - Fork 9
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
Convert setup.cfg to pyproject.toml, update tools #80
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drop flake8, isort, et in favor of ruff update pre-commit overall bring this more in alignment with the asdf config
braingram
force-pushed
the
pyproject_toml
branch
from
September 26, 2023 13:38
fa889c8
to
1b82d91
Compare
braingram
changed the title
Pyproject toml
Convert setup.cfg to pyprojec.toml, update tools
Sep 26, 2023
braingram
changed the title
Convert setup.cfg to pyprojec.toml, update tools
Convert setup.cfg to pyproject.toml, update tools
Sep 26, 2023
eslavich
approved these changes
Sep 29, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
if shorten and not schema_id: | ||
refname = components[-1] | ||
elif shorten: | ||
rename = schema_id | ||
# TODO this should probably be: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oopsies...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Move configuration in
setup.cfg
topyproject.toml
.Use
ruff
to replaceflake8
,isort
andbandit
.Update tools to otherwise more closely match asdf (pre-commit config, rules, codespell, etc).
Python 3.12 testing was added. The tests are currently passing and a claim for 3.12 support was added to pyproject.toml.
During this update a few things were noticed:
jinja
jinja
is used to perform formatting for one string:sphinx-asdf/sphinx_asdf/nodes.py
Line 2 in d81d949
It is not listed as a dependency. This PR removes the use of
jinja
and replaces it with built-in python string formatting.rename
instead ofrefname
In
directives.py
ruff removed an unused variablerename
.sphinx-asdf/sphinx_asdf/directives.py
Lines 210 to 213 in d81d949
This appears to be a typo (which was likely intended to be
refname
). However, switching this torefname
results in build errors. I opened an issue for this (see: #81). For the scope of this PR the unusedrename
is replaced with apass
.numpy
An attempt is made in
conf.py
to seed the numpy random number generated.sphinx-asdf/sphinx_asdf/conf.py
Lines 9 to 13 in d81d949
The used environment variable is not defined on readthedocs and makes this seeding unused for readthedocs builds. This PR removes this unused seeding.
datetime
import inconf.py
datetime
is imported by unused inconf.py
. Asdf (and possibly other downstream packages) expectdatetime
to be imported whenconf.py
is star imported. A note and noqa was added to this import however the downstream packages should likely be updated to not expect this import or even better to not use a star import ofconf.py
.