Skip to content
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

Implement package publishing PoC #760

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

arkid15r
Copy link
Collaborator

@arkid15r arkid15r commented Oct 29, 2023

Checklist

  • I have followed the Contributor Guidelines.
  • The code has been thoroughly tested in my local development environment with flake8 and pylint.
  • The code is Python 3 compatible.
  • The code follows the PEP8 styling guidelines with 4 spaces indentation.
  • This Pull Request relates to only one issue or only one feature
  • I have referenced the corresponding issue number in my commit message
  • I have added the relevant documentation.
  • My branch is up-to-date with the Upstream master branch.

Changes proposed in this pull request

I started my work on this PR to address #633. The next step implementation was getting the Nettacker its own PyPI package. So far trusted publish management has been configured for my personal account for both PyPI and Test PyPI platforms. So now the package can be installed using pip install nettacker command (the current version is 0.3.1alpha). The docker image build process has been adjusted to use the published package.

As a part of poetry setup I moved source code to src/nettacker directory (this is why 750 files are shown as changed). The number of actually changed files is way smaller and they mostly include the following changes:

  • file and import paths adjustments according to the new src/nettacker project structure
  • .github CI/CD configuration (tests and publishing)
  • Dockerfile refactoring to use PyPI package
  • dependencies are now a part of pyproject.toml

I added pytest support and fixed existing tests:

  • as a part of PoC I added top_1000_common_passwords test to check the password for uniqueness
  • the dictionary sort test didn't make sense and has been rewritten (it used unittest::assertDictEqual method which doesn't check for dict keys order)
  • the select_maximum_cpu_core test has been changed to use a mock (it was failing on the GH when I ran it first), and the method itself has been refactored a bit

The next steps:

  • test the publishing workflow using jobs with sufficient permissions (it went smoothly end to end using my personal GH repository and Docker registry)
  • figure out the preferred way of work with docker in dev environment
  • update wiki documentation
  • add project leaders as owners to PyPI platforms
  • address any suggestions/comments from project leaders and PR reviewers

@arkid15r arkid15r changed the title Implement package publishing PoC WIP: Implement package publishing PoC Oct 29, 2023
@arkid15r arkid15r changed the title WIP: Implement package publishing PoC Implement package publishing PoC Oct 29, 2023
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.

None yet

1 participant