Skip to content

Commit

Permalink
Clean and refactor codebase
Browse files Browse the repository at this point in the history
- Removed unused/old modules/files
- Splited mkdocs_macro.py
- Moved datafiles to pulp_docs/data
- Added some docstrings
  • Loading branch information
pedro-psb committed Dec 28, 2023
1 parent 693dba1 commit 4a0a250
Show file tree
Hide file tree
Showing 198 changed files with 231 additions and 506,295 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pulp-docs = "pulp_docs.main:main"
include-package-data=true

[tool.setuptools.package-data]
pulp_docs = ["mkdocs.yml", "docs/"]
pulp_docs = ["data/**"]

[tool.setuptools.packages.find]
where = ["src"]
Expand Down
210 changes: 0 additions & 210 deletions scripts/build_docs-deprecated.py

This file was deleted.

22 changes: 0 additions & 22 deletions scripts/download-latest-gh-release.sh

This file was deleted.

12 changes: 0 additions & 12 deletions scripts/update-repos.sh

This file was deleted.

File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/pulp_docs/mkdocs.yml → src/pulp_docs/data/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ theme:
plugins:
- search
- macros:
module_name: 'mkdocs_macros'
module_name: '../mkdocs_macros'
- tags:
tags_file: pulp-docs/tags.md
- mkdocstrings:
Expand Down
File renamed without changes.
61 changes: 0 additions & 61 deletions src/pulp_docs/fetch_repos.py

This file was deleted.

9 changes: 6 additions & 3 deletions src/pulp_docs/main.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
"""
The main CLI module.
It defines its interface.
"""
import subprocess
import sys
from pathlib import Path

import click
from importlib_resources import files

from pulp_docs.fetch_repos import LocalRepo, download_repos

TMP_DIR = Path("tmp")
WORKDIR = Path.home() / "workspace" / "multirepo-prototype"

Expand All @@ -19,7 +22,7 @@ class Config:
def __init__(self):
self.verbose = False
self.workdir = Path()
self.mkdocs_file = files("pulp_docs").joinpath("mkdocs.yml")
self.mkdocs_file = files("pulp_docs").joinpath("data/mkdocs.yml")


pass_config = click.make_pass_decorator(Config, ensure=True)
Expand Down
Loading

0 comments on commit 4a0a250

Please sign in to comment.