-
Notifications
You must be signed in to change notification settings - Fork 7
add LICENSE and sample/ to sdist #43
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
Conversation
This is a more standard layout that allows the next commit to easily include the LICENSE file and sample/ directory in the sdist. Otherwise, we would need ugly hacks like symlinks.
Flit can now automatically find and include the LICENSE file but it doesn't hurt to be explicit. With the inclusion of sample/, tests can now be run from the sdist (important for downstream distributions).
The venv isn't needed since we're already running in an ephermal VM. And removing the redundant default flags from `build` as recommended allow it to build the wheel from the sdist, which is a good sanity check to confirm that the sdist contains everything the wheel needs. See https://build.pypa.io/en/stable/index.html#python--m-build.
Dependency groups were defined in PEP 735, designed as a standardized replacement for pip's requirements.txt. These are now supported in pip and other package managers like uv. See https://peps.python.org/pep-0735/ and https://packaging.python.org/en/latest/specifications/dependency-groups/.
Ruff has largely superseded flake8 due to its impressive performance and re-implementation of popular plugins. Created via `uvx flake8-to-ruff .flake8`
Previous python versions have reached end of life, with 3.9 support ending soon in October: https://endoflife.date/python Pyupgrade issues were fixed with ruff by opting-in to the UP rules: https://docs.astral.sh/ruff/rules/#pyupgrade-up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR modernizes the packaging configuration and build process by dropping support for old Python versions and adopting new packaging standards. It also includes both the LICENSE file and sample directory in the source distribution to fix several reported issues.
- Updates minimum Python version from 3.6 to 3.9 and adopts modern dependency groups
- Replaces flake8 with ruff for linting and updates CI workflows
- Includes LICENSE and sample/ directory in sdist packaging
Reviewed Changes
Copilot reviewed 12 out of 51 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Updates Python version requirements, adds dev dependency groups, includes LICENSE and sample/ in sdist |
| .github/workflows/build.yaml | Modernizes CI workflow with updated actions and simplified dependency installation |
| .github/workflows/publish.yaml | Updates publish workflow to use new packaging structure and Python 3.13 |
| .flake8 | Removes flake8 configuration file as it's replaced by ruff |
| .devcontainer/postCreate.sh | Updates to use new dependency group installation method |
| tests/environment_variable_evaluation/test_environment_variables_braces.py | Removes trailing comment from assertion |
| src/README.md | Removes empty README file from src directory |
| pycomposefile/service/service_misc.py | Modernizes super() call syntax |
| pycomposefile/service/service_environment.py | Removes explicit file mode from open() call |
| pycomposefile/service/service.py | Removes mem_reservation field |
| pycomposefile/secrets/init.py | Removes explicit file mode from open() call |
| pycomposefile/compose_element/compose_datatype_transformer.py | Removes unnecessary parentheses from class definition |
Comments suppressed due to low confidence (1)
.github/workflows/build.yaml:17
- Python 3.14 is not yet released and may not be available in GitHub Actions. Consider removing it or making it an allowed failure until it's officially released.
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
| - name: Install pypa/build | ||
| run: | | ||
| python -m pip install -r requirements.txt | ||
| python -m pip install --group dev |
Copilot
AI
Jul 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The --group flag is not a valid pip option. This should likely be python -m pip install -e .[dev] or use a tool like uv that supports dependency groups.
| python -m pip install --group dev | |
| python -m pip install -e .[dev] |
|
Thank you very much for this! |
|
@smurawski thanks for the quick reviews and releases! |
Fixes #39
Fixes #28
Closes #32
This includes both the LICENSE and sample directory in the sdist. It also has some
miscellanious cleanups and modernizations (dropping support for old pythons,
updating deps, adopting new packaging standards), explained in more detail in each commit.
Now, modern package managers can recognize and automatically install dev dependencies, such as uv: