nmk-doc 0.1.0__tar.gz → 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nmk-doc
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: Documentation handling plugin for nmk build system
5
5
  Home-page: https://github.com/dynod/nmk-doc
6
6
  Author: The dynod project
@@ -18,7 +18,7 @@ Description: # nmk-doc
18
18
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
19
19
  [![Flake8 analysis result](https://img.shields.io/badge/flake8-0-green)](https://flake8.pycqa.org/)
20
20
  [![Code coverage](https://img.shields.io/codecov/c/github/dynod/nmk-doc)](https://app.codecov.io/gh/dynod/nmk-doc)
21
- [![Documentation Status](https://readthedocs.org/projects/nmk-doc/badge/?version=latest)](https://nmk-doc.readthedocs.io/en/latest/?badge=latest)
21
+ [![Documentation Status](https://readthedocs.org/projects/nmk-doc/badge/?version=stable)](https://nmk-doc.readthedocs.io/en/stable/?badge=stable)
22
22
  <!-- NMK-BADGES-END -->
23
23
 
24
24
  This plugin provide tasks to build documentation using the [Sphinx tool](https://www.sphinx-doc.org/).
@@ -33,7 +33,7 @@ Description: # nmk-doc
33
33
 
34
34
  ## Documentation
35
35
 
36
- This plugin documentation is available [here](https://github.com/dynod/nmk/wiki/nmk-doc-plugin)
36
+ This plugin documentation is available [here](https://nmk-doc.readthedocs.io/en/stable)
37
37
 
38
38
  ## Issues
39
39
 
@@ -10,7 +10,7 @@ Documentation handling plugin for nmk build system
10
10
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
11
11
  [![Flake8 analysis result](https://img.shields.io/badge/flake8-0-green)](https://flake8.pycqa.org/)
12
12
  [![Code coverage](https://img.shields.io/codecov/c/github/dynod/nmk-doc)](https://app.codecov.io/gh/dynod/nmk-doc)
13
- [![Documentation Status](https://readthedocs.org/projects/nmk-doc/badge/?version=latest)](https://nmk-doc.readthedocs.io/en/latest/?badge=latest)
13
+ [![Documentation Status](https://readthedocs.org/projects/nmk-doc/badge/?version=stable)](https://nmk-doc.readthedocs.io/en/stable/?badge=stable)
14
14
  <!-- NMK-BADGES-END -->
15
15
 
16
16
  This plugin provide tasks to build documentation using the [Sphinx tool](https://www.sphinx-doc.org/).
@@ -25,7 +25,7 @@ refs:
25
25
 
26
26
  ## Documentation
27
27
 
28
- This plugin documentation is available [here](https://github.com/dynod/nmk/wiki/nmk-doc-plugin)
28
+ This plugin documentation is available [here](https://nmk-doc.readthedocs.io/en/stable)
29
29
 
30
30
  ## Issues
31
31
 
@@ -15,7 +15,7 @@ exclude =
15
15
  name = nmk-doc
16
16
  author = The dynod project
17
17
  maintainer = The dynod project
18
- version = 0.1.0
18
+ version = 0.2.0
19
19
  long_description = file: README.md
20
20
  long_description_content_type = text/markdown
21
21
  license = Mozilla Public License Version 2.0
@@ -39,7 +39,6 @@ class NmkDocVersionResolver(VersionResolver):
39
39
  Module version accessor
40
40
 
41
41
  :return: current module version
42
- :rtype: str
43
42
  """
44
43
 
45
44
  return __version__
@@ -2,6 +2,6 @@
2
2
  config:
3
3
  badges:
4
4
  - alt: "Documentation Status"
5
- img: https://readthedocs.org/projects/${projectName}/badge/?version=latest
6
- url: https://${projectName}.readthedocs.io/en/latest/?badge=latest
5
+ img: https://readthedocs.org/projects/${projectName}/badge/?version=stable
6
+ url: https://${projectName}.readthedocs.io/en/stable/?badge=stable
7
7
  if: ${docInputs}
@@ -11,15 +11,14 @@ from nmk_base.common import TemplateBuilder
11
11
 
12
12
  class NmkDocConfigBuilder(TemplateBuilder):
13
13
  """
14
- Builder used to generate the **sphinx** config file
14
+ Builder used to generate doc config files
15
15
  """
16
16
 
17
17
  def build(self, template: str):
18
18
  """
19
- Called by the **doc.config** task, to generate the **sphinx** config file
19
+ Called by the **doc.config** and **doc.rtd** tasks, to generate the **sphinx** + **Read The Docs** config files
20
20
 
21
- :param template: Path to the Jinja template for **sphinx** config file -- see **${docConfigTemplate}**
22
- :type template: str
21
+ :param template: Path to the Jinja template to use for generation**
23
22
  """
24
23
 
25
24
  # Just build from template
@@ -36,9 +35,7 @@ class NmkDocSphinxBuilder(NmkTaskBuilder):
36
35
  Called by the **doc.build** task, to build the **sphinx** documentation
37
36
 
38
37
  :param source_folder: doc source folder
39
- :type source_folder: str
40
38
  :param output_folder: doc output folder
41
- :type output_folder: str
42
39
  """
43
40
 
44
41
  # Invoke sphinx
@@ -48,6 +48,12 @@ config:
48
48
  # Doc output folder
49
49
  docOutput: ${outputDir}/doc
50
50
 
51
+ # Config file for ReadTheDocs automated build
52
+ docRTDConfig: ${PROJECTDIR}/.readthedocs.yaml
53
+
54
+ # Template file for ReadTheDocs automated build config
55
+ docRTDConfigTemplate: ${BASEDIR}/templates/readthedocs.yaml.jinja
56
+
51
57
  # Additional venv dependencies (sphinx itself + plugins)
52
58
  venvPkgDeps:
53
59
  - sphinx
@@ -65,12 +71,31 @@ tasks:
65
71
  appendToDeps:
66
72
  - setup
67
73
  if: ${docInputs}
68
- input: ${gitVersionStamp}
74
+ input:
75
+ - ${gitVersionStamp}
76
+ - ${docConfigTemplate}
69
77
  output: ${docConfig}
70
78
  builder: nmk_doc.builders.NmkDocConfigBuilder
71
79
  params:
72
80
  template: ${docConfigTemplate}
73
81
 
82
+ # Generate "Read The Docs" configuration file
83
+ doc.rtd:
84
+ description: Generate ReadTheDocs config file
85
+ emoji: ":open_book:.:pencil:"
86
+ deps:
87
+ - doc.config
88
+ appendToDeps:
89
+ - setup
90
+ if: ${docInputs}
91
+ input:
92
+ - ${docConfig}
93
+ - ${docRTDConfigTemplate}
94
+ output: ${docRTDConfig}
95
+ builder: nmk_doc.builders.NmkDocConfigBuilder
96
+ params:
97
+ template: ${docRTDConfigTemplate}
98
+
74
99
  # Build documentation
75
100
  doc.build:
76
101
  description: Build documentation
@@ -17,4 +17,8 @@ config:
17
17
 
18
18
  # Plugin help links dict
19
19
  nmkPluginsDocs:
20
- nmk-doc: https://github.com/dynod/nmk/wiki/nmk-doc-plugin
20
+ nmk-doc: https://nmk-doc.readthedocs.io/en/stable
21
+
22
+ # Extra VSCode words for CSpell extension
23
+ vscodeSettingsItems:
24
+ cSpell.words: [rtype]
@@ -40,9 +40,7 @@ class NmkDocVersionResolver(NmkStrConfigResolver):
40
40
  * otherwise deduce last tag and increment it with increment configured in **${docVersionIncrement}** config item
41
41
 
42
42
  :param name: config item name to be resolved
43
- :type name: str
44
43
  :return: resolved version
45
- :rtype: str
46
44
  """
47
45
 
48
46
  # Get git version
@@ -97,9 +95,7 @@ class NmkDocYearResolver(NmkIntConfigResolver):
97
95
  Get today's year.
98
96
 
99
97
  :param name: config item name to be resolved
100
- :type name: str
101
98
  :return: current year
102
- :rtype: str
103
99
  """
104
100
 
105
101
  # Today's year
@@ -0,0 +1,22 @@
1
+ # Read the Docs configuration file for Sphinx projects
2
+ # Please don't edit: generated by nmk-doc plugin
3
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4
+
5
+ # Required
6
+ version: 2
7
+
8
+ # Set the OS, Python version and other tools you might need
9
+ build:
10
+ os: ubuntu-22.04
11
+ tools:
12
+ python: "{{ pythonSupportedVersions[-1] }}"
13
+
14
+ # Build documentation directory with Sphinx
15
+ sphinx:
16
+ configuration: {{ docConfig }}
17
+
18
+ # Declare the Python requirements required to build your documentation
19
+ python:
20
+ install:
21
+ - requirements: {{ venvRequirements }}
22
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nmk-doc
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: Documentation handling plugin for nmk build system
5
5
  Home-page: https://github.com/dynod/nmk-doc
6
6
  Author: The dynod project
@@ -18,7 +18,7 @@ Description: # nmk-doc
18
18
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
19
19
  [![Flake8 analysis result](https://img.shields.io/badge/flake8-0-green)](https://flake8.pycqa.org/)
20
20
  [![Code coverage](https://img.shields.io/codecov/c/github/dynod/nmk-doc)](https://app.codecov.io/gh/dynod/nmk-doc)
21
- [![Documentation Status](https://readthedocs.org/projects/nmk-doc/badge/?version=latest)](https://nmk-doc.readthedocs.io/en/latest/?badge=latest)
21
+ [![Documentation Status](https://readthedocs.org/projects/nmk-doc/badge/?version=stable)](https://nmk-doc.readthedocs.io/en/stable/?badge=stable)
22
22
  <!-- NMK-BADGES-END -->
23
23
 
24
24
  This plugin provide tasks to build documentation using the [Sphinx tool](https://www.sphinx-doc.org/).
@@ -33,7 +33,7 @@ Description: # nmk-doc
33
33
 
34
34
  ## Documentation
35
35
 
36
- This plugin documentation is available [here](https://github.com/dynod/nmk/wiki/nmk-doc-plugin)
36
+ This plugin documentation is available [here](https://nmk-doc.readthedocs.io/en/stable)
37
37
 
38
38
  ## Issues
39
39
 
@@ -16,4 +16,5 @@ src/nmk_doc.egg-info/dependency_links.txt
16
16
  src/nmk_doc.egg-info/requires.txt
17
17
  src/nmk_doc.egg-info/top_level.txt
18
18
  src/nmk_doc/templates/__init__.py
19
- src/nmk_doc/templates/config.py.jinja
19
+ src/nmk_doc/templates/config.py.jinja
20
+ src/nmk_doc/templates/readthedocs.yaml.jinja
File without changes
File without changes
File without changes
File without changes