-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Initial commit #1
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 pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
|
We don't publish DEVs .whl. |
1 similar comment
|
We don't publish DEVs .whl. |
|
We don't publish DEVs .whl. |
1 similar comment
|
We don't publish DEVs .whl. |
|
We don't publish DEVs .whl. |
1 similar comment
|
We don't publish DEVs .whl. |
|
We don't publish DEVs .whl. |
1 similar comment
|
We don't publish DEVs .whl. |
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 initial commit adds the core mfd-sysctl implementation, accompanying tests, documentation scaffolding, and CI/CD workflows.
- Introduces
Sysctlbase class with Linux and FreeBSD subclasses and full API surface - Adds unit tests for both Linux and FreeBSD implementations
- Sets up Sphinx-based documentation and reusable GitHub Actions workflows
Reviewed Changes
Copilot reviewed 31 out of 35 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/unit/test_mfd_sysctl/test_mfd_sysctl_linux.py | Adds Linux-specific unit tests for LinuxSysctl |
| mfd_sysctl/linux.py | Implements LinuxSysctl methods: busy_poll, buffer sizing, IPv6 |
| examples/simple_example.py | Provides a simple example demonstrating the Sysctl API |
| sphinx-doc/conf.py | Adds Sphinx configuration for generating module documentation |
Comments suppressed due to low confidence (4)
examples/simple_example.py:16
get_sysctl_valueis only implemented in the FreeBSD subclass, so calling it on aLinuxSysctlinstance will result in anAttributeError. Either add equivalents to the Linux subclass or adjust the example to use Linux-only methods.
print(sysctl_obj.get_sysctl_value("dev.igb.0.fc"))
sphinx-doc/conf.py:43
- [nitpick]
autodoc_default_flagsis deprecated in newer Sphinx versions; consider usingautodoc_default_optionsto prevent deprecation warnings.
autodoc_default_flags = ["members", "undoc-members", "private-members", "inherited-members", "show-inheritance"]
tests/unit/test_mfd_sysctl/test_mfd_sysctl_linux.py:34
- Calling
mocker.stopall()inside the fixture will undo all test patches before the tests run, which may cause real code execution instead of using mocks. Consider removing this call or moving cleanup to a fixture finalizer so that the patches remain active during tests.
mocker.stopall()
mfd_sysctl/linux.py:58
- The sysctl variables should use dot notation (e.g.
net.core.rmem_max) rather than slash separators, otherwise the commands will fail on Linux.
core_buffers = ("net/core/rmem_max", "net/core/wmem_max")
This pull request introduces significant updates to the repository, including new workflows, documentation improvements, and code examples. The most important changes involve the addition of reusable GitHub Actions workflows for CI/CD, enhanced documentation files, and a simple example demonstrating the usage of the
mfd-sysctlmodule.Workflow Enhancements:
.github/workflows/build_upload_whl.yml: Added a reusable workflow for building and optionally uploading Python.whlpackages to PyPI. This includes steps for version bumping, unit and functional testing, and publishing packages..github/workflows/codeql.yml: Introduced a CodeQL workflow for advanced static code analysis, supporting multiple languages including Python..github/workflows/manual_release.yml: Added a manual release workflow that supports multiple Python versions and handles package uploads and git tag pushes..github/workflows/pull_requests.yml: Created a workflow for pull request builds, focusing on development builds for Python versions 3.10 and 3.13.Documentation Updates:
AUTHORS.md: Added a list of contributors to the project.CONTRIBUTING.md: Updated the project name and license reference for contributors.LICENSE.md: Added the MIT license file for the project.README.md: Provided detailed usage instructions, supported methods, enums, constants, and supported operating systems for themfd-sysctlmodule.Code Examples:
examples/simple_example.py: Introduced a simple example demonstrating various functionalities of themfd-sysctlmodule, such as retrieving sysctl values, setting configurations, and interacting with network adapters.