From 7856ee01559289e943a26af7e36382855973e485 Mon Sep 17 00:00:00 2001 From: Corey Oordt Date: Wed, 16 Aug 2023 09:49:19 -0500 Subject: [PATCH] Fixed requirements for docs --- Makefile | 7 +++++ .../reference/bumpversion/bumpversion.cli.md | 4 +-- .../bumpversion/bumpversion.config.md | 22 ++++++++++++++++ .../bumpversion/bumpversion.files.md | 26 ++++++++++++++++++- pyproject.toml | 1 + requirements/dev.txt | 11 ++++++++ requirements/docs.txt | 15 ++++++++++- 7 files changed, 82 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 02fd93f9..d7d0092b 100644 --- a/Makefile +++ b/Makefile @@ -35,6 +35,13 @@ docs: ## generate Sphinx HTML documentation, including API docs pubdocs: docs ## Publish the documentation to GitHub ghp-import -op docs + +update-requires: ## Update the requirements.txt file + pip-compile --output-file=requirements/prod.txt pyproject.toml + pip-compile --extra=test --output-file=requirements/test.txt pyproject.toml + pip-compile --extra=docs --output-file=requirements/docs.txt pyproject.toml + pip-compile --extra=dev --extra=docs --extra=test --output-file=requirements/dev.txt pyproject.toml + # # Helper targets. Not meant to use directly # diff --git a/docsrc/reference/bumpversion/bumpversion.cli.md b/docsrc/reference/bumpversion/bumpversion.cli.md index b8a3fdd6..5562c134 100644 --- a/docsrc/reference/bumpversion/bumpversion.cli.md +++ b/docsrc/reference/bumpversion/bumpversion.cli.md @@ -64,7 +64,7 @@ ``` ```` -````{py:function} bump(args: list, config_file: typing.Optional[str], verbose: int, allow_dirty: typing.Optional[bool], current_version: typing.Optional[str], new_version: typing.Optional[str], parse: typing.Optional[str], serialize: typing.Optional[typing.List[str]], search: typing.Optional[str], replace: typing.Optional[str], no_configured_files: bool, ignore_missing_version: bool, dry_run: bool, commit: typing.Optional[bool], tag: typing.Optional[bool], sign_tags: typing.Optional[bool], tag_name: typing.Optional[str], tag_message: typing.Optional[str], message: typing.Optional[str], commit_args: typing.Optional[str], show_list: bool) -> None +````{py:function} bump(args: list, config_file: typing.Optional[str], verbose: int, allow_dirty: typing.Optional[bool], current_version: typing.Optional[str], new_version: typing.Optional[str], parse: typing.Optional[str], serialize: typing.Optional[typing.List[str]], search: typing.Optional[str], replace: typing.Optional[str], no_regex: bool, no_configured_files: bool, ignore_missing_version: bool, dry_run: bool, commit: typing.Optional[bool], tag: typing.Optional[bool], sign_tags: typing.Optional[bool], tag_name: typing.Optional[str], tag_message: typing.Optional[str], message: typing.Optional[str], commit_args: typing.Optional[str], show_list: bool) -> None :canonical: bumpversion.cli.bump ```{autodoc2-docstring} bumpversion.cli.bump @@ -78,7 +78,7 @@ ``` ```` -````{py:function} replace(files: list, config_file: typing.Optional[str], verbose: int, allow_dirty: typing.Optional[bool], current_version: typing.Optional[str], new_version: typing.Optional[str], parse: typing.Optional[str], serialize: typing.Optional[typing.List[str]], search: typing.Optional[str], replace: typing.Optional[str], no_configured_files: bool, ignore_missing_version: bool, dry_run: bool) -> None +````{py:function} replace(files: list, config_file: typing.Optional[str], verbose: int, allow_dirty: typing.Optional[bool], current_version: typing.Optional[str], new_version: typing.Optional[str], parse: typing.Optional[str], serialize: typing.Optional[typing.List[str]], search: typing.Optional[str], replace: typing.Optional[str], no_regex: bool, no_configured_files: bool, ignore_missing_version: bool, dry_run: bool) -> None :canonical: bumpversion.cli.replace ```{autodoc2-docstring} bumpversion.cli.replace diff --git a/docsrc/reference/bumpversion/bumpversion.config.md b/docsrc/reference/bumpversion/bumpversion.config.md index edd9b489..aff2f26e 100644 --- a/docsrc/reference/bumpversion/bumpversion.config.md +++ b/docsrc/reference/bumpversion/bumpversion.config.md @@ -233,6 +233,17 @@ Bases: {py:obj}`pydantic.BaseModel` ```` +````{py:attribute} no_regex +:canonical: bumpversion.config.FileConfig.no_regex +:type: typing.Optional[bool] +:value: > + None + +```{autodoc2-docstring} bumpversion.config.FileConfig.no_regex +``` + +```` + ````{py:attribute} ignore_missing_version :canonical: bumpversion.config.FileConfig.ignore_missing_version :type: typing.Optional[bool] @@ -309,6 +320,17 @@ Bases: {py:obj}`pydantic.BaseSettings` ```` +````{py:attribute} no_regex +:canonical: bumpversion.config.Config.no_regex +:type: bool +:value: > + None + +```{autodoc2-docstring} bumpversion.config.Config.no_regex +``` + +```` + ````{py:attribute} ignore_missing_version :canonical: bumpversion.config.Config.ignore_missing_version :type: bool diff --git a/docsrc/reference/bumpversion/bumpversion.files.md b/docsrc/reference/bumpversion/bumpversion.files.md index 67bcbef8..1a098f05 100644 --- a/docsrc/reference/bumpversion/bumpversion.files.md +++ b/docsrc/reference/bumpversion/bumpversion.files.md @@ -81,6 +81,22 @@ ```{autodoc2-docstring} bumpversion.files.ConfiguredFile.__init__ ``` +````{py:method} get_file_contents() -> str +:canonical: bumpversion.files.ConfiguredFile.get_file_contents + +```{autodoc2-docstring} bumpversion.files.ConfiguredFile.get_file_contents +``` + +```` + +````{py:method} write_file_contents(contents: str) -> None +:canonical: bumpversion.files.ConfiguredFile.write_file_contents + +```{autodoc2-docstring} bumpversion.files.ConfiguredFile.write_file_contents +``` + +```` + ````{py:method} contains_version(version: bumpversion.version_part.Version, context: typing.MutableMapping) -> bool :canonical: bumpversion.files.ConfiguredFile.contains_version @@ -89,7 +105,7 @@ ```` -````{py:method} contains(search: str) -> bool +````{py:method} contains(search: re.Pattern) -> bool :canonical: bumpversion.files.ConfiguredFile.contains ```{autodoc2-docstring} bumpversion.files.ConfiguredFile.contains @@ -105,6 +121,14 @@ ```` +````{py:method} get_search_pattern(context: typing.MutableMapping) -> re.Pattern +:canonical: bumpversion.files.ConfiguredFile.get_search_pattern + +```{autodoc2-docstring} bumpversion.files.ConfiguredFile.get_search_pattern +``` + +```` + ````{py:method} __str__() -> str :canonical: bumpversion.files.ConfiguredFile.__str__ diff --git a/pyproject.toml b/pyproject.toml index b57448cc..a800fdc4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -67,6 +67,7 @@ docs = [ "myst-parser", "furo", "Sphinx>=4.3.0", + "sphinx-autodoc2", "sphinx-autodoc-typehints", "sphinx-click", "sphinx-copybutton", diff --git a/requirements/dev.txt b/requirements/dev.txt index 6b0ef132..6cccbe39 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -8,6 +8,8 @@ alabaster==0.7.13 # via sphinx argopt==0.8.2 # via git-fame +astroid==2.15.6 + # via sphinx-autodoc2 babel==2.12.1 # via sphinx beautifulsoup4==4.12.2 @@ -67,6 +69,8 @@ jinja2==3.1.2 # generate-changelog # myst-parser # sphinx +lazy-object-proxy==1.9.0 + # via astroid linkify-it-py==2.0.2 # via bump-my-version (pyproject.toml) markdown-it-py==3.0.0 @@ -154,6 +158,8 @@ sphinx==7.0.1 # sphinx-copybutton sphinx-autodoc-typehints==1.23.2 # via bump-my-version (pyproject.toml) +sphinx-autodoc2==0.4.2 + # via bump-my-version (pyproject.toml) sphinx-basic-ng==1.0.0b1 # via furo sphinx-click==4.4.0 @@ -180,6 +186,7 @@ tomli==2.0.1 # coverage # pyproject-hooks # pytest + # sphinx-autodoc2 tomlkit==0.11.8 # via bump-my-version (pyproject.toml) tqdm==4.65.0 @@ -188,7 +195,9 @@ typer==0.9.0 # via generate-changelog typing-extensions==4.6.3 # via + # astroid # pydantic + # sphinx-autodoc2 # typer uc-micro-py==1.0.2 # via linkify-it-py @@ -198,6 +207,8 @@ virtualenv==20.23.1 # via pre-commit wheel==0.40.0 # via pip-tools +wrapt==1.15.0 + # via astroid # The following packages are considered to be unsafe in a requirements file: # pip diff --git a/requirements/docs.txt b/requirements/docs.txt index 14c7727d..694fab37 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -6,6 +6,8 @@ # alabaster==0.7.13 # via sphinx +astroid==2.15.6 + # via sphinx-autodoc2 babel==2.12.1 # via sphinx beautifulsoup4==4.12.2 @@ -36,6 +38,8 @@ jinja2==3.1.2 # via # myst-parser # sphinx +lazy-object-proxy==1.9.0 + # via astroid linkify-it-py==2.0.2 # via bump-my-version (pyproject.toml) markdown-it-py==3.0.0 @@ -89,6 +93,8 @@ sphinx==7.0.1 # sphinx-copybutton sphinx-autodoc-typehints==1.23.2 # via bump-my-version (pyproject.toml) +sphinx-autodoc2==0.4.2 + # via bump-my-version (pyproject.toml) sphinx-basic-ng==1.0.0b1 # via furo sphinx-click==4.4.0 @@ -107,11 +113,18 @@ sphinxcontrib-qthelp==1.0.3 # via sphinx sphinxcontrib-serializinghtml==1.1.5 # via sphinx +tomli==2.0.1 + # via sphinx-autodoc2 tomlkit==0.11.8 # via bump-my-version (pyproject.toml) typing-extensions==4.6.3 - # via pydantic + # via + # astroid + # pydantic + # sphinx-autodoc2 uc-micro-py==1.0.2 # via linkify-it-py urllib3==2.0.3 # via requests +wrapt==1.15.0 + # via astroid