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

Modernize #61

Merged
merged 9 commits into from
Jan 19, 2024
Merged

Modernize #61

merged 9 commits into from
Jan 19, 2024

Conversation

bluetech
Copy link
Member

This PR modernizes things I could see, please see the commits.

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

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

Great work!

- environment: "py38"
python: "3.8"
- environment: "py39"
Copy link
Member

Choose a reason for hiding this comment

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

No need to change, but realized that matrix.environment is not used at all, so this matrix could be simplified:

matrix:
  python: ["3.8", "3.9", "3.10", "3.11", "3.12"]

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, I also removed the pip upgrade bit since setup-python already does this as I've learned now.

build-backend = "setuptools.build_meta"

[project]
name = "pytest-{{cookiecutter.plugin_name}}"
Copy link
Member

Choose a reason for hiding this comment

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

We do not need any directive for setuptools to work with the src layout? Neat.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes it has "automatic discovery" https://setuptools.pypa.io/en/latest/userguide/package_discovery.html#automatic-discovery

I verified that the sdist and wheel look good (possible I missed something but I don't think so)

pyproject.toml is the more modern way to do it, and we can remove all
setuptools dependence except for choosing it as the build backend.

src layout is less error prone than flat layout, given that tox is used.

Fix #38, #30, #24
`testdir` is soft-deprecated in pytest, `pytester` is the replacement.

Fix #51
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