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

[EPIC] Pos repository migration to Pulp organization #17

Open
pedro-psb opened this issue Feb 20, 2024 · 0 comments
Open

[EPIC] Pos repository migration to Pulp organization #17

pedro-psb opened this issue Feb 20, 2024 · 0 comments
Labels
enhancement New feature or request refactor

Comments

@pedro-psb
Copy link
Member

pedro-psb commented Feb 20, 2024

To make this package more maintanable (by other people other than me), I'll keep track of some refactors and improvements that would be nice to have before moving this to Pulp organization.

Refactors

Navigation

  • Don't use string based content-definition (e.g. "{repo}/docs/user/{content}") link
    • Reason: This requires unnecessary string-parsing/conversion steps that clutter the code without any obvious benefit.
    • Alternative: Switch to dataclass-based declaration
  • Better constants/options/enums organization (related to the previous one)
    • Reason: There is a set of identifier options for persona, content-categories and repo-types, and they have related display names in the docs. This relation should be globally defined
    • Alternative: Use enums or similar scoped classes consistently

Repositories

  • Decouple Report from Repo (move this out)
    • Reason: this info is not used by Repo instances (unnecessarily bloats the class) and makes it confusing to handle reports.
    • Alternative: move it to another object dedicated to reports
  • Re-model Repos, Repo, SubPackages to better separate concerns
    • Reason: With subpackages, the concern of handling repositories (info required for download, path, etc) were mixed with package concerns (display name, relative location in a repository)
    • Alternative: implement Repo and Package (a generalization of subpackages and single-package repo) with this separation of concerns.
  • Create PackagesHandler to be responsible for handling the process of download -> placement -> installation
    • I need to better define those steps conceptually so its easier to understand what is happening and each stage.
  • Remove hardcoded test fixture from codebase here.
    • Reason: that's a code smell that the code is not very testable
    • Alternative: consolidate repolist.yml overriding and use that in the tests.

Testing

  • Unit:
    • AggregationUtils: related to generating nav structures parametrically
    • Repository: related to download and source file placement
    • Package: related to docs file placement, because more than one docs can live in the same source
    • General Utils: not much here
  • Functional (no download from network or external API hits):
    • Building
    • Serving (how?)
    • Caching
    • Automatic local-checkout discovery
    • Navigation rendering (selenium or similar)
  • Integration (hits the network)
    • Sanity production check

Docs

  • Generated Reference (mkdocstrings)
  • Onboarding page: Architecture, concepts general data-flow
@pedro-psb pedro-psb added refactor enhancement New feature or request labels Feb 20, 2024
@pedro-psb pedro-psb changed the title [EPIC] General Refactors [EPIC] Pre Pulp-Org repository migration Feb 20, 2024
@pedro-psb pedro-psb changed the title [EPIC] Pre Pulp-Org repository migration [EPIC] Pre repository migration to Pulp organization Feb 20, 2024
@pedro-psb pedro-psb changed the title [EPIC] Pre repository migration to Pulp organization [EPIC] Pos repository migration to Pulp organization Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactor
Projects
None yet
Development

No branches or pull requests

1 participant