From 1e8db2fc93b06cf5945a65eaa161afaed14010a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Santiago=20Fraire=20Willemo=C3=ABs?= Date: Sun, 25 Apr 2021 14:18:39 +0200 Subject: [PATCH 1/5] docs: fix syntax highlight --- mkdocs.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mkdocs.yml b/mkdocs.yml index 92b922ca..dd4e3dcb 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -16,4 +16,5 @@ nav: markdown_extensions: - admonition - - codehilite + - pymdownx.highlight + - pymdownx.superfences From f94328b57b3527dc088ab5f77b31e950c48d3793 Mon Sep 17 00:00:00 2001 From: Amin Alaee Date: Tue, 17 Aug 2021 14:32:18 +0430 Subject: [PATCH 2/5] Update mkdocs.yml --- mkdocs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/mkdocs.yml b/mkdocs.yml index dd4e3dcb..f7e7815b 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -15,6 +15,7 @@ nav: - Tests & Migrations: 'tests_and_migrations.md' markdown_extensions: + - mkautodoc - admonition - pymdownx.highlight - pymdownx.superfences From 14fe332ad07a386ccb5afb27b7eaa9839dd05c72 Mon Sep 17 00:00:00 2001 From: Amin Alaee Date: Tue, 17 Aug 2021 14:32:51 +0430 Subject: [PATCH 3/5] Update requirements.txt --- requirements.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/requirements.txt b/requirements.txt index 0f22a025..6fa62599 100644 --- a/requirements.txt +++ b/requirements.txt @@ -23,3 +23,12 @@ pytest pytest-cov starlette requests + +# Documentation +mkdocs +mkdocs-material +mkautodoc + +# Packaging +twine +wheel From 28584f04a1e8a3265286f8c4fbd36ad9461d67d7 Mon Sep 17 00:00:00 2001 From: Amin Alaee Date: Tue, 17 Aug 2021 14:35:28 +0430 Subject: [PATCH 4/5] Update publish.yml --- .github/workflows/publish.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 473cb19b..a41fd2bf 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -16,7 +16,11 @@ jobs: - uses: "actions/setup-python@v1" with: python-version: 3.7 - - name: "Publish" + - name: "Install dependencies" + run: "scripts/install" + - name: "Build package & docs" + run: "scripts/build" + - name: "Publish to PyPI & deploy docs" run: "scripts/publish" env: TWINE_USERNAME: __token__ From 49fef885f3e125ffb26240493ae1ef8dc9a0a318 Mon Sep 17 00:00:00 2001 From: Amin Alaee Date: Tue, 17 Aug 2021 14:57:44 +0430 Subject: [PATCH 5/5] update scripts --- scripts/build | 13 +++++++++++++ scripts/publish | 3 --- 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100755 scripts/build diff --git a/scripts/build b/scripts/build new file mode 100755 index 00000000..1c47d2cc --- /dev/null +++ b/scripts/build @@ -0,0 +1,13 @@ +#!/bin/sh -e + +if [ -d 'venv' ] ; then + PREFIX="venv/bin/" +else + PREFIX="" +fi + +set -x + +${PREFIX}python setup.py sdist bdist_wheel +${PREFIX}twine check dist/* +${PREFIX}mkdocs build diff --git a/scripts/publish b/scripts/publish index 29a5da61..c1b56e3f 100755 --- a/scripts/publish +++ b/scripts/publish @@ -1,7 +1,6 @@ #!/bin/sh -e VERSION_FILE="databases/__init__.py" -PYTHONPATH=. if [ -d 'venv' ] ; then PREFIX="venv/bin/" @@ -23,7 +22,5 @@ fi set -x -${PREFIX}pip install twine wheel mkdocs mkdocs-material mkautodoc -${PREFIX}python setup.py sdist bdist_wheel ${PREFIX}twine upload dist/* ${PREFIX}mkdocs gh-deploy --force