Skip to content

Conversation

@harshil21
Copy link
Member

@harshil21 harshil21 commented Feb 1, 2024

Wanted to do this for a long time. Having two config files is just unnecessary since pyproject.toml is now the recommended config file for tools, linters, packaging, etc.

So this PR migrates all the tools to use pyproject.toml instead. There are only 3 remaining:

  • license-files: Seems like this breaks test_meta.py? Otherwise it's possible to move it to pyproject.toml according to their docs.
  • sphinx-pypi-upload: This was added by leandro 8 years ago, back when docs were uploaded not to RTD, but to pythonhosted.org. I recommend removing that dependency and from the setup.cfg (upload_sphinx, build_sphinx). More information on that method can be found here.
  • flake8: Unfortunately, flake8 does not support pyproject.toml due to some weird reason (shame!) - pyproject.toml (PEP 518) support PyCQA/flake8#234 but we should be able to remove flake8 once ruff becomes stable.

@harshil21 harshil21 added the misc label Feb 1, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hey! Looks like you edited the (optional) requirements or the pre-commit hooks. I'm just a friendly reminder to keep the additional dependencies for the hooks in sync with the requirements :)

@Poolitzer
Copy link
Member

Well we aren't on pythonhosted anymore. I don't see any reason keeping that in our config.

Copy link
Member

@Bibo-Joshi Bibo-Joshi left a comment

Choose a reason for hiding this comment

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

Fully agree on the general idea 👍

  • license-files: If you're able to move to pyproject, I'm ofc happy. test-meta just checks the return code of python setup.py bdist_dumb, so running that manually should probably give you an idea of the exception
  • sphinx-pypi-upload: I agree with pool, ditch that

@harshil21
Copy link
Member Author

  • license-files: If you're able to move to pyproject, I'm ofc happy. test-meta just checks the return code of python setup.py bdist_dumb, so running that manually should probably give you an idea of the exception

there was some error regarding the parsing of pyproject.toml, I'll have a closer look later

@harshil21
Copy link
Member Author

  • license-files: If you're able to move to pyproject, I'm ofc happy. test-meta just checks the return code of python setup.py bdist_dumb, so running that manually should probably give you an idea of the exception

there was some error regarding the parsing of pyproject.toml, I'll have a closer look later

Leaving this for now, since we will be discussing if it's worth to ditch setup.py and ptb-raw as discussed internally (I'll open a new issue for that soon)

@harshil21 harshil21 added the 📋 pending-merge work status: pending-merge label Feb 5, 2024
@Bibo-Joshi Bibo-Joshi merged commit 6ae7add into master Feb 5, 2024
@Bibo-Joshi Bibo-Joshi deleted the migrate-setup-cfg branch February 5, 2024 16:28
@harshil21 harshil21 removed the 📋 pending-merge work status: pending-merge label Feb 5, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Feb 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants