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

Move to pyproject.toml from setup.{py/cfg} and add a minimal ruff linter/formatter #526

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MridulS
Copy link

@MridulS MridulS commented Feb 20, 2024

I started working on #155 and I thought it would be helpful to clean up this repo a bit before.

I have moved around a bunch of stuff in this PR, let me know if it makes easier to review if I break this up in smaller pull requests :)

  • moved all the config from setup.cfg to pyproject.toml
  • Removed setup.py, moved the version handling to setuptools_scm through pyproject.toml
  • Add a ruff linter and formatter to pre-commit to bring the linting in this repo up to date with astropy/astropy

I hope I didn't break anything here 😅

python -m build was able to build a wheel successfully and I was able to run pytest with no failures.

I have not run the ruff linter yet! Once we have a positive review I can run the pre-commit bits to format the code (didn't want to pollute the diff too much).

@MridulS
Copy link
Author

MridulS commented Feb 20, 2024

Another thing is that I have removed the coverage, flake8, pycodestyle specific configuration. I can add them back but I am not a 100% it makes sense to keep this along the pre-commit ruff action :)

@bsipocz
Copy link
Member

bsipocz commented Feb 20, 2024

Add a ruff linter and formatter to pre-commit to bring the linting in this repo up to date with astropy/astropy

Please no, we are talking about turning off more formatting stuff than we already have and this goes the opposite direction. But I let @msdemlei to chime in, too.

@MridulS
Copy link
Author

MridulS commented Feb 21, 2024

Please no, we are talking about turning off more formatting stuff than we already have and this goes the opposite direction. But I let @msdemlei to chime in, too.

No worries, we don't have to add more linters :)

Is consolidating everything in pyproject.toml okay? I think it really helps to have everything in one place as a single source of truth.

@msdemlei
Copy link
Contributor

msdemlei commented Feb 21, 2024 via email

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.

3 participants