From 968a068db465a2ac2f411305590236777ad1a690 Mon Sep 17 00:00:00 2001 From: CJ Steiner Date: Tue, 7 Jan 2025 07:44:31 -0600 Subject: [PATCH 1/2] docs fixes: get working again * fix moving of rules_for_contributors to CONTRIBUTING.md made in 99cacc3efbdcac4aa02d682c7e88e6e6009f36c0 which broke the docs * remove easy_install reference, deprecated * fix invalid syntax errors --- doc/source/conf.py | 3 ++- doc/source/contributing.rst | 5 +++++ doc/source/index.rst | 11 ++--------- jenkinsapi/build.py | 3 +-- test-requirements.txt | 1 + 5 files changed, 11 insertions(+), 12 deletions(-) create mode 100644 doc/source/contributing.rst diff --git a/doc/source/conf.py b/doc/source/conf.py index 0384b71b..3f10af3e 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -45,13 +45,14 @@ "sphinx.ext.autodoc", "sphinx.ext.doctest", "sphinx.ext.viewcode", + "myst_parser", ] # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] # The suffix of source filenames. -source_suffix = ".rst" +source_suffix = [".rst", ".md"] # The encoding of source files. # source_encoding = 'utf-8-sig' diff --git a/doc/source/contributing.rst b/doc/source/contributing.rst new file mode 100644 index 00000000..2232a542 --- /dev/null +++ b/doc/source/contributing.rst @@ -0,0 +1,5 @@ +Contributing +============ + +```{include} ../CONTRIBUTING.md +``` diff --git a/doc/source/index.rst b/doc/source/index.rst index 6389db22..cfa6dcf7 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -24,8 +24,7 @@ Sections api artifact build - using_jenkinsapi - rules_for_contributors + contributing Important Links --------------- @@ -53,14 +52,8 @@ Most users can do the following: pip install jenkinsapi -Or.. - -.. code-block:: bash - - easy_install jenkinsapi - * In Jenkins > 1.518 you will need to disable "Prevent Cross Site Request Forgery exploits". - * Remember to set the Jenkins Location in general settings - Jenkins' REST web-interface will not work if this is set incorrectly. + * Remember to set the Jenkins Location in general settings - Jenkins REST web-interface will not work if this is set incorrectly. Examples -------- diff --git a/jenkinsapi/build.py b/jenkinsapi/build.py index 3134d521..5e8d97e0 100644 --- a/jenkinsapi/build.py +++ b/jenkinsapi/build.py @@ -527,8 +527,7 @@ def get_estimated_duration(self) -> int | None: def stop(self) -> bool: """ Stops the build execution if it's running - :return boolean True if succeded False otherwise or the build - is not running + :return: boolean True if succeeded False otherwis """ if self.is_running(): url: str = "%s/stop" % self.baseurl diff --git a/test-requirements.txt b/test-requirements.txt index 0d07d562..efc2b376 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -6,6 +6,7 @@ astroid>=1.4.8 pylint>=1.7.1 tox>=2.3.1 mock +myst-parser codecov requests_kerberos flake8 From 66961bc3943b3db259e21a0aa61c72557fb8c870 Mon Sep 17 00:00:00 2001 From: CJ Steiner Date: Tue, 7 Jan 2025 12:26:27 -0600 Subject: [PATCH 2/2] remove md from extensions --- doc/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index dc0959ec..1b1f4148 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -50,7 +50,7 @@ templates_path = ["_templates"] # The suffix of source filenames. -source_suffix = [".rst", ".md"] +source_suffix = ".rst" # The encoding of source files. # source_encoding = 'utf-8-sig'