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

Use a modern pyproject.toml package structure #164

Merged
merged 7 commits into from
May 15, 2024
Merged

Use a modern pyproject.toml package structure #164

merged 7 commits into from
May 15, 2024

Conversation

wigging
Copy link
Collaborator

@wigging wigging commented Apr 26, 2024

This adopts a modern pyproject.toml project structure for developing a Python package. The setup.py, setup.cfg, and MANIFEST.in files are no longer needed and have been removed. The zambeze package itself now resides in the src directory. All linting and formatting is now done with ruff instead of flake8 and black. The GitHub Actions workflows are also updated to account for these changes. Closes #159.

@wigging wigging self-assigned this Apr 26, 2024
@wigging
Copy link
Collaborator Author

wigging commented Apr 26, 2024

Someone needs to pull down this branch, create a new Python environment, install the package into that environment, make sure pytest -m unit passes, and make sure the imagemagick_files.py example runs correctly. I don't have any problems on my computer but I want to make sure someone else can run the tests and example before merging with main.

Copy link
Collaborator

@tskluzac tskluzac left a comment

Choose a reason for hiding this comment

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

Without understanding fully what ruff does, I moreso reviewed code cleanliness and that the libraries included were necessary/complete. It does pass those checks, I figure we can merge and test in main.

@tskluzac
Copy link
Collaborator

Someone needs to pull down this branch, create a new Python environment, install the package into that environment, make sure pytest -m unit passes, and make sure the imagemagick_files.py example runs correctly. I don't have any problems on my computer but I want to make sure someone else can run the tests and example before merging with main.

Just saw this comment. Will do!

@wigging
Copy link
Collaborator Author

wigging commented Apr 29, 2024

To run the ruff linter/style checks use ruff check . and to run the ruff formatter checks use ruff format --check . where . is the top-level of this project. These are the same commands used in the check.yml workflow. I'll update CONTRIBUTING.md to utilize all the changes in this pull request.

@wigging
Copy link
Collaborator Author

wigging commented May 1, 2024

I updated the contributing guidelines to account for the changes made in this pull request.

@wigging
Copy link
Collaborator Author

wigging commented May 8, 2024

@tskluzac Have you had a chance to run the tests and examples in this branch?

@tskluzac
Copy link
Collaborator

@tskluzac Have you had a chance to run the tests and examples in this branch?

Confirmed!

@tskluzac tskluzac merged commit e38ff65 into main May 15, 2024
1 check passed
@tskluzac tskluzac deleted the pyproject branch May 15, 2024 13:42
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.

Move project build infrastructure to pyproject.toml
2 participants