diff --git a/Makefile b/Makefile index 4f30bb4..618b514 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ GPG_SIGNER_FINGERPRINT := "91CD826E74B0174D181903DEF97C70941CD8C4EF" .PHONY: chore configure requirements-dev.txt requirements.txt publish archive -chore: requirements.txt requirements-dev.txt bitbucket-pipelines.yaml +chore: requirements.txt requirements-dev.txt bitbucket-pipelines.yml Pipfile.lock: Pipfile python3 -m pipenv lock -v diff --git a/Pipfile.lock b/Pipfile.lock index ac11403..e78939e 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -32,9 +32,8 @@ "markers": "python_version >= '3.8'", "version": "==2.17.0" }, - "byteb4rb1e-sphinxcontrib": { - "editable": true, - "path": "." + "byteb4rb1e.sphinxcontrib": { + "version": "==0.1.dev5+g3c348d5.d20250526" }, "certifi": { "hashes": [ @@ -382,11 +381,11 @@ }, "cachetools": { "hashes": [ - "sha256:1a661caa9175d26759571b2e19580f9d6393969e5dfca11fdb1f947a23e640d4", - "sha256:d26a22bcc62eb95c3beabd9f1ee5e820d3d2704fe2967cbe350e20c8ffcd3f0a" + "sha256:82e73ba88f7b30228b5507dce1a1f878498fc669d972aef2dde4f3a3c24f103e", + "sha256:f225782b84438f828328fc2ad74346522f27e5b1440f4e9fd18b20ebfd1aa2cf" ], - "markers": "python_version >= '3.7'", - "version": "==5.5.2" + "markers": "python_version >= '3.9'", + "version": "==6.0.0" }, "certifi": { "hashes": [ @@ -833,11 +832,11 @@ }, "setuptools": { "hashes": [ - "sha256:ca5cc1069b85dc23070a6628e6bcecb3292acac802399c7f8edc0100619f9009", - "sha256:f6ffc5f0142b1bd8d0ca94ee91b30c0ca862ffd50826da1ea85258a06fd94552" + "sha256:49f7af965996f26d43c8ae34539c8d99c5042fbff34302ea151eaa9c207cd257", + "sha256:95a60484590d24103af13b686121328cc2736bee85de8936383111e421b9edc0" ], "markers": "python_version >= '3.9'", - "version": "==80.7.1" + "version": "==80.8.0" }, "setuptools-scm": { "hashes": [ diff --git a/docs/byteb4rb1e-sphinxcontrib/authorship.rst b/docs/byteb4rb1e-sphinxcontrib/authorship.rst index 4ef6859..1eab1b1 100644 --- a/docs/byteb4rb1e-sphinxcontrib/authorship.rst +++ b/docs/byteb4rb1e-sphinxcontrib/authorship.rst @@ -1,3 +1,21 @@ ################################### byteb4rb1e_sphinxcontrib.authorship ################################### + +An implementation of the IMJE recommendations on authorship applied to Sphinx +documents. + +.. code-block:: rst + + .. contribution:: Review + :name: Adam Smith + :organization: Example Corp. + :group: contributions + +.. code-block:: rst + + .. acknowledgment:: + :name: Adam Smith + :organization: Example Corp. + :group: contributions + diff --git a/docs/byteb4rb1e-sphinxcontrib/svc_authorship.rst b/docs/byteb4rb1e-sphinxcontrib/authorship_svc.rst similarity index 66% rename from docs/byteb4rb1e-sphinxcontrib/svc_authorship.rst rename to docs/byteb4rb1e-sphinxcontrib/authorship_svc.rst index 5075e15..c9605b2 100644 --- a/docs/byteb4rb1e-sphinxcontrib/svc_authorship.rst +++ b/docs/byteb4rb1e-sphinxcontrib/authorship_svc.rst @@ -1,3 +1,3 @@ ####################################### -byteb4rb1e_sphinxcontrib.svc_authorship +byteb4rb1e_sphinxcontrib.authorship_svc ####################################### diff --git a/docs/byteb4rb1e-sphinxcontrib/index.rst b/docs/byteb4rb1e-sphinxcontrib/index.rst index bf6a3a4..0051fb6 100644 --- a/docs/byteb4rb1e-sphinxcontrib/index.rst +++ b/docs/byteb4rb1e-sphinxcontrib/index.rst @@ -12,7 +12,7 @@ via pip (PyPi) .. code-block:: - $> python3 -m pip install byteb4rb1ie-sphinxcontrib + $> python3 -m pip install byteb4rb1e-sphinxcontrib via pip (Git) ------------- @@ -21,20 +21,6 @@ via pip (Git) $> python3 -m pip git+https://bitbucket.org/byteb4rb1e/sphinxcontrib@master -via Git -------- - -.. code-block:: - - $> git clone https://bitbucket.org/byteb4rb1e/sphinxcontrib - -with pipenv -~~~~~~~~~~~ - -.. code-block:: - - $> sh ./configure --with-pipenv .pipenv - Usage ===== @@ -42,5 +28,140 @@ Usage :caption: Sphinx Extensions authorship - svc_authorship + authorship_svc svc + +Installation (Development) +========================== + +.. code-block:: + + $> git clone https://bitbucket.org/byteb4rb1e/sphinxcontrib + +.. warning:: + + (Non-MSYS2) Windows users MUST use ``.venv/Scripts/python3.exe``, instead of + ``.venv/bin/python3`` + +.. warning:: + + (Non-MSYS2) Windows users MUST execute ``python3 -m pipenv install -d + --skip-lock``, instead of ``sh ./configure``. + +with pipenv +----------- + +``pipenv`` expected to be installed system-wide + +.. code-block:: + + $> sh ./configure + +with venv +--------- + +.. code-block:: + + $> python3 -m venv --system-site-packages .venv + $> .venv/bin/python3 -m pip install pipenv + $> .venv/bin/python3 -m pipenv run sh ./configure + +with venv (but without configuration) +------------------------------------- + +.. code-block:: + + $> python3 -m venv --system-site-packages .venv + $> .venv/bin/python3 -m pip install -r requirements-dev.txt + +Development +=========== + +Static Code Analysis +-------------------- + +.. code-block:: + + $> python3 -m pipenv run test-static + +Audit +~~~~~ + +.. code-block:: + + $> python3 -m tox -e audit + +Format +~~~~~~ + +.. code-block:: + + $> python3 -m tox -e format -- --inline + +Lint +~~~~ + +.. code-block:: + + $> python3 -m tox -e lint + + +Unit Testing +------------ + +.. code-block:: + + $> python3 -m pipenv run test-unit + +Test Suite +~~~~~~~~~~ + +.. code-block:: + + $> python3 -m pipenv run test-unit -- -p tests/unit + +Test Case +~~~~~~~~~ + +.. code-block:: + + $> python3 -m pipenv run test-unit -- -p tests/unit + +Integration Testing +------------------- + +.. code-block:: + + $> python3 -m pipenv run test-integration + +Test Suite +~~~~~~~~~~ + +.. code-block:: + + $> python3 -m pipenv run test-integration -- \ + -p tests/integration/byteb4rb1e_sphinxcontrib/authorship + +Test Case +~~~~~~~~~ + +.. code-block:: + + $> python3 -m pipenv run test-integration -- \ + -p tests/integration/byteb4rb1e_sphinxcontrib/authorship/test_setup.py + +with a definitive Python and Sphinx major version (e.g. *Python* ``3.10``, and *Sphinx* +``6``) + +.. code-block:: + + $> python3 -m tox -e py310-sphinx6-integration -- \ + -p tests/unit + +Documentation +------------- + +.. code-block:: + + $> python3 -m pipenv run doc + diff --git a/pyproject.toml b/pyproject.toml index ffd1365..26079fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,9 +31,13 @@ classifiers = [ dependencies = [ "sphinx>=5.1", ] + dynamic = ["version"] requires-python = ">=3.8" +[project.optional-dependencies] +git = ["pygit2>=1.18.0,<2",] + [project.urls] Bitbucket = "https://bitbucket.org/byteb4rb1e/sphinxcontrib" diff --git a/requirements-dev.txt b/requirements-dev.txt index b06e105..21f8c8e 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,7 +2,7 @@ alabaster==1.0.0 babel==2.17.0 build==1.2.2.post1 -cachetools==5.5.2 +cachetools==6.0.0 certifi==2025.4.26 chardet==5.2.0 charset-normalizer==3.4.2 @@ -37,7 +37,7 @@ requests-toolbelt==1.0.0 rfc3986==2.0.0 rich==14.0.0 roman-numerals-py==3.1.0 -setuptools==80.7.1 +setuptools==80.8.0 setuptools-scm==8.3.1 snowballstemmer==3.0.1 sphinx==8.2.3 diff --git a/requirements.txt b/requirements.txt index a12eeeb..f121830 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ -i https://pypi.org/simple alabaster==1.0.0 babel==2.17.0 --e . +byteb4rb1e.sphinxcontrib==0.1.dev5+g3c348d5.d20250526 certifi==2025.4.26 charset-normalizer==3.4.2 colorama==0.4.6 diff --git a/src/byteb4rb1e_sphinxcontrib/__init__.py b/src/byteb4rb1e/sphinxcontrib/__init__.py similarity index 100% rename from src/byteb4rb1e_sphinxcontrib/__init__.py rename to src/byteb4rb1e/sphinxcontrib/__init__.py diff --git a/src/byteb4rb1e_sphinxcontrib/abc.py b/src/byteb4rb1e/sphinxcontrib/abc.py similarity index 100% rename from src/byteb4rb1e_sphinxcontrib/abc.py rename to src/byteb4rb1e/sphinxcontrib/abc.py diff --git a/src/byteb4rb1e_sphinxcontrib/authorship/__init__.py b/src/byteb4rb1e/sphinxcontrib/authorship/__init__.py similarity index 100% rename from src/byteb4rb1e_sphinxcontrib/authorship/__init__.py rename to src/byteb4rb1e/sphinxcontrib/authorship/__init__.py diff --git a/src/byteb4rb1e_sphinxcontrib/authorship/parsers/__init__.py b/src/byteb4rb1e/sphinxcontrib/authorship/parsers/__init__.py similarity index 100% rename from src/byteb4rb1e_sphinxcontrib/authorship/parsers/__init__.py rename to src/byteb4rb1e/sphinxcontrib/authorship/parsers/__init__.py diff --git a/src/byteb4rb1e_sphinxcontrib/authorship/parsers/rst/__init__.py b/src/byteb4rb1e/sphinxcontrib/authorship/parsers/rst/__init__.py similarity index 100% rename from src/byteb4rb1e_sphinxcontrib/authorship/parsers/rst/__init__.py rename to src/byteb4rb1e/sphinxcontrib/authorship/parsers/rst/__init__.py diff --git a/src/byteb4rb1e_sphinxcontrib/authorship/parsers/rst/directives/__init__.py b/src/byteb4rb1e/sphinxcontrib/authorship/parsers/rst/directives/__init__.py similarity index 100% rename from src/byteb4rb1e_sphinxcontrib/authorship/parsers/rst/directives/__init__.py rename to src/byteb4rb1e/sphinxcontrib/authorship/parsers/rst/directives/__init__.py diff --git a/src/byteb4rb1e_sphinxcontrib/authorship/parsers/rst/directives/contribution.py b/src/byteb4rb1e/sphinxcontrib/authorship/parsers/rst/directives/contribution.py similarity index 100% rename from src/byteb4rb1e_sphinxcontrib/authorship/parsers/rst/directives/contribution.py rename to src/byteb4rb1e/sphinxcontrib/authorship/parsers/rst/directives/contribution.py diff --git a/src/byteb4rb1e_sphinxcontrib/svc/__init__.py b/src/byteb4rb1e/sphinxcontrib/authorship_svc/__init__.py similarity index 100% rename from src/byteb4rb1e_sphinxcontrib/svc/__init__.py rename to src/byteb4rb1e/sphinxcontrib/authorship_svc/__init__.py diff --git a/src/byteb4rb1e_sphinxcontrib/svc_authorship/__init__.py b/src/byteb4rb1e/sphinxcontrib/svc/__init__.py similarity index 100% rename from src/byteb4rb1e_sphinxcontrib/svc_authorship/__init__.py rename to src/byteb4rb1e/sphinxcontrib/svc/__init__.py