mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-04-24 07:17:17 +00:00
move documentation to tox
This commit is contained in:
parent
cdc018ad07
commit
1a575d6db8
2
.gitignore
vendored
2
.gitignore
vendored
@ -97,3 +97,5 @@ ENV/
|
|||||||
status_cache.json
|
status_cache.json
|
||||||
|
|
||||||
*.db
|
*.db
|
||||||
|
|
||||||
|
docs/html/
|
||||||
|
30
Makefile
30
Makefile
@ -1,4 +1,4 @@
|
|||||||
.PHONY: architecture archive archive_directory archlinux check clean directory docs-clean docs-html docs-source man push tests version
|
.PHONY: archive archive_directory archlinux check clean directory push spec spec-html tests version
|
||||||
.DEFAULT_GOAL := archlinux
|
.DEFAULT_GOAL := archlinux
|
||||||
|
|
||||||
PROJECT := ahriman
|
PROJECT := ahriman
|
||||||
@ -10,9 +10,6 @@ IGNORE_FILES := package/archlinux src/.mypy_cache
|
|||||||
$(TARGET_FILES) : $(addprefix $(PROJECT), %) : $(addprefix ., %) directory version
|
$(TARGET_FILES) : $(addprefix $(PROJECT), %) : $(addprefix ., %) directory version
|
||||||
@cp -rp $< $@
|
@cp -rp $< $@
|
||||||
|
|
||||||
architecture:
|
|
||||||
cd src && pydeps ahriman -o ../docs/ahriman-architecture.svg --no-show --cluster
|
|
||||||
|
|
||||||
archive: archive_directory
|
archive: archive_directory
|
||||||
tar cJf "$(PROJECT)-$(VERSION)-src.tar.xz" "$(PROJECT)"
|
tar cJf "$(PROJECT)-$(VERSION)-src.tar.xz" "$(PROJECT)"
|
||||||
rm -rf "$(PROJECT)"
|
rm -rf "$(PROJECT)"
|
||||||
@ -36,26 +33,23 @@ clean:
|
|||||||
directory: clean
|
directory: clean
|
||||||
mkdir "$(PROJECT)"
|
mkdir "$(PROJECT)"
|
||||||
|
|
||||||
docs-clean: clean
|
push: spec archlinux
|
||||||
find docs/source -type f -name "$(PROJECT)*.rst" -delete
|
|
||||||
rm -rf docs/html docs/source/modules.rst
|
|
||||||
|
|
||||||
docs-html: docs-source
|
|
||||||
sphinx-build -b html -a -j auto docs/source docs/html
|
|
||||||
|
|
||||||
docs-source: docs-clean
|
|
||||||
SPHINX_APIDOC_OPTIONS=members,no-undoc-members,show-inheritance sphinx-apidoc --force --private -o docs/source src
|
|
||||||
|
|
||||||
man:
|
|
||||||
cd src && PYTHONPATH=. argparse-manpage --module ahriman.application.ahriman --function _parser --author "ahriman team" --project-name ahriman --author-email "" --url https://github.com/arcan1s/ahriman --output ../docs/ahriman.1
|
|
||||||
|
|
||||||
push: architecture docs-source man archlinux
|
|
||||||
git add package/archlinux/PKGBUILD src/ahriman/version.py docs/ahriman-architecture.svg docs/ahriman.1
|
git add package/archlinux/PKGBUILD src/ahriman/version.py docs/ahriman-architecture.svg docs/ahriman.1
|
||||||
git commit -m "Release $(VERSION)"
|
git commit -m "Release $(VERSION)"
|
||||||
git tag "$(VERSION)"
|
git tag "$(VERSION)"
|
||||||
git push
|
git push
|
||||||
git push --tags
|
git push --tags
|
||||||
|
|
||||||
|
spec:
|
||||||
|
# make sure that old files are removed
|
||||||
|
find docs/source -type f -name "$(PROJECT)*.rst" -delete
|
||||||
|
rm -f docs/source/modules.rst
|
||||||
|
tox -e docs
|
||||||
|
|
||||||
|
spec-html: spec
|
||||||
|
rm -rf docs/html
|
||||||
|
tox -e docs-html
|
||||||
|
|
||||||
tests: clean
|
tests: clean
|
||||||
tox -e tests
|
tox -e tests
|
||||||
|
|
||||||
|
6
setup.py
6
setup.py
@ -93,6 +93,12 @@ setup(
|
|||||||
"mypy",
|
"mypy",
|
||||||
"pylint",
|
"pylint",
|
||||||
],
|
],
|
||||||
|
"docs": [
|
||||||
|
"Sphinx",
|
||||||
|
"argparse-manpage",
|
||||||
|
"pydeps",
|
||||||
|
"sphinxcontrib-napoleon",
|
||||||
|
],
|
||||||
"s3": [
|
"s3": [
|
||||||
"boto3",
|
"boto3",
|
||||||
],
|
],
|
||||||
|
19
tox.ini
19
tox.ini
@ -27,6 +27,25 @@ commands =
|
|||||||
bandit -c .bandit-test.yml -r "tests/{[tox]project_name}"
|
bandit -c .bandit-test.yml -r "tests/{[tox]project_name}"
|
||||||
/bin/bash -c 'mypy --implicit-reexport --strict -p "{[tox]project_name}" --install-types --non-interactive || mypy --implicit-reexport --strict -p "{[tox]project_name}"'
|
/bin/bash -c 'mypy --implicit-reexport --strict -p "{[tox]project_name}" --install-types --non-interactive || mypy --implicit-reexport --strict -p "{[tox]project_name}"'
|
||||||
|
|
||||||
|
[testenv:docs]
|
||||||
|
deps =
|
||||||
|
{[tox]dependencies}
|
||||||
|
-e .[docs]
|
||||||
|
changedir = src
|
||||||
|
setenv =
|
||||||
|
SPHINX_APIDOC_OPTIONS=members,no-undoc-members,show-inheritance
|
||||||
|
commands =
|
||||||
|
argparse-manpage --module ahriman.application.ahriman --function _parser --author "ahriman team" --project-name ahriman --author-email "" --url https://github.com/arcan1s/ahriman --output ../docs/ahriman.1
|
||||||
|
pydeps ahriman -o ../docs/ahriman-architecture.svg --no-config --no-show --cluster
|
||||||
|
sphinx-apidoc --force --private -o ../docs/source .
|
||||||
|
|
||||||
|
[testenv:docs-html]
|
||||||
|
deps =
|
||||||
|
{[tox]dependencies}
|
||||||
|
-e .[docs]
|
||||||
|
commands =
|
||||||
|
sphinx-build -b html -a -j auto docs/source docs/html
|
||||||
|
|
||||||
[testenv:tests]
|
[testenv:tests]
|
||||||
deps =
|
deps =
|
||||||
{[tox]dependencies}
|
{[tox]dependencies}
|
||||||
|
Loading…
Reference in New Issue
Block a user