Skip to content

Stage New CI/CD Improvements. #259

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

Merged
merged 63 commits into from
Dec 19, 2024
Merged

Stage New CI/CD Improvements. #259

merged 63 commits into from
Dec 19, 2024

Conversation

reactive-firewall
Copy link
Collaborator

@reactive-firewall reactive-firewall commented Dec 14, 2024

Release Notes

1. Scope and Goals of PR Stage New CI/CD Improvements

The overarching goal of this pull request, titled “Stage New CI/CD Improvements,” is to modernize and unify the project’s continuous integration and deployment setup. Specifically, it focuses on adding granular workflows, clarifying job dependencies, and ensuring that the entire build, test, and deployment pipeline is traceable and resilient. Beyond CI alone, this PR also refines documentation generation, code quality checks, and project metadata to align with the evolving needs of the multicast library.

Rationale for This Update

Builds on lessons learned from earlier PRs: we apply refined continuous integration practices, explicit environment checks, and an expanded coverage of build/test triggers. A direct impetus was to ensure the repository has specialized workflows for docs, tests, minimal acceptance tests (MATS), labeling, etc., each with explicit job dependencies and commit-status integration.

---

2. Summary (by CodeRabbit)

  • New Features

    • Introduced multiple Continuous Integration workflows for building, documentation, and testing.
    • Enhanced error handling and validation in multicast configuration management.
  • Documentation

    • Updated various module headers and comments for clarity and consistency.
    • Improved docstrings for functions and classes across the codebase.
  • Bug Fixes

    • Refined error messages and handling in several modules and test cases.
  • Dependencies

    • Updated versions of several dependencies and tools in configuration files.
  • Style

    • Standardized comments and documentation formatting throughout the codebase.

3. Key Changes and File-by-File Highlights

Note

CI/CD changes are not user-facing

New & Updated GitHub Actions Workflows

A) New & Updated GitHub Actions Workflows

  • .github/workflows/CI-BUILD.yml

    Establishes a primary BUILD job, a BOOTSTRAP job that runs tests across multiple Python versions, and a BUILD_STATUS job that collates results. This ensures early surface checks and a cohesive summary of build outputs.

  • .github/workflows/CI-DOCS.yml

    Implements documentation build and lint steps (especially around Sphinx). Runs on multiple platforms and Python versions, uploading artifacts for further analysis. This clarifies how docs are built and ensures that documentation issues are caught quickly, and caught in way more independent of functional issues.

  • .github/workflows/CI-MATs.yml

    Introduces Dedicated GHA for the Minimal Acceptance Tests, triggered upon the successful completion of CI-BUILD. The previous MATS, and the new check_build, and MATS_STATUS jobs, all ensure minimal acceptance tests only run when the build is sufficiently stable, then report a more confident status of acceptable or not.

  • .github/workflows/Tests.yml

    Renames the old CI.yml or CI workflow to CI-TESTS. It triggers on the conclusion of CI-MATs, containing coverage, style, integration tests, etc. Each step is conditional on prior success, refining the pipeline sequence.

[!NOTE]
This is a fist step at attempting to reign in the environmental impacts of inefficient CI/CD scheduling. 🌱

  • .github/workflows/Labeler.yml

    Updates the labeler action reference to a fixed commit SHA, ensuring consistency and reproducibility. This partial “pinning” was a pattern repeated in other workflows to harden CI/CD from unexpected changes due to external dependencies.

  • .github/workflows/bandit.yml, .github/workflows/codeql-analysis.yml, .github/workflows/makefile-lint.yml, .github/workflows/markdown-lint.yml, .github/workflows/yaml-lint.yml

    Each of these is pinned to specific commits for the respective GitHub actions, improving reliability. Error-handling sections see minor improvements to reflect more robust instructions (e.g., refined environment checks, consistent exit statuses).

B) Documentation and Configuration Updates

  • README.md / LICENSE.md / Makefile

    Rebrands from “Python Multicast Repo” to “Multicast Python Module” to better communicate the library’s focus. LICENSE clarifications about included files, coverage expansions (2017–2025). Makefile header shift is strictly cosmetic.

  • docs/ (including CI.md, conf.py, requirements.txt, utils.py)

    Extensive additions to Sphinx config: new extensions (sphinx_design, linkify), updates to docstring conventions (Google style docstrings), linkcode enhancements, etc. “docs/utils.py” provides functions _validate_git_ref and slugify_header for robust doc generation. “CI.md” now includes badges for coverage, best practices, and multiple lint checks.

  • pyproject.toml

    Flake8 configuration appended, controlling line lengths, docstring style, and ignoring certain warnings. (See CEP-7)

C) Package and Build Metadata

  • setup.cfg, setup.py

    Updated to version 2.0.3-rc-3. Adds new env module to the package.

  • mutlicast/env.py

    Added functions for validating multicast configurations and handling Git references.


reactive-firewall and others added 30 commits December 7, 2024 14:09
Changes in file .github/workflows/Tests.yml:
 jobs:
Changes in file tests/check_spelling:
 export -f check_command
Changes in file .github/workflows/Tests.yml:
 jobs:
 name: CI
Changes in file .github/workflows/Tests.yml:
 jobs:
 on:  # yamllint disable-line rule:truthy
… -)

Changes in file LICENSE.md:
  - clearified current files related to python-repo.

Changes in file Makefile:
  - Reword heading to "Multicast Python Module"

Changes in file README.md:
  - Reword heading to "Multicast Python Module"

Changes in file docs/requirements.txt:
  - Reword heading to "Multicast Python Module"

Changes in file multicast/__init__.py:
  - Reword heading to "Multicast Python Module"

Changes in file multicast/__main__.py:
  - Reword heading to "Multicast Python Module"

Changes in file multicast/exceptions.py:
  - Reword heading to "Multicast Python Module"

Changes in file multicast/hear.py:
  - Reword heading to "Multicast Python Module"

Changes in file multicast/recv.py:
  - Reword heading to "Multicast Python Module"

Changes in file multicast/send.py:
  - Reword heading to "Multicast Python Module"

Changes in file multicast/skt.py:
  - Reword heading to "Multicast Python Module"

Changes in file requirements.txt:
  - Reword heading to "Multicast Python Module"

Changes in file setup.cfg:
  - Reword heading to "Multicast Python Module"

Changes in file setup.py:
  - Reword heading to "Multicast Python Module"

Changes in file tests/MulticastUDPClient.py:
  - Reword heading to "Multicast Python Module"

Changes in file tests/context.py:
  - Reword heading to "Multicast Python Module"

Changes in file tests/requirements.txt:
  - Reword heading to "Multicast Python Module"

Changes in file tests/test_deps.py:
  - Reword heading to "Multicast Python Module"

Changes in file tests/test_exceptions.py:
  - Reword heading to "Multicast Python Module"

Changes in file tests/test_fuzz.py:
  - Reword heading to "Multicast Python Module"

Changes in file tests/test_hear_cleanup.py:
  - Reword heading to "Multicast Python Module"

Changes in file tests/test_hear_data_processing.py:
  - Reword heading to "Multicast Python Module"

Changes in file tests/test_hear_keyboard_interrupt.py:
  - Reword heading to "Multicast Python Module"

Changes in file tests/test_hear_server.py:
  - Reword heading to "Multicast Python Module"

Changes in file tests/test_hear_server_activate.py:
  - Reword heading to "Multicast Python Module"
Changes in file setup.py:
 - use set instead of array for whitelist.
Changes in file docs/conf.py:
 - style-fixes
Additions with file tests/shlib/tool_pip_audit:
 - Implemented Security auditing (SRP)

Additions with file tests/shlib/tool_pip_core:
 - Implemented Core utilities and setup

Additions with file tests/shlib/tool_pip_license:
 - Implemented License checking (SRP)

Additions with file tests/shlib/tool_pip_lock:
 - Implemented Locking mechanism (SRP)

Additions with file tests/shlib/tool_pip_venv:
 - Implemented Virtual environment management (SRP)

Changes in file tests/check_pip:
 - Refactored to align with SOLID principles.
Bumps the development-dependencies group with 1 update: [markdownlint](https://github.com/DavidAnson/markdownlint).


Updates `markdownlint` from 0.36.1 to 0.37.0
- [Changelog](https://github.com/DavidAnson/markdownlint/blob/main/CHANGELOG.md)
- [Commits](DavidAnson/markdownlint@v0.36.1...v0.37.0)

---
updated-dependencies:
- dependency-name: markdownlint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>
…n/master/development-dependencies-0581960d32
Additions with file docs/utils.py:
 - moved validation and formating functions into utilities module.

Changes in file docs/conf.py:
 - moved `_validate_git_ref` function
 - added `sphinx_design` extension
 - improved configuration settings for markdown docs

Changes in file docs/requirements.txt:
 - added `sphinx_design` for documentation building

Changes in file pyproject.toml:
 - aligned tool settings with CEP-7
Additions with file multicast/env.py:
 * Added multicast.env module for environment-based configuration.
 * Updates global defaults when valid overrides are provided

Changes in file multicast/__init__.py:
 * Early related import changes

Changes in file setup.cfg:
 - related changes

Changes in file tests/__init__.py:
 - related changes to test new docstrings
Changes in file tests/shlib/tool_pip_lock:
 - Hashed proper `shlock` tool - CEP-5
Changes in file multicast/__init__.py:
 - just mark a few globals with pragma "skipcq: PYL-W0604"
Changes in file multicast/__init__.py:
 - Minor improvements to documentation.

Changes in file multicast/env.py:
 - Several minor improvements to documentation.
Changes in file multicast/__init__.py:
 - fixed minor regression.

Changes in file multicast/env.py:
 - removed eronious whitespace.
Additions with file .github/workflows/CI-BUILD.yml:
 - New CI/CD workflow for just Build Testing.

Additions with file .github/workflows/CI-DOCS.yml:
 - New CI/CD workflow for just Documentation linting and testing.

Additions with file .github/workflows/CI-MATs.yml:
 - New Home of Minimal Acceptance testing of the project.

Changes in file .github/workflows/Tests.yml:
 - Now only hosts additional EXTRA testing.
@coderabbitai coderabbitai bot mentioned this pull request May 27, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration Tooling Configs Improvements or additions to configuration documentation Improvements or additions to documentation GitHub Anything Meta Multicast Any main project file changes Testing Something can be verified
Projects
None yet
2 participants