From 963689be68849a00a04b11f09315edbcc6a57bbd Mon Sep 17 00:00:00 2001 From: gmuloc Date: Wed, 19 Jul 2023 16:18:46 +0200 Subject: [PATCH 1/4] chore: Replace bumpversion with bumpver --- .bumpversion.cfg | 20 -------------------- anta/__init__.py | 2 +- docs/requirements-and-installation.md | 2 +- pyproject.toml | 19 ++++++++++++++++++- 4 files changed, 20 insertions(+), 23 deletions(-) delete mode 100644 .bumpversion.cfg diff --git a/.bumpversion.cfg b/.bumpversion.cfg deleted file mode 100644 index 42ccd7892..000000000 --- a/.bumpversion.cfg +++ /dev/null @@ -1,20 +0,0 @@ -[bumpversion] -current_version = 0.6.0 -commit = True -tag = True -parse = (?P\d+)\.(?P\d+)\.(?P\d+)(\-(?P[a-z]+))? -serialize = - {major}.{minor}.{patch}-{release} - {major}.{minor}.{patch} - -[bumpversion:part:build] -first_value = 1 - -[bumpversion:file:anta/__init__.py] - -[bumpversion:part:release] -optional_value = gamma -values = - dev - beta - gamma diff --git a/anta/__init__.py b/anta/__init__.py index c87b71567..16ab8649f 100644 --- a/anta/__init__.py +++ b/anta/__init__.py @@ -4,7 +4,7 @@ import importlib.metadata import os -__version__ = importlib.metadata.version("anta") +__version__ = f"v{importlib.metadata.version('anta')}" __credits__ = [ "Angélique Phillipps", "Colin MacGiollaEáin", diff --git a/docs/requirements-and-installation.md b/docs/requirements-and-installation.md index 340c4292f..906c49812 100644 --- a/docs/requirements-and-installation.md +++ b/docs/requirements-and-installation.md @@ -50,7 +50,7 @@ which anta # Chck ANTA version anta --version -anta, version 0.6.0 +anta, version v0.6.0 ``` ## EOS Requirements diff --git a/pyproject.toml b/pyproject.toml index 7ad2d507d..d4f06181b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,7 +50,7 @@ requires-python = ">=3.8" [project.optional-dependencies] dev = [ - "bump2version==1.0.1", + "bumpver==2023.1125", "black==23.3.0", "flake8==6.0.0", "isort==5.10.1", @@ -100,6 +100,23 @@ anta = "anta.cli:cli" include = ["anta*"] namespaces = false +################################ +# Version +################################ +[tool.bumpver] +current_version = "0.6.0" +version_pattern = "MAJOR.MINOR.PATCH" +commit_message = "bump: Version {old_version} -> {new_version}" +commit = true +# No tag +tag = false +push = false + +[tool.bumpver.file_patterns] +"pyproject.toml" = ['current_version = "{version}"', 'version = "v{version}"'] +"docs/contribution.md" = ["anta {version}"] +"docs/requirements-and-installation.md " = ["anta, version v{version}"] + ################################ # Linting ################################ From 48d21c1a8ae9ab52dd838d353ae204ae79096480 Mon Sep 17 00:00:00 2001 From: gmuloc Date: Wed, 19 Jul 2023 16:24:12 +0200 Subject: [PATCH 2/4] ci: Rename devel to main for doc --- .github/workflows/{devel-doc.yml => main-doc.yml} | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename .github/workflows/{devel-doc.yml => main-doc.yml} (74%) diff --git a/.github/workflows/devel-doc.yml b/.github/workflows/main-doc.yml similarity index 74% rename from .github/workflows/devel-doc.yml rename to .github/workflows/main-doc.yml index 531b4e26e..5095e627e 100644 --- a/.github/workflows/devel-doc.yml +++ b/.github/workflows/main-doc.yml @@ -1,5 +1,5 @@ --- -# This is deploying the latest commits on main to devel documentation +# This is deploying the latest commits on main to main documentation name: Mkdocs on: push: @@ -13,7 +13,7 @@ on: jobs: 'build_latest_doc': - name: 'Update Public devel documentation' + name: 'Update Public main documentation' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -30,9 +30,9 @@ jobs: git config --global user.name 'github-actions[bot]' git config --global user.email 'github-actions[bot]@users.noreply.github.com' - - name: 'Build mkdocs content and deploy to gh-pages to devel' + - name: 'Build mkdocs content and deploy to gh-pages to main' run: | pip install .[doc] - mike deploy --push devel + mike deploy --push main # This may not always be required - mike set-default --push devel + mike set-default --push main From 205e6aa046009135b83123b8fe19277702ea1112 Mon Sep 17 00:00:00 2001 From: gmuloc Date: Wed, 19 Jul 2023 16:29:23 +0200 Subject: [PATCH 3/4] doc: Fix README.md --- README.md => docs/README.md | 0 docs/index.md | 1 - imgs | 1 - mkdocs.yml | 3 +-- 4 files changed, 1 insertion(+), 4 deletions(-) rename README.md => docs/README.md (100%) delete mode 100644 docs/index.md delete mode 120000 imgs diff --git a/README.md b/docs/README.md similarity index 100% rename from README.md rename to docs/README.md diff --git a/docs/index.md b/docs/index.md deleted file mode 100644 index 4ab0748ee..000000000 --- a/docs/index.md +++ /dev/null @@ -1 +0,0 @@ ---8<-- "README.md" \ No newline at end of file diff --git a/imgs b/imgs deleted file mode 120000 index e837f5eed..000000000 --- a/imgs +++ /dev/null @@ -1 +0,0 @@ -docs/imgs \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index c5598700e..e86c45b3a 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -139,7 +139,6 @@ markdown_extensions: baselevel: 3 - pymdownx.highlight - pymdownx.superfences - - pymdownx.snippets - pymdownx.superfences - pymdownx.tabbed: alternate_style: true @@ -147,7 +146,7 @@ markdown_extensions: # TOC docs_dir: docs/ nav: - - Home: index.md + - Home: README.md - Getting Started: getting-started.md - Installation: requirements-and-installation.md - Inventory & Tests catalog: usage-inventory-catalog.md From c2b00d7b8b64456957ac4aa69cef40b4bc12ec81 Mon Sep 17 00:00:00 2001 From: gmuloc Date: Wed, 19 Jul 2023 16:36:59 +0200 Subject: [PATCH 4/4] doc: Remove clickable image from README.md --- docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index 102fee205..2d1b54938 100755 --- a/docs/README.md +++ b/docs/README.md @@ -54,7 +54,7 @@ Commands: nrfu Run NRFU against inventory devices ``` -[![anta nrfu table output](imgs/anta-nrfu-table-output.png){ loading=lazy width="1600" }](imgs/anta-nrfu-table-output.png) +![anta nrfu table output](imgs/anta-nrfu-table-output.png) ## Documentation