From 71568018f42af3b246ec592d9b08a9aec4cced02 Mon Sep 17 00:00:00 2001 From: Craig Hobbs Date: Wed, 3 Apr 2024 16:25:16 -0700 Subject: [PATCH] convert docs to markdown --- template/Makefile | 6 +++ template/README.md | 5 ++- template/README.rst | 40 ------------------- template/doc/conf.py | 3 +- template/doc/index.md | 9 +++++ template/doc/index.rst | 13 ------ template/doc/{reference.rst => reference.md} | 8 ++-- template/python-template.txt | 2 - template/setup.cfg | 5 --- test-expected/noapi-0-nomain-0/Makefile | 6 +++ test-expected/noapi-0-nomain-0/README.md | 24 +++++++++++ test-expected/noapi-0-nomain-0/README.rst | 40 ------------------- test-expected/noapi-0-nomain-0/doc/conf.py | 3 +- test-expected/noapi-0-nomain-0/doc/index.md | 9 +++++ test-expected/noapi-0-nomain-0/doc/index.rst | 13 ------ .../noapi-0-nomain-0/doc/reference.md | 8 ++++ .../noapi-0-nomain-0/doc/reference.rst | 8 ---- test-expected/noapi-0-nomain-0/setup.cfg | 4 +- test-expected/noapi-nomain/Makefile | 2 + test-expected/noapi/Makefile | 2 + test-expected/nomain/Makefile | 6 +++ test-expected/nomain/README.md | 24 +++++++++++ test-expected/nomain/README.rst | 40 ------------------- test-expected/nomain/doc/conf.py | 3 +- test-expected/nomain/doc/index.md | 9 +++++ test-expected/nomain/doc/index.rst | 13 ------ test-expected/nomain/doc/reference.md | 8 ++++ test-expected/nomain/doc/reference.rst | 8 ---- test-expected/nomain/setup.cfg | 4 +- test-expected/required/Makefile | 6 +++ test-expected/required/README.md | 24 +++++++++++ test-expected/required/README.rst | 40 ------------------- test-expected/required/doc/conf.py | 3 +- test-expected/required/doc/index.md | 9 +++++ test-expected/required/doc/index.rst | 13 ------ test-expected/required/doc/reference.md | 8 ++++ test-expected/required/doc/reference.rst | 8 ---- test-expected/required/setup.cfg | 4 +- 38 files changed, 182 insertions(+), 258 deletions(-) delete mode 100644 template/README.rst create mode 100644 template/doc/index.md delete mode 100644 template/doc/index.rst rename template/doc/{reference.rst => reference.md} (59%) create mode 100644 test-expected/noapi-0-nomain-0/README.md delete mode 100644 test-expected/noapi-0-nomain-0/README.rst create mode 100644 test-expected/noapi-0-nomain-0/doc/index.md delete mode 100644 test-expected/noapi-0-nomain-0/doc/index.rst create mode 100644 test-expected/noapi-0-nomain-0/doc/reference.md delete mode 100644 test-expected/noapi-0-nomain-0/doc/reference.rst create mode 100644 test-expected/nomain/README.md delete mode 100644 test-expected/nomain/README.rst create mode 100644 test-expected/nomain/doc/index.md delete mode 100644 test-expected/nomain/doc/index.rst create mode 100644 test-expected/nomain/doc/reference.md delete mode 100644 test-expected/nomain/doc/reference.rst create mode 100644 test-expected/required/README.md delete mode 100644 test-expected/required/README.rst create mode 100644 test-expected/required/doc/index.md delete mode 100644 test-expected/required/doc/index.rst create mode 100644 test-expected/required/doc/reference.md delete mode 100644 test-expected/required/doc/reference.rst diff --git a/template/Makefile b/template/Makefile index d4cb53b..8b1ffc1 100644 --- a/template/Makefile +++ b/template/Makefile @@ -12,12 +12,18 @@ WGET_CMD = if which wget; then wget -q -c $(1); else curl -f -Os $(1); fi $(eval $(call WGET, https://raw.githubusercontent.com/craigahobbs/python-build/main/Makefile.base)) $(eval $(call WGET, https://raw.githubusercontent.com/craigahobbs/python-build/main/pylintrc)) {% if noapi is not defined or not noapi %} + # Sphinx documentation directory SPHINX_DOC := doc + +# Development dependencies +TESTS_REQUIRE := bare-script myst-parser {% endif %} + # Include python-build include Makefile.base + clean: rm -rf Makefile.base pylintrc{% if noapi is defined and noapi %} diff --git a/template/README.md b/template/README.md index b192613..a000dc6 100644 --- a/template/README.md +++ b/template/README.md @@ -10,7 +10,10 @@ Coming soon! ## Links -- [Source code](https://github.com/{{github}}/{{package}}) +{% if noapi is not defined or not noapi -%} +- [API Documentation](https://{{github}}.github.io/{{package}}/) +{% endif -%} + - [Source code](https://github.com/{{github}}/{{package}}) ## Development diff --git a/template/README.rst b/template/README.rst deleted file mode 100644 index 62f99e1..0000000 --- a/template/README.rst +++ /dev/null @@ -1,40 +0,0 @@ -{{package}} -{{ '=' * (package | length) }} - -.. |badge-status| image:: https://img.shields.io/pypi/status/{{package}} - :alt: PyPI - Status - :target: https://pypi.python.org/pypi/{{package}}/ - -.. |badge-version| image:: https://img.shields.io/pypi/v/{{package}} - :alt: PyPI - :target: https://pypi.python.org/pypi/{{package}}/ - -.. |badge-license| image:: https://img.shields.io/github/license/{{github}}/{{package}} - :alt: GitHub - :target: https://github.com/{{github}}/{{package}}/blob/main/LICENSE - -.. |badge-python| image:: https://img.shields.io/pypi/pyversions/{{package}} - :alt: PyPI - Python Version - :target: https://www.python.org/downloads/ - -|badge-status| |badge-version| |badge-license| |badge-python| - -Coming soon! - - -Links ------ - -- `API Documentation `__ -- `Source code `__ - - -Development ------------ - -This package is developed using `python-build `__. -It was started using `python-template `__ as follows: - -.. code-block:: sh - - template-specialize python-template/template/ {{package}}/ -k package {{package}} -k name '{{name}}' -k email '{{email}}' -k github '{{github}}'{% if noapi is defined and noapi %} -k noapi 1{% endif %}{% if nomain is defined and nomain %} -k nomain 1{% endif %} diff --git a/template/doc/conf.py b/template/doc/conf.py index c058831..66fc013 100644 --- a/template/doc/conf.py +++ b/template/doc/conf.py @@ -38,7 +38,8 @@ 'sphinx.ext.autosectionlabel', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', - 'sphinx.ext.githubpages' + 'sphinx.ext.githubpages', + 'myst_parser' ] # Add any paths that contain templates here, relative to this directory. diff --git a/template/doc/index.md b/template/doc/index.md new file mode 100644 index 0000000..5d6d816 --- /dev/null +++ b/template/doc/index.md @@ -0,0 +1,9 @@ +~~~ {include} ../README.md +~~~ + +~~~ {toctree} +:maxdepth: 2 +:hidden: + +reference +~~~ diff --git a/template/doc/index.rst b/template/doc/index.rst deleted file mode 100644 index 15d6e5b..0000000 --- a/template/doc/index.rst +++ /dev/null @@ -1,13 +0,0 @@ -.. include:: ../README.rst - -.. toctree:: - :caption: Contents: - :maxdepth: 1 - - reference - - -Index ------ - -* :ref:`genindex` diff --git a/template/doc/reference.rst b/template/doc/reference.md similarity index 59% rename from template/doc/reference.rst rename to template/doc/reference.md index 29860a1..b30f7d0 100644 --- a/template/doc/reference.rst +++ b/template/doc/reference.md @@ -1,8 +1,8 @@ -Reference -========= +# Reference -sum_numbers ------------ +## sum_numbers +~~~ {eval-rst} .. autofunction:: {{ package | replace('-', '_') }}.sum_numbers +~~~ diff --git a/template/python-template.txt b/template/python-template.txt index 8557286..3c66709 100644 --- a/template/python-template.txt +++ b/template/python-template.txt @@ -3,12 +3,10 @@ {# Delete the package API, if requested #} {% if noapi is defined and noapi %} - {% template_specialize_rename 'README.rst' %} {% template_specialize_rename 'doc' %} {% template_specialize_rename 'src/package-name/package_name.py' %} {% template_specialize_rename 'src/tests/test_package_name.py' %} {% else %} - {% template_specialize_rename 'README.md' %} {% template_specialize_rename 'src/package-name/package_name.py', package.replace('-', '_') + '.py' %} {% template_specialize_rename 'src/tests/test_package_name.py', 'test_' + package.replace('-', '_') + '.py' %} {% endif %} diff --git a/template/setup.cfg b/template/setup.cfg index f326e11..f652b82 100644 --- a/template/setup.cfg +++ b/template/setup.cfg @@ -6,13 +6,8 @@ author = {{name}} author_email = {{email}} license = MIT description = {{package}} -{% if noapi is defined and noapi -%} long_description = file:README.md long_description_content_type = text/markdown -{% else -%} -long_description = file:README.rst -long_description_content_type = text/x-rst -{% endif -%} keywords = {{package}} classifiers = Development Status :: 5 - Production/Stable diff --git a/test-expected/noapi-0-nomain-0/Makefile b/test-expected/noapi-0-nomain-0/Makefile index 6b340b8..b38d38b 100644 --- a/test-expected/noapi-0-nomain-0/Makefile +++ b/test-expected/noapi-0-nomain-0/Makefile @@ -12,11 +12,17 @@ WGET_CMD = if which wget; then wget -q -c $(1); else curl -f -Os $(1); fi $(eval $(call WGET, https://raw.githubusercontent.com/craigahobbs/python-build/main/Makefile.base)) $(eval $(call WGET, https://raw.githubusercontent.com/craigahobbs/python-build/main/pylintrc)) + # Sphinx documentation directory SPHINX_DOC := doc +# Development dependencies +TESTS_REQUIRE := bare-script myst-parser + + # Include python-build include Makefile.base + clean: rm -rf Makefile.base pylintrc diff --git a/test-expected/noapi-0-nomain-0/README.md b/test-expected/noapi-0-nomain-0/README.md new file mode 100644 index 0000000..96ba0e4 --- /dev/null +++ b/test-expected/noapi-0-nomain-0/README.md @@ -0,0 +1,24 @@ +# my-package + +[![PyPI - Status](https://img.shields.io/pypi/status/my-package)](https://pypi.org/project/my-package/) +[![PyPI](https://img.shields.io/pypi/v/my-package)](https://pypi.org/project/my-package/) +[![GitHub](https://img.shields.io/github/license/johndoe/my-package)](https://github.com/johndoe/my-package/blob/main/LICENSE) +[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/my-package)](https://pypi.org/project/my-package/) + +Coming soon! + + +## Links + +- [API Documentation](https://johndoe.github.io/my-package/) +- [Source code](https://github.com/johndoe/my-package) + + +## Development + +This package is developed using [python-build](https://github.com/craigahobbs/python-build#readme). +It was started using [python-template](https://github.com/craigahobbs/python-template#readme) as follows: + +~~~ +template-specialize python-template/template/ my-package/ -k package my-package -k name 'John Doe' -k email 'johndoe@gmail.com' -k github 'johndoe' +~~~ diff --git a/test-expected/noapi-0-nomain-0/README.rst b/test-expected/noapi-0-nomain-0/README.rst deleted file mode 100644 index 6e1dde8..0000000 --- a/test-expected/noapi-0-nomain-0/README.rst +++ /dev/null @@ -1,40 +0,0 @@ -my-package -========== - -.. |badge-status| image:: https://img.shields.io/pypi/status/my-package - :alt: PyPI - Status - :target: https://pypi.python.org/pypi/my-package/ - -.. |badge-version| image:: https://img.shields.io/pypi/v/my-package - :alt: PyPI - :target: https://pypi.python.org/pypi/my-package/ - -.. |badge-license| image:: https://img.shields.io/github/license/johndoe/my-package - :alt: GitHub - :target: https://github.com/johndoe/my-package/blob/main/LICENSE - -.. |badge-python| image:: https://img.shields.io/pypi/pyversions/my-package - :alt: PyPI - Python Version - :target: https://www.python.org/downloads/ - -|badge-status| |badge-version| |badge-license| |badge-python| - -Coming soon! - - -Links ------ - -- `API Documentation `__ -- `Source code `__ - - -Development ------------ - -This package is developed using `python-build `__. -It was started using `python-template `__ as follows: - -.. code-block:: sh - - template-specialize python-template/template/ my-package/ -k package my-package -k name 'John Doe' -k email 'johndoe@gmail.com' -k github 'johndoe' diff --git a/test-expected/noapi-0-nomain-0/doc/conf.py b/test-expected/noapi-0-nomain-0/doc/conf.py index 531cd61..b6ba2e2 100644 --- a/test-expected/noapi-0-nomain-0/doc/conf.py +++ b/test-expected/noapi-0-nomain-0/doc/conf.py @@ -38,7 +38,8 @@ 'sphinx.ext.autosectionlabel', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', - 'sphinx.ext.githubpages' + 'sphinx.ext.githubpages', + 'myst_parser' ] # Add any paths that contain templates here, relative to this directory. diff --git a/test-expected/noapi-0-nomain-0/doc/index.md b/test-expected/noapi-0-nomain-0/doc/index.md new file mode 100644 index 0000000..5d6d816 --- /dev/null +++ b/test-expected/noapi-0-nomain-0/doc/index.md @@ -0,0 +1,9 @@ +~~~ {include} ../README.md +~~~ + +~~~ {toctree} +:maxdepth: 2 +:hidden: + +reference +~~~ diff --git a/test-expected/noapi-0-nomain-0/doc/index.rst b/test-expected/noapi-0-nomain-0/doc/index.rst deleted file mode 100644 index 15d6e5b..0000000 --- a/test-expected/noapi-0-nomain-0/doc/index.rst +++ /dev/null @@ -1,13 +0,0 @@ -.. include:: ../README.rst - -.. toctree:: - :caption: Contents: - :maxdepth: 1 - - reference - - -Index ------ - -* :ref:`genindex` diff --git a/test-expected/noapi-0-nomain-0/doc/reference.md b/test-expected/noapi-0-nomain-0/doc/reference.md new file mode 100644 index 0000000..fc09bd6 --- /dev/null +++ b/test-expected/noapi-0-nomain-0/doc/reference.md @@ -0,0 +1,8 @@ +# Reference + + +## sum_numbers + +~~~ {eval-rst} +.. autofunction:: my_package.sum_numbers +~~~ diff --git a/test-expected/noapi-0-nomain-0/doc/reference.rst b/test-expected/noapi-0-nomain-0/doc/reference.rst deleted file mode 100644 index 68184fb..0000000 --- a/test-expected/noapi-0-nomain-0/doc/reference.rst +++ /dev/null @@ -1,8 +0,0 @@ -Reference -========= - - -sum_numbers ------------ - -.. autofunction:: my_package.sum_numbers diff --git a/test-expected/noapi-0-nomain-0/setup.cfg b/test-expected/noapi-0-nomain-0/setup.cfg index d0afd88..736536e 100644 --- a/test-expected/noapi-0-nomain-0/setup.cfg +++ b/test-expected/noapi-0-nomain-0/setup.cfg @@ -6,8 +6,8 @@ author = John Doe author_email = johndoe@gmail.com license = MIT description = my-package -long_description = file:README.rst -long_description_content_type = text/x-rst +long_description = file:README.md +long_description_content_type = text/markdown keywords = my-package classifiers = Development Status :: 5 - Production/Stable diff --git a/test-expected/noapi-nomain/Makefile b/test-expected/noapi-nomain/Makefile index 18fc1da..c8162b1 100644 --- a/test-expected/noapi-nomain/Makefile +++ b/test-expected/noapi-nomain/Makefile @@ -12,9 +12,11 @@ WGET_CMD = if which wget; then wget -q -c $(1); else curl -f -Os $(1); fi $(eval $(call WGET, https://raw.githubusercontent.com/craigahobbs/python-build/main/Makefile.base)) $(eval $(call WGET, https://raw.githubusercontent.com/craigahobbs/python-build/main/pylintrc)) + # Include python-build include Makefile.base + clean: rm -rf Makefile.base pylintrc diff --git a/test-expected/noapi/Makefile b/test-expected/noapi/Makefile index 18fc1da..c8162b1 100644 --- a/test-expected/noapi/Makefile +++ b/test-expected/noapi/Makefile @@ -12,9 +12,11 @@ WGET_CMD = if which wget; then wget -q -c $(1); else curl -f -Os $(1); fi $(eval $(call WGET, https://raw.githubusercontent.com/craigahobbs/python-build/main/Makefile.base)) $(eval $(call WGET, https://raw.githubusercontent.com/craigahobbs/python-build/main/pylintrc)) + # Include python-build include Makefile.base + clean: rm -rf Makefile.base pylintrc diff --git a/test-expected/nomain/Makefile b/test-expected/nomain/Makefile index 6b340b8..b38d38b 100644 --- a/test-expected/nomain/Makefile +++ b/test-expected/nomain/Makefile @@ -12,11 +12,17 @@ WGET_CMD = if which wget; then wget -q -c $(1); else curl -f -Os $(1); fi $(eval $(call WGET, https://raw.githubusercontent.com/craigahobbs/python-build/main/Makefile.base)) $(eval $(call WGET, https://raw.githubusercontent.com/craigahobbs/python-build/main/pylintrc)) + # Sphinx documentation directory SPHINX_DOC := doc +# Development dependencies +TESTS_REQUIRE := bare-script myst-parser + + # Include python-build include Makefile.base + clean: rm -rf Makefile.base pylintrc diff --git a/test-expected/nomain/README.md b/test-expected/nomain/README.md new file mode 100644 index 0000000..0af8333 --- /dev/null +++ b/test-expected/nomain/README.md @@ -0,0 +1,24 @@ +# my-package + +[![PyPI - Status](https://img.shields.io/pypi/status/my-package)](https://pypi.org/project/my-package/) +[![PyPI](https://img.shields.io/pypi/v/my-package)](https://pypi.org/project/my-package/) +[![GitHub](https://img.shields.io/github/license/johndoe/my-package)](https://github.com/johndoe/my-package/blob/main/LICENSE) +[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/my-package)](https://pypi.org/project/my-package/) + +Coming soon! + + +## Links + +- [API Documentation](https://johndoe.github.io/my-package/) +- [Source code](https://github.com/johndoe/my-package) + + +## Development + +This package is developed using [python-build](https://github.com/craigahobbs/python-build#readme). +It was started using [python-template](https://github.com/craigahobbs/python-template#readme) as follows: + +~~~ +template-specialize python-template/template/ my-package/ -k package my-package -k name 'John Doe' -k email 'johndoe@gmail.com' -k github 'johndoe' -k nomain 1 +~~~ diff --git a/test-expected/nomain/README.rst b/test-expected/nomain/README.rst deleted file mode 100644 index 994c552..0000000 --- a/test-expected/nomain/README.rst +++ /dev/null @@ -1,40 +0,0 @@ -my-package -========== - -.. |badge-status| image:: https://img.shields.io/pypi/status/my-package - :alt: PyPI - Status - :target: https://pypi.python.org/pypi/my-package/ - -.. |badge-version| image:: https://img.shields.io/pypi/v/my-package - :alt: PyPI - :target: https://pypi.python.org/pypi/my-package/ - -.. |badge-license| image:: https://img.shields.io/github/license/johndoe/my-package - :alt: GitHub - :target: https://github.com/johndoe/my-package/blob/main/LICENSE - -.. |badge-python| image:: https://img.shields.io/pypi/pyversions/my-package - :alt: PyPI - Python Version - :target: https://www.python.org/downloads/ - -|badge-status| |badge-version| |badge-license| |badge-python| - -Coming soon! - - -Links ------ - -- `API Documentation `__ -- `Source code `__ - - -Development ------------ - -This package is developed using `python-build `__. -It was started using `python-template `__ as follows: - -.. code-block:: sh - - template-specialize python-template/template/ my-package/ -k package my-package -k name 'John Doe' -k email 'johndoe@gmail.com' -k github 'johndoe' -k nomain 1 diff --git a/test-expected/nomain/doc/conf.py b/test-expected/nomain/doc/conf.py index 531cd61..b6ba2e2 100644 --- a/test-expected/nomain/doc/conf.py +++ b/test-expected/nomain/doc/conf.py @@ -38,7 +38,8 @@ 'sphinx.ext.autosectionlabel', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', - 'sphinx.ext.githubpages' + 'sphinx.ext.githubpages', + 'myst_parser' ] # Add any paths that contain templates here, relative to this directory. diff --git a/test-expected/nomain/doc/index.md b/test-expected/nomain/doc/index.md new file mode 100644 index 0000000..5d6d816 --- /dev/null +++ b/test-expected/nomain/doc/index.md @@ -0,0 +1,9 @@ +~~~ {include} ../README.md +~~~ + +~~~ {toctree} +:maxdepth: 2 +:hidden: + +reference +~~~ diff --git a/test-expected/nomain/doc/index.rst b/test-expected/nomain/doc/index.rst deleted file mode 100644 index 15d6e5b..0000000 --- a/test-expected/nomain/doc/index.rst +++ /dev/null @@ -1,13 +0,0 @@ -.. include:: ../README.rst - -.. toctree:: - :caption: Contents: - :maxdepth: 1 - - reference - - -Index ------ - -* :ref:`genindex` diff --git a/test-expected/nomain/doc/reference.md b/test-expected/nomain/doc/reference.md new file mode 100644 index 0000000..fc09bd6 --- /dev/null +++ b/test-expected/nomain/doc/reference.md @@ -0,0 +1,8 @@ +# Reference + + +## sum_numbers + +~~~ {eval-rst} +.. autofunction:: my_package.sum_numbers +~~~ diff --git a/test-expected/nomain/doc/reference.rst b/test-expected/nomain/doc/reference.rst deleted file mode 100644 index 68184fb..0000000 --- a/test-expected/nomain/doc/reference.rst +++ /dev/null @@ -1,8 +0,0 @@ -Reference -========= - - -sum_numbers ------------ - -.. autofunction:: my_package.sum_numbers diff --git a/test-expected/nomain/setup.cfg b/test-expected/nomain/setup.cfg index b06e77b..beaba3b 100644 --- a/test-expected/nomain/setup.cfg +++ b/test-expected/nomain/setup.cfg @@ -6,8 +6,8 @@ author = John Doe author_email = johndoe@gmail.com license = MIT description = my-package -long_description = file:README.rst -long_description_content_type = text/x-rst +long_description = file:README.md +long_description_content_type = text/markdown keywords = my-package classifiers = Development Status :: 5 - Production/Stable diff --git a/test-expected/required/Makefile b/test-expected/required/Makefile index 6b340b8..b38d38b 100644 --- a/test-expected/required/Makefile +++ b/test-expected/required/Makefile @@ -12,11 +12,17 @@ WGET_CMD = if which wget; then wget -q -c $(1); else curl -f -Os $(1); fi $(eval $(call WGET, https://raw.githubusercontent.com/craigahobbs/python-build/main/Makefile.base)) $(eval $(call WGET, https://raw.githubusercontent.com/craigahobbs/python-build/main/pylintrc)) + # Sphinx documentation directory SPHINX_DOC := doc +# Development dependencies +TESTS_REQUIRE := bare-script myst-parser + + # Include python-build include Makefile.base + clean: rm -rf Makefile.base pylintrc diff --git a/test-expected/required/README.md b/test-expected/required/README.md new file mode 100644 index 0000000..96ba0e4 --- /dev/null +++ b/test-expected/required/README.md @@ -0,0 +1,24 @@ +# my-package + +[![PyPI - Status](https://img.shields.io/pypi/status/my-package)](https://pypi.org/project/my-package/) +[![PyPI](https://img.shields.io/pypi/v/my-package)](https://pypi.org/project/my-package/) +[![GitHub](https://img.shields.io/github/license/johndoe/my-package)](https://github.com/johndoe/my-package/blob/main/LICENSE) +[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/my-package)](https://pypi.org/project/my-package/) + +Coming soon! + + +## Links + +- [API Documentation](https://johndoe.github.io/my-package/) +- [Source code](https://github.com/johndoe/my-package) + + +## Development + +This package is developed using [python-build](https://github.com/craigahobbs/python-build#readme). +It was started using [python-template](https://github.com/craigahobbs/python-template#readme) as follows: + +~~~ +template-specialize python-template/template/ my-package/ -k package my-package -k name 'John Doe' -k email 'johndoe@gmail.com' -k github 'johndoe' +~~~ diff --git a/test-expected/required/README.rst b/test-expected/required/README.rst deleted file mode 100644 index 6e1dde8..0000000 --- a/test-expected/required/README.rst +++ /dev/null @@ -1,40 +0,0 @@ -my-package -========== - -.. |badge-status| image:: https://img.shields.io/pypi/status/my-package - :alt: PyPI - Status - :target: https://pypi.python.org/pypi/my-package/ - -.. |badge-version| image:: https://img.shields.io/pypi/v/my-package - :alt: PyPI - :target: https://pypi.python.org/pypi/my-package/ - -.. |badge-license| image:: https://img.shields.io/github/license/johndoe/my-package - :alt: GitHub - :target: https://github.com/johndoe/my-package/blob/main/LICENSE - -.. |badge-python| image:: https://img.shields.io/pypi/pyversions/my-package - :alt: PyPI - Python Version - :target: https://www.python.org/downloads/ - -|badge-status| |badge-version| |badge-license| |badge-python| - -Coming soon! - - -Links ------ - -- `API Documentation `__ -- `Source code `__ - - -Development ------------ - -This package is developed using `python-build `__. -It was started using `python-template `__ as follows: - -.. code-block:: sh - - template-specialize python-template/template/ my-package/ -k package my-package -k name 'John Doe' -k email 'johndoe@gmail.com' -k github 'johndoe' diff --git a/test-expected/required/doc/conf.py b/test-expected/required/doc/conf.py index 531cd61..b6ba2e2 100644 --- a/test-expected/required/doc/conf.py +++ b/test-expected/required/doc/conf.py @@ -38,7 +38,8 @@ 'sphinx.ext.autosectionlabel', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', - 'sphinx.ext.githubpages' + 'sphinx.ext.githubpages', + 'myst_parser' ] # Add any paths that contain templates here, relative to this directory. diff --git a/test-expected/required/doc/index.md b/test-expected/required/doc/index.md new file mode 100644 index 0000000..5d6d816 --- /dev/null +++ b/test-expected/required/doc/index.md @@ -0,0 +1,9 @@ +~~~ {include} ../README.md +~~~ + +~~~ {toctree} +:maxdepth: 2 +:hidden: + +reference +~~~ diff --git a/test-expected/required/doc/index.rst b/test-expected/required/doc/index.rst deleted file mode 100644 index 15d6e5b..0000000 --- a/test-expected/required/doc/index.rst +++ /dev/null @@ -1,13 +0,0 @@ -.. include:: ../README.rst - -.. toctree:: - :caption: Contents: - :maxdepth: 1 - - reference - - -Index ------ - -* :ref:`genindex` diff --git a/test-expected/required/doc/reference.md b/test-expected/required/doc/reference.md new file mode 100644 index 0000000..fc09bd6 --- /dev/null +++ b/test-expected/required/doc/reference.md @@ -0,0 +1,8 @@ +# Reference + + +## sum_numbers + +~~~ {eval-rst} +.. autofunction:: my_package.sum_numbers +~~~ diff --git a/test-expected/required/doc/reference.rst b/test-expected/required/doc/reference.rst deleted file mode 100644 index 68184fb..0000000 --- a/test-expected/required/doc/reference.rst +++ /dev/null @@ -1,8 +0,0 @@ -Reference -========= - - -sum_numbers ------------ - -.. autofunction:: my_package.sum_numbers diff --git a/test-expected/required/setup.cfg b/test-expected/required/setup.cfg index d0afd88..736536e 100644 --- a/test-expected/required/setup.cfg +++ b/test-expected/required/setup.cfg @@ -6,8 +6,8 @@ author = John Doe author_email = johndoe@gmail.com license = MIT description = my-package -long_description = file:README.rst -long_description_content_type = text/x-rst +long_description = file:README.md +long_description_content_type = text/markdown keywords = my-package classifiers = Development Status :: 5 - Production/Stable