Skip to content

pypi updates and upgrade ci versions#178

Merged
RonanB96 merged 13 commits intomainfrom
pypi_update
Feb 27, 2026
Merged

pypi updates and upgrade ci versions#178
RonanB96 merged 13 commits intomainfrom
pypi_update

Conversation

@RonanB96
Copy link
Owner

This pull request updates the GitHub Actions workflows and documentation to streamline CI/CD processes, improve clarity, and ensure consistency with recent tooling and project structure changes. The most significant changes include updating the documentation for new release workflows and tool usage, upgrading GitHub Actions dependencies, and aligning configuration and coverage thresholds.

Documentation and Workflow Updates:

  • Expanded .github/workflows/README.md to include details about the new release workflow (release.yml), updated instructions for running tests, linting, and type checking locally, and clarified the use of ruff as the unified linting/formatting tool. Also raised the coverage threshold to 85% and updated terminology for consistency (e.g., "initialise" instead of "initialize"). [1] [2] [3] [4] [5]

  • Added [tool.hatch.build.targets.sdist.force-include] to pyproject.toml to ensure the bluetooth_sig package is included in source distributions, matching the wheel configuration.

CI/CD Dependency and Version Updates:

  • Updated all uses of actions/cache from version 4 to version 5 across workflow files for improved caching performance and support. [1] [2] [3] [4] [5]

  • Updated dawidd6/action-download-artifact from v12 to v16 in test-coverage.yml for artifact download steps, ensuring compatibility and access to the latest features. [1] [2]

Workflow Logic Corrections:

  • Fixed a dependency in release.yml so that the publish-pypi job now depends on the build job (instead of publish-testpypi), aligning with the actual workflow structure.

…e data

python -m build builds wheel from sdist, so the wheel force-include
was applied twice — once into the sdist and again when building the
wheel from the sdist. Removing the sdist force-include lets the
build hook handle submodule inclusion for sdist, while the wheel
force-include correctly maps it once.
Insert a 'validate' job between build and publish-pypi that installs
the built wheel and sdist in separate fresh environments, then runs
the full test suite against both. Only if both matrix legs pass does
the pipeline proceed to publish.

- Sparse-checkout tests/ only (no src/ to avoid shadowing installed pkg)
- Override pythonpath= so pytest uses installed package, not source tree
- Matrix strategy: wheel and sdist validated in parallel
- System deps installed for bleak/bluepy test requirements
- Coverage threshold 85% maintained
- Add 'packaging' pytest marker for tests that validate installed package
- Mark 5 tests: service/characteristic resolution, YAML presence/loading, UUID roundtrip
- Simplify validate job: full checkout, minimal deps (pytest + pytest-asyncio only)
- Drop system BLE libraries, coverage, parallel execution from validate
- Guard test_connection_managers.py imports with pytest.importorskip(bleak)
post-release generates invalid PEP 440 versions (e.g. 0.2.0.dev4.post1)
when commits exist past a dev-suffixed tag.

no-guess-dev is the documented replacement per setuptools-scm docs:
- On tag: produces exact version (e.g. 0.2.0)
- Past tag: produces {tag}.post1.devN (valid PEP 440)

Also removed fallback_version as it is no longer needed.
tests/docs/conftest.py defines pytest_xdist_auto_num_workers hook which
requires pytest-xdist. Since validate only runs -m packaging tests, ignoring
these directories avoids loading their plugin-dependent conftest files.
- Add test-core extra (pytest framework deps shared by dev/test/validate)
- Add ble extra (BLE client libs shared by test/examples)
- dev, test, examples now self-reference shared extras
- Validate job uses test-core: lightweight, no playwright/bleak/bluepy
- Scope validate pytest to tests/gatt/ (packaging-marked tests only)
@RonanB96 RonanB96 force-pushed the pypi_update branch 2 times, most recently from 45d8b96 to 65e63ef Compare February 26, 2026 21:33
@RonanB96 RonanB96 force-pushed the pypi_update branch 2 times, most recently from bb15c51 to a444358 Compare February 27, 2026 09:41
@RonanB96 RonanB96 merged commit 82f3608 into main Feb 27, 2026
8 checks passed
@RonanB96 RonanB96 deleted the pypi_update branch February 27, 2026 11:13
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.

1 participant