Skip to content

feat(python3-nethsec): move library and its tests into this repo - #1826

Merged
gsanchietti merged 7 commits into
mainfrom
integrate-python3-nethsec
Aug 3, 2026
Merged

gsanchietti merged 7 commits into
mainfrom
integrate-python3-nethsec

Conversation

@gsanchietti

@gsanchietti gsanchietti commented Jul 24, 2026 •

Copy link
Copy Markdown
Member

What

Moves the nethsec Python library (previously the external NethServer/python3-nethsec repo) fully into this repository.

  • The nethsec wheel now builds from local source under packages/python3-nethsec/src — no more external fetch.
  • Brings the library's tests, test container, and security scans in as GitHub Actions, scoped to this package.
  • The library's API reference is now generated inside the existing Build documentation workflow and published under the docs site at /apidocs/python3-nethsec/.

Why

Keeps the library, its tests, and its checks in one place so changes here are tested and documented here.

Checks

  • python3-nethsec-tests — runs the test suite; builds the test image locally when missing (no registry dependency).
  • python3-nethsec-test-image — builds and publishes the test image for reuse.
  • python3-nethsec-scans — Trivy SBOM and report.
  • API docs folded into the existing Build documentation workflow (the standalone apidocs workflow was removed).

Verified

  • Test image builds; 244 tests pass (locally and in CI).
  • Wheel builds from local source → nethsec-1.7.1-py3-none-any.whl.
  • pydoctor generates the API HTML cleanly.
  • Full OpenWrt image build passed in CI.

Notes for reviewers

  • Version bumps now need both Makefile PKG_VERSION and setup.py version (documented in the package README).
  • Retiring the old upstream repo is a separate follow-up.

@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

nethsecurity-api code is now inside this repo
Build the nethsec wheel from local source instead of fetching it from
the old external repo, and bring its tests, test image, docs, and scans
in as GitHub Actions scoped to this package.

Assisted-by: Claude Code:claude-opus-4-8[1m]
The tests could not pull the published test image (private and not
tagged for the branch), so build it locally when it is missing instead.

Assisted-by: Claude Code:claude-opus-4-8[1m]
Generate the python3-nethsec API reference inside the existing
documentation build and drop the separate workflow.

Assisted-by: Claude Code:claude-opus-4-8[1m]
Building the site now needs a Ruby container (host Ruby 4.x cannot build
the pinned gems) and a pydoctor step for the python3-nethsec API docs.

Assisted-by: Claude Code:claude-opus-4-8[1m]
@gsanchietti
gsanchietti force-pushed the integrate-python3-nethsec branch from f0a997a to ba620a6 Compare August 3, 2026 08:20
@gsanchietti
gsanchietti requested a review from Tbaile August 3, 2026 08:20
@gsanchietti
gsanchietti marked this pull request as ready for review August 3, 2026 08:20
setup.py hardcoded its own version, duplicating PKG_VERSION in the
Makefile and requiring both to stay in sync. Read it from an env var
injected by the OpenWrt build instead.

Assisted-by: Claude Code:claude-sonnet-5
@gsanchietti
gsanchietti force-pushed the integrate-python3-nethsec branch from 27bb8a4 to f526b79 Compare August 3, 2026 11:06

@Tbaile Tbaile left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd take the chance to remove the image upload and make the build re-create it every time, we lose a troublesome side that is not fully used at the moment

The test image published to ghcr.io was unused: the tests workflow builds
it locally. Remove the publish workflow and builder/build.sh, and rebuild
the image from the Containerfile on every test.sh run so a changed
Containerfile is never shadowed by a stale local image.

Assisted-by: Claude Code:claude-opus-5[1m]
@gsanchietti
gsanchietti force-pushed the integrate-python3-nethsec branch from f526b79 to 1050ed8 Compare August 3, 2026 13:04
@gsanchietti

Copy link
Copy Markdown
Member Author

I'd take the chance to remove the image upload and make the build re-create it every time, we lose a troublesome side that is not fully used at the moment

I agree: removed.

@gsanchietti
gsanchietti merged commit bce4938 into main Aug 3, 2026
7 checks passed
@gsanchietti
gsanchietti deleted the integrate-python3-nethsec branch August 3, 2026 13: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.

3 participants