-
Notifications
You must be signed in to change notification settings - Fork 2
Version 1.5.0 #118
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
Version 1.5.0 #118
Conversation
…sed (- FIX #57 & #61 -) (- WIP #56 & #62 -) Changes in file README.md: - Added answers to what are the default values. Changes in file multicast/__init__.py: - Resolved #62 for now by changeing the default port to 59595 to comply with RFC-6335 Changes in file setup.cfg: - trivial post-release version update
### ChangeLog: Changes in file .github/labeler.yml: Unknown Changes
[TESTS] prototype config for dependabot Signed-off-by: Mr. Walls <[email protected]> ### ChangeLog: Changes in file .github/dependabot.yml: Unknown Changes
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@v2...v3) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]>
…ns/dot-github/workflows/master/github/codeql-action-3
Changes in file multicast/__main__.py: def doStep(self, *args): Fixed issue #67
Testing out use of bandit for python scanning Signed-off-by: Mr. Walls <[email protected]>
Re-test after syncing with whitelisted settings
Changes in file setup.py: def readFile(filename): - fixed PTC-W6004 by improved input checking
Hopefully this goes well 🙊
This change will test if the fork was updated correctly.
…ciple (- WIP #71 -) Changes in file setup.py: def readFile(filename): - also used to read the requirements.txt file now
### ChangeLog: Changes in file setup.py: def readFile(filename):
Changes in file setup.py: def readFile(filename): - corrected regression by balancing the closing peren )
…e-67-fix' * PR #71 (feature-70-fix): [REGRESSION] fix for typo in setup.py 🙉 [PATCH] Applied changes as disscussed in review (- WIP #71 -) [PATCH] Improves on fix by using function to practice the D.R.Y. principle (- WIP #71 -) [STYLE] Improved input checking durring bootstrap (- WIP #70 -) * PR #68 (feature-bandit): Update .github/workflows/bandit.yml to test auto-fixes Update .github/workflows/bandit.yml to point at own fork Update bandit.yml Create bandit.yml * PR #69 (feature-67-fix): [FIX] Stability fix for error handling (- WIP #67 -) Changes in file .github/workflows/bandit.yml: - New workflow to bandit scan the repo. Changes in file multicast/__main__.py: def doStep(self, *args): - fix for error handling by simplifying use of `Exception.args` Changes in file setup.py: def readFile(filename): - stability and security improvements to bootstrapping.
…xt' manifest (- WIP #60 -) Changes in file .github/dependabot.yml: - also updates tests/requirements.txt via pip now Changes in file .github/labeler.yml: - Updated to label changes to the new tests/requirements.txt manifest correctly Changes in file .github/workflows/Tests.yml: jobs: - refactored to be more consistant regarding dependencies while testing in CI - pins requirements now for testing in CI (already did for production previously) - attempts to install additional python versions for testing by `tox` in CI (experemental) Changes in file Makefile: - minor changes to be consistant with maintained deps manifests Changes in file pyproject.toml: - minor changes to be consistant with maintained deps manifests Changes in file requirements.txt: - minor changes to be more consistant Changes in file setup.cfg: - minor changes to be consistant with maintained deps manifests Changes in file test-requirements.txt & in file tests/requirements.txt: - introduces a record-of-truth for test-code's dependencies as a new manifest for pip Changes in file tox.ini: - major changes to be consistant with new and maintained deps manifests
### ChangeLog: Changes in file tests/MulticastUDPClient.py: def say(self, address, port, conn, msg):
### ChangeLog: Changes in file Makefile: endif
### ChangeLog: Changes in file Makefile: PHONY: cleanup init must_be_root must_have_flake must_have_pytest uninstall clean: clean-docs cleanup endif test-style: cleanup must_have_flake test-tox: cleanup
### ChangeLog: Changes in file tests/requirements.txt: Unknown Changes
### ChangeLog: Changes in file tests/requirements.txt: pytest-flake8>=1.0.7 virtualenv>=15.0.1
* Correct CI warning when CodeClimate is skipped. * Corrected a test-code dependancy (`pytest-flake8` `1.0` --> `1.0.7` )
* From PR #74 (feature-60-test-reqs): [PATCH] Apply suggestions from code review [HOTFIX] fix for some test dependency conflicts (- WIP #60 -) [STYLE] fix for bad whitespace style-testing violation [TESTS] Reconciled testing dependencies via new 'tests/requirements.txt' manifest (- WIP #60 -) * From PR #73 (feature-72-bad-emoji): [DOCUMENTATION] Minor update to project README (- Fixes #72 -)
…ath in the main Makefile (- WIP #77 -) ### ChangeLog: Changes in file Makefile: PHONY: cleanup init must_be_root must_have_flake must_have_pytest uninstall ifeq "$(COMMAND)" "" ifeq "$(LC_CTYPE)" "" must_have_flake:
…-) ### ChangeLog: Changes in file tests/check_legacy_setup_coverage: if [[ ( $(shlock -f ${LOCK_FILE} -p $$ ) -eq 0 ) ]] ; then test -x $(command -v python3) || exit 126 ;
### ChangeLog: Changes in file tests/__init__.py: Unknown Changes Changes in file tests/context.py: Unknown Changes Changes in file tests/profiling.py: def checkpoint(self, name=''): def do_cprofile(func): def do_time_profile(func, timer_name="time_profile"): Changes in file tests/test_basic.py: Unknown Changes Changes in file tests/test_usage.py: Unknown Changes
* from PR #78 (77-refactor-error-suppression): [CONFIGURATION] Added support for setting the default error logging path in the main Makefile (- WIP #77 -) * From PR #82 patch-145-fix-setup-cov: [PATCH] Minor improvements to 'check_legacy_setup_coverage' (- WIP #77 -) * From PR #83 (patch-150-81-test): [TESTS] Testing possible fix for PYL-C0414 (- WIP #80 -) Changes in file Makefile: - New variable 'ERROR_LOG_PATH' allows for improved debugging when configured. Changes in file tests/__init__.py: - Possible fix for PYL-C0414 Changes in file tests/check_legacy_setup_coverage: - Improved variable use allows for improved debugging when configured. Changes in file tests/context.py: - Possible fix for PYL-C0414 Changes in file tests/profiling.py: - Possible fix for PYL-C0414 - Improved documentation slightly Changes in file tests/test_basic.py: - Possible fix for PYL-C0414 Changes in file tests/test_usage.py: - Possible fix for PYL-C0414
…g bootstrap (- WIP #84 -) ### ChangeLog: Changes in file Makefile: PHONY: cleanup init must_be_root must_have_flake must_have_pytest uninstall clean: clean-docs cleanup else test-tox: cleanup
### ChangeLog: Changes in file Makefile: else
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
### ChangeLog: Changes in file tests/test_manifest.py: def setUp(self):
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.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (1)
tests/test_manifest.py (1)
58-79
: Minor improvement for version type checking.The
_get_package_version
method is well-implemented and documented. However, we can simplify the type checking on line 76.Consider replacing the type comparison with the
isinstance
function:- self.assertEqual(type(mcast_version), type(str("")), """Version is not a string.""") + self.assertTrue(isinstance(mcast_version, str), """Version is not a string.""")This change makes the code more idiomatic and slightly more readable.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- tests/test_manifest.py (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
tests/test_manifest.py (1)
Pattern
tests/*
: When reviewing test-code for this project,
- Prioritize portability over clarity, especially when dealing with cross-Python compatibility. However, with the priority in mind, do still consider improvements to clarity when relevant.
- As a general guideline, consider the code-style advocated in the PEP-8 standard (excluding the use of spaces for indentation) and evaluate suggested changes for code-style compliance.
- As a general guideline, try to provide any relevant, official, and supporting documentation links to any tool's suggestions in review comments. This guideline is important for posterity.
- As a project rule, python source files, with names prefixed by the string "test_" and located in the project's "tests" directory, are the project's unit-testing code.
- As a project rule, any files with names prefixed by the string "check_" and located in the project's "tests" directory are the project's non-unit testing code. "Non-unit testing" in this context refers to any type of testing other than unit-testing, such as (but NOT limited to) functional testing, style linting, regression testing, etc. . It can also be assumed that non-unit testing code is usually written as bash shell-scripts.
📓 Learnings (2)
📓 Common learnings
Learnt from: reactive-firewall PR: reactive-firewall/multicast#110 File: docs/CI.md:32-32 Timestamp: 2024-09-17T06:40:42.918Z Learning: Reactive-firewall prefers to keep the word "own" in headings when emphasizing the reader's personal test.
Learnt from: reactive-firewall PR: reactive-firewall/multicast#110 File: docs/USAGE.md:66-66 Timestamp: 2024-09-17T03:38:28.677Z Learning: Reactive-firewall prefers to use "Caveat" as a heading instead of "Caution".
Learnt from: reactive-firewall PR: reactive-firewall/multicast#118 File: tests/check_pip:92-197 Timestamp: 2024-09-24T01:03:10.574Z Learning: Reactive-firewall prefers defining functions before they are called in Bash scripts to avoid errors due to Bash's sequential interpretation.
tests/test_manifest.py (2)
Learnt from: reactive-firewall PR: reactive-firewall/multicast#118 File: tests/test_manifest.py:0-0 Timestamp: 2024-09-25T09:40:27.020Z Learning: In the multicast project's tests, the `checkPythonCommand` function internally calls `checkCovCommand`, which manages `coverage run`. Therefore, it's appropriate to include `coverage run` in the command arguments when using `checkPythonCommand`.
Learnt from: reactive-firewall PR: reactive-firewall/multicast#118 File: tests/test_manifest.py:26-26 Timestamp: 2024-09-21T04:31:08.176Z Learning: In the multicast project, issues related to static analysis warnings from Ruff about unused variables and exception handling are tracked in reactive-firewall/multicast#32 and considered out of scope for individual PRs unless specifically addressed.
Ruff
tests/test_manifest.py
26-26: Local variable
ImportErr
is assigned to but never usedRemove assignment to unused variable
ImportErr
(F841)
40-40: Within an
except
clause, raise exceptions withraise ... from err
orraise ... from None
to distinguish them from errors in exception handling(B904)
🔇 Additional comments not posted (5)
tests/test_manifest.py (5)
43-56
: LGTM: Class setup and initialization.The
TestManifestInclusion
class is well-structured, inheriting fromBasicUsageTestSuite
. ThesetUp
method correctly calls the superclass method and runs a clean command with coverage, which is appropriate for this test suite.
81-110
: LGTM: Robust sdist building and member retrieval.The
_build_sdist_and_get_members
method is well-implemented, with clear documentation and appropriate error handling. It correctly uses coverage run in the build command and effectively retrieves the package version and sdist members.
112-139
: LGTM: Comprehensive test for required files in sdist.The
test_sdist_includes_required_files
method is well-implemented. It correctly uses the helper methods to build the sdist and retrieve the package version. The list of expected files is comprehensive, and the assertion logic is sound.
141-159
: LGTM: Thorough test for exclusion of unwanted files in sdist.The
test_sdist_excludes_unwanted_files
method is well-implemented. It correctly uses the helper methods and follows a consistent pattern with the previous test method. The list of unwanted files covers common cases that should be excluded from the sdist.
163-164
: LGTM: Standard unittest main block.The main block is correctly implemented, allowing the test suite to be run directly if the script is executed as the main program.
* FROM PR #175 (tag 'v2.0.0-rc-4'): This pull request focuses on enhancing the test coverage of the multicast project as part of the ongoing effort to reach comprehensive test coverage outlined in issue [#53](#53). It introduces new test modules, updates existing tests, and refines continuous integration workflows to support the expanded test suite. Additionally, it addresses issues [#117](#117) and [#176](#176) by improving exit code handling and standardizing workflow triggers, respectively. --- - **Purpose**: To test the `CommandExecutionError` exception, ensuring proper handling of error messages and exit codes. - **Key Tests**: - Validates that the exception correctly sets the error message and exit code when provided with specific arguments. - Confirms that the default exit code is `1` when no exit code is specified. - Tests the preservation of the original cause when the exception is raised with a `__cause__`. - **Purpose**: To verify the application's behavior upon receiving a keyboard interrupt (SIGINT). - **Key Tests**: - Ensures graceful shutdown and appropriate exit code (`130`) when a keyboard interrupt is received. - Validates that resources are properly cleaned up after the interrupt. - **Added**: `test_Usage_Error_WHEN_the_help_sub_command_is_called` method. - **Purpose**: To test that the help output for sub-commands (`HEAR`, `RECV`, `SAY`, `NOOP`) displays correct usage information. - **Coverage**: Improves test coverage for command-line interface help options. - **File**: `tests/__init__.py` - **Changes**: - Imported new test modules (`test_exceptions`, `test_hear_keyboard_interrupt`). - Updated `test_cases` to include the new test suites, ensuring they are executed during testing. - **Files**: - `.github/workflows/Tests.yml` - Other workflow files updated accordingly. - **Purpose**: To ensure compatibility with Python 3.13 and future-proof the project. - **Changes**: - Updated the testing matrix to include Python 3.13. - Adjusted jobs to run tests against the new Python version. - **Files**: - `.github/workflows/Tests.yml` - `.github/workflows/Labeler.yml` - `.github/workflows/bandit.yml` - Others. - **Purpose**: To enhance security by defining necessary permissions explicitly for each job in the workflows. - **Changes**: - Set permissions for actions such as reading contents, writing statuses, and accessing pull requests. - Ensured compliance with the principle of least privilege. - **File**: `.github/workflows/Tests.yml` - **Purpose**: To address pip installation issues on Windows platforms within the CI environment. - **Changes**: - Added a step to fix pip installation on Windows, improving the reliability of CI tests across different environments. - **Objective**: Resolves issue [#176](#176) by standardizing branch patterns across all GitHub Action workflows. - **Affected Workflows**: - `.github/workflows/Labeler.yml` - `.github/workflows/bandit.yml` - `.github/workflows/makefile-lint.yml` - `.github/workflows/markdown-lint.yml` - `.github/workflows/yaml-lint.yml` - **Changes**: - Updated `on.push.branches` and `on.pull_request.branches` to include consistent branch patterns (`"main"`, `"master"`, `"stable"`, `"feature-*"`, `"patch-*"`, `"HOTFIX-*"`) across all workflows. - Ensured that workflows are triggered appropriately for all relevant branches. - **File**: `.github/dependabot.yml` - **Changes**: - Added several development dependencies to the `allow` list for the `tests/` directory in the `pip` ecosystem. - **Newly Monitored Dependencies**: - `tox`, `virtualenv`, `flake8`, `pep8`, `pytest`, `pytest-checkdocs`, `pytest-cov`, `pytest-enabler`, `pytest-flake8`, `coverage`. - **Purpose**: - To ensure that these testing and development tools are kept up-to-date automatically. - Enhances security and stability by proactively managing development dependencies. - **File**: `.coveragerc` - **Changes**: - Added `except ImportError` to the exclusion list in the `[report]` section. - **Purpose**: - To exclude `ImportError` exception handling lines from coverage reports. - Focuses coverage metrics on relevant code, improving the accuracy of coverage data. - **Files Affected**: - `multicast/__init__.py` - `multicast/__main__.py` - `multicast/exceptions.py` - `multicast/hear.py` - `multicast/recv.py` - `multicast/send.py` - **Changes**: - Refactored method signatures to accept `**kwargs`, enhancing flexibility. - Improved error handling and resource cleanup. - Standardized import statements and module references. - **Purpose**: - To improve code maintainability and readability. - To prepare the codebase for future enhancements and refactoring. --- - **Connection**: This PR significantly contributes to increasing the test coverage of the multicast project. - **Actions**: - Added new test modules covering exceptions and signal handling. - Enhanced existing tests to cover edge cases and improve robustness. - **Connection**: Lays the groundwork for future refactoring by testing current exit code behaviors. - **Actions**: - Validated the handling of exit codes in various scenarios. - Ensured that default and specific exit codes behave as expected. - **Connection**: This PR closes issue #176 by updating workflow triggers. - **Actions**: - Standardized branch patterns in all GitHub Action workflows. - Improved consistency and predictability of CI/CD processes. - **PR #118**: Previous work on gathering metrics and improving summaries. - **PR #148**: Development of the strategic plan for enhancing PR documentation. --- 1. **[TESTING] Improved test coverage slightly (- WIP #53 -)** - **Changes**: - Initial improvements to test coverage. - Adjustments to test suite configuration. 2. **[TESTING] Implemented `tests/test_exceptions.py` (- WIP #53 -)** - **Changes**: - Added tests for `CommandExecutionError`. - Improved exception handling coverage. 3. **[TESTING] Implemented `tests/test_hear_keyboard_interrupt.py` (- WIP #53 -)** - **Changes**: - Added tests for handling keyboard interrupts. - Ensured proper cleanup after interruption. 4. **[TESTING] Fix for regression** - **Changes**: - Addressed regressions introduced by previous changes. - Stabilized test executions. 5. **[TESTING] Possible fix for regression Part 2 & Part 3** - **Changes**: - Continued efforts to resolve test failures. - Improved compatibility across different operating systems. 6. **[CONFIG] Fix braindead Windows Python pip issue (- WIP PR #175 -)** - **Changes**: - Implemented pip installation workaround for Windows. - Ensured CI tests pass on Windows environments. 7. **[TESTING] Possible fix for Linux `Ctrl+C` tests (- WIP #53 -)** - **Changes**: - Fixed issues with signal handling tests on Linux. - Ensured consistent behavior across platforms. 8. **[CI] Apply suggestions from code review (- WIP #176 -)** - **Changes**: - Incorporated feedback to refine workflow configurations. - Finalized standardization of workflow triggers. --- - **Enhanced Test Coverage**: Moves the project closer to 100% test coverage, improving code reliability and maintainability. - **Cross-Version Support**: Ensures compatibility with the latest Python release (3.13), future-proofing the project. - **Improved CI/CD Processes**: Standardized workflows lead to more reliable and secure continuous integration and deployment pipelines. - **Better Dependency Management**: Proactive monitoring of development dependencies enhances security and stability. - **Foundation for Future Refactoring**: Validated current behaviors to facilitate upcoming changes, particularly in exit code handling. --- This pull request represents a significant step forward in enhancing the robustness and maintainability of the multicast project. By improving test coverage, refining workflows, and laying the groundwork for future enhancements, it contributes to the long-term success and stability of the project. --- * From PR #174 (patch-codeql-lockdown): [UPDATE] Update codeql-analysis.yml with defaults * From PR #173 (feature-add-scorecard-scan): [UPDATE] Version bump scorecard.yml [PATCH] Apply suggestions from code review (- WIP PR #173 -) [FEATURE] Create scorecard.yml ---
Version 1.5.0 Release
This release marks a significant milestone for the multicast project, building upon the foundational work of PR #75 and culminating in the comprehensive enhancements of PR #118. Version 1.5.0 introduces new features, improvements, and fixes that enhance the project's functionality, security, and maintainability.
Summary
Version 1.5.0 is a substantial update that closes numerous issues and integrates changes from multiple pull requests, reflecting extensive development and collaboration efforts. This release focuses on documentation overhaul, code quality improvements, testing enhancements, security upgrades, and build process optimizations.
Major Highlights
1. Documentation Overhaul
README.md
has been overhauled with better introductions, detailed usage examples, and clearer instructions to improve user onboarding. (#104, PRs #112, #110)2. Code Quality and Style Improvements
3. Testing Framework Enhancements
Increased Test Coverage: Added new test suites to improve test coverage and reliability.
tests/requirements.txt
and manage test dependencies effectively. (#60, #100, PRs #106, #107)Continuous Integration (CI) Improvements: Updated CI configurations for consistent and reliable testing environments.
4. Security Enhancements
Dependency Management: Implemented tools and configurations to automate dependency checks and updates.
Security Audits and Tools: Enhanced security through audits and the integration of security tools.
5. Build and Installation Improvements
Makefile Enhancements: Improved the build process with configurable options and better error handling.
Makefile
to allow customizable pip installation flags, enhancing flexibility. (#84, PR #86)Makefile
to aid in debugging and build process transparency. (PR #78)PEP-517 Compliance and Setup Enhancements:
setup.cfg
scripts post-PEP-517 changes to ensure compliance. (#58, PRs #121, #123)parse_requirements
function to validate dependency parsing logic. (PR #127)Closed Issues and Merged Pull Requests
This release closes numerous issues and merges multiple pull requests, demonstrating robust collaboration and development efforts.
Closed Issues:
Merged Pull Requests:
Development Journey
PR Release Candidate v1.4.5-RC #75 as Foundation: PR #75 served as the initial draft for the v1.5.0 release. It laid the groundwork for the subsequent enhancements and fixes that have been integrated into PR #118.
Iterative Improvements: Through extensive discussions, code reviews, and iterations, the project addressed critical issues, implemented new features, and enhanced existing functionalities.
Community Contributions: Collaboration with contributors led to diverse improvements, ranging from documentation updates to significant codebase enhancements.
Future Directions
While this release addresses many key areas, ongoing efforts will focus on:
Additional Linting and Style Enforcement: Continuing to resolve linter warnings and enforce coding standards. (Contributes to #81, #114)
Exit Code Handling Refactoring: Plans to refactor exit code handling mechanisms for better consistency and reliability. (Opens #117)
Dynamic Documentation Links: Working on making branch names dynamic in the
linkcode_resolve
function for documentation. (Opens #113)CEP-5 Documentation: Aiming to document CEP-5 to provide clarity on upcoming changes or features. (Opens #124)
EoL older python: Aiming to deprecate pre-3.9 python versions (inclusive) and take advantage of newer language features like type-hinting and performance improvements.
Related Issues and PRs
- [x] Closes #35 - [x] Closes #54 - [x] Closes #56 - [x] Closes #57 - [x] Closes #58 - [x] Closes #59 - [x] Closes #60 - [x] Closes #61 - [x] Closes #67 - [x] Closes #68 - [x] Closes #70 - [x] Closes #72 - [x] Closes #77 - [x] Closes #79 - [x] Closes #80 - [ ] Contributes to #81 - [x] Closes #84 - [x] Closes #85 - [x] Closes #88 - [x] Closes #89 - [x] Closes #90 - [x] Closes #94 - [x] Closes #96 - [x] Closes #98 - [ ] Opens #99 - [x] Closes #100 - [x] Closes #104 - [x] Closes #108 - [x] Closes #111 - [ ] Opens #113 - [ ] Contributes to #114 - [ ] Opens #117 --- - [x] Includes PR #64 - [x] Includes PR #65 - [x] Includes PR #66 - [x] Includes PR #69 - [x] Includes PR #71 - [x] Includes PR #73 - [x] Includes PR #74 - [x] Supersedes PR #75 - [x] Includes PR #78 - [x] Includes PR #82 - [x] Includes PR #83 - [x] Includes PR #86 - [x] Includes PR #87 - [x] Includes PR #91 - [x] Includes PR #92 - [x] Includes PR #93 - [x] Includes PR #95 - [x] Includes PR #97 - [x] Includes PR #103 - [x] Includes PR #105 - [x] Includes PR #106 - [x] Includes PR #107 - [x] Includes PR #109 - [x] Includes PR #110 - [x] Includes PR #112 - [x] Includes PR #115 - [x] Includes PR #116 ---