diff --git a/.github/workflows/wiki-docs.yaml b/.github/workflows/wiki-docs.yaml new file mode 100644 index 0000000..2d0d7c4 --- /dev/null +++ b/.github/workflows/wiki-docs.yaml @@ -0,0 +1,30 @@ +name: Deploy Sphinx Docs to Wiki + +on: + release: + types: + - published + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + - name: Install dependencies + run: | + pip install poetry + poetry install --with docs + - name: Build docs + run: sphinx-build -M markdown ./docs ./docs/_build + - name: Push to Wiki + run: | + git clone https://github.com/molecularmodelinglab/ChemGED.wiki.git + cp -r ./docs/_build/markdown/* ChemGED.wiki + cd ChemGED.wiki + git add . + git commit -m "Update documentation [auto-build]" + git push diff --git a/.gitignore b/.gitignore index f3e87b5..63288bf 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ .venv tests/test-results/ docs/_build/ +dist/ diff --git a/README.md b/README.md index 35339bc..eb0af01 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ print(distances_matrix) # Square form ``` ## Documentation -For more detailed documentation, please visit [ReadTheDocs](https://chemged.readthedocs.io/). +You can read more detailed documentation in the docs folder. ## Implementation The approach used here uses bipartite graph matching[[1]](#1), and most of its implementation in python diff --git a/docs/conf.py b/docs/conf.py index 0c23a00..21b4732 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -33,6 +33,7 @@ "sphinx.ext.napoleon", "sphinx.ext.intersphinx", "sphinx.ext.mathjax", + "sphinx_markdown_builder", ] templates_path = ["_templates"] diff --git a/docs/requirements.txt b/docs/requirements.txt index 3c934c0..2ab002b 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,5 +1,6 @@ sphinx>=7.1.2 sphinx_rtd_theme>=1.3.0 +sphinx-markdown-builder>=0.6.8 networkx>=3.5 numpy>=2.0.0 scipy>=1.15.3 diff --git a/poetry.lock b/poetry.lock index 61a69f6..02e484d 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2585,6 +2585,26 @@ docs = ["sphinxcontrib-websupport"] lint = ["flake8 (>=3.5.0)", "importlib_metadata", "mypy (==1.9.0)", "pytest (>=6.0)", "ruff (==0.3.7)", "sphinx-lint", "tomli", "types-docutils", "types-requests"] test = ["cython (>=3.0)", "defusedxml (>=0.7.1)", "pytest (>=6.0)", "setuptools (>=67.0)"] +[[package]] +name = "sphinx-markdown-builder" +version = "0.6.8" +description = "A Sphinx extension to add markdown generation support." +optional = false +python-versions = ">=3.7" +groups = ["docs"] +files = [ + {file = "sphinx_markdown_builder-0.6.8-py3-none-any.whl", hash = "sha256:f04ab42d52449363228b9104569c56b778534f9c41a168af8cfc721a1e0e3edc"}, + {file = "sphinx_markdown_builder-0.6.8.tar.gz", hash = "sha256:6141b566bf18dd1cd515a0a90efd91c6c4d10fc638554fab2fd19cba66543dd7"}, +] + +[package.dependencies] +docutils = "*" +sphinx = ">=5.1.0" +tabulate = "*" + +[package.extras] +dev = ["black", "bumpver", "coveralls", "flake8", "isort", "pip-tools", "pylint", "pytest", "pytest-cov", "sphinx (>=5.3.0)", "sphinxcontrib-plantuml", "sphinxcontrib.httpdomain"] + [[package]] name = "sphinx-rtd-theme" version = "1.3.0" @@ -2720,6 +2740,21 @@ lint = ["mypy", "ruff (==0.5.5)", "types-docutils"] standalone = ["Sphinx (>=5)"] test = ["pytest"] +[[package]] +name = "tabulate" +version = "0.9.0" +description = "Pretty-print tabular data" +optional = false +python-versions = ">=3.7" +groups = ["docs"] +files = [ + {file = "tabulate-0.9.0-py3-none-any.whl", hash = "sha256:024ca478df22e9340661486f85298cff5f6dcdba14f3813e8830015b9ed1948f"}, + {file = "tabulate-0.9.0.tar.gz", hash = "sha256:0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c"}, +] + +[package.extras] +widechars = ["wcwidth"] + [[package]] name = "tomlkit" version = "0.13.3" @@ -3056,4 +3091,4 @@ cffi = ["cffi (>=1.11)"] [metadata] lock-version = "2.1" python-versions = ">=3.11,<4.0" -content-hash = "4a27def5957fabf64e9dc6885e04324be378588256e5247aae0874f1de895f98" +content-hash = "781b8dc780dfb2dff7f00474d2aa1391460724d0b3176c547c8dbf59cab6a33c" diff --git a/pyproject.toml b/pyproject.toml index 00e1b1e..ba6d06e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,6 +53,7 @@ optional = true [tool.poetry.group.docs.dependencies] sphinx = "^7.1.2" sphinx_rtd_theme = "^1.3.0" +sphinx-markdown-builder = "^0.6.8" [[tool.poetry.source]] name = "PyPI"