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

172 migrating from setuppy to pyprojecttoml #173

Merged
merged 4 commits into from
Sep 29, 2024

Conversation

sammytheindi
Copy link
Collaborator

Pull Request Template

Description

Pull request addressing #172.

The current use of setup.py for project configuration is becoming outdated and less aligned with modern Python packaging standards. This can lead to potential issues with build isolation, tool interoperability, and future compatibility. Additionally, the imperative nature of setup.py can make it more prone to errors and harder to maintain compared to newer declarative formats.

This pull request entails migration to a pyproject.toml file, alongside a setup.cfg file for flake8 fuctionality and a minimal setup.py file for backwards compatability. I have also added in an additional section for the readme to help new contributors develop this project. I have further added isort and flake8 support, and fixed all the errors in the codebase.

Context of change

  • Software (software that runs on the PC)
  • Library (library that runs on the PC)
  • Tool (tool that assists coding development)
  • Other

Type of change

Please mark any boxes that apply.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Ran pre-commit tests using configurations in pyproject.toml and setup.cfg
  • Reinstalled clean venv and tested installing in editable mode for pip install -e . and pip install -e '.[dev]'
  • Built wheel and checked metadata
  • Built wheel and installed

Checklist:

  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • Any dependent changes have been merged and published in downstream modules.

- Added a minimal setup.cfg for flake8
- Changed setup.py to minimal file for backwards compatability
- Added in flake8 and isort for mode code consistency
- Added pre-commit hooks for flake8 and isort
- Updated files with isort for consistent imports
- Fixed all flake8 issues
- Changed imports to ensure they are accepted by flake8, and fixed
  circular dependencies
@sammytheindi sammytheindi added this to the 4.0 milestone Sep 17, 2024
@sammytheindi sammytheindi self-assigned this Sep 17, 2024
@sammytheindi sammytheindi linked an issue Sep 17, 2024 that may be closed by this pull request
Copy link
Owner

@PaulMcInnis PaulMcInnis left a comment

Choose a reason for hiding this comment

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

🚢

@sammytheindi sammytheindi merged commit 493af1b into master Sep 29, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrating from setup.py to pyproject.toml
2 participants