From 618cc8d0dd5c93656b32016f0a40c423be5c386c Mon Sep 17 00:00:00 2001 From: Frode Helgetun Krogh <70878501+frodehk@users.noreply.github.com> Date: Wed, 11 Dec 2024 09:36:24 +0100 Subject: [PATCH 1/4] docs: remove api reference --- docs/docs/about/getting_started/api/index.md | 2 +- docs/make-api-reference.py | 25 -------------------- 2 files changed, 1 insertion(+), 26 deletions(-) delete mode 100644 docs/make-api-reference.py diff --git a/docs/docs/about/getting_started/api/index.md b/docs/docs/about/getting_started/api/index.md index caef8e958a..79ca657622 100644 --- a/docs/docs/about/getting_started/api/index.md +++ b/docs/docs/about/getting_started/api/index.md @@ -4,4 +4,4 @@ sidebar_position: 3 --- # API Reference -Generated API reference for the libecalc library can be found [here](https://equinor.github.io/ecalc/docs/about/references/api/libecalc.html). +API reference for the libecalc library will be available here later in 2025. diff --git a/docs/make-api-reference.py b/docs/make-api-reference.py deleted file mode 100644 index 81e23b5b35..0000000000 --- a/docs/make-api-reference.py +++ /dev/null @@ -1,25 +0,0 @@ -import shutil -from pathlib import Path - -from pdoc import pdoc - - -if __name__ == "__main__": - """ - Autogenerate python API documentation - - Output will be put in the docusaurus build directory - """ - here = Path(__file__).parent - out = here / "temp_api_docs" - destination = here / "build" / "docs" / "about" / "getting_started" / "api" - if out.exists(): - shutil.rmtree(out) - - # Generate reference documentation using pdoc - modules = ["libecalc", "!libecalc.application", "!libecalc.core", "!libecalc.fixtures", "!libecalc.presentation"] - pdoc(*modules, output_directory=out) - - shutil.move(str(out / "libecalc.html"), str(destination)) - shutil.move(str(out / "libecalc"), str(destination)) - shutil.rmtree(out) From 6c9a4f36ce09c18eb679588dc3681b5f372807d5 Mon Sep 17 00:00:00 2001 From: Frode Helgetun Krogh <70878501+frodehk@users.noreply.github.com> Date: Wed, 11 Dec 2024 09:46:03 +0100 Subject: [PATCH 2/4] chore: remove api reference in workflow --- .github/workflows/docs-publish.yml | 5 ----- docs/make-api-reference.py | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 docs/make-api-reference.py diff --git a/.github/workflows/docs-publish.yml b/.github/workflows/docs-publish.yml index 5d1b57d3b6..4959672521 100644 --- a/.github/workflows/docs-publish.yml +++ b/.github/workflows/docs-publish.yml @@ -58,11 +58,6 @@ jobs: npm ci --ignore-scripts npm run build - - name: Generate API reference - run: | - cd docs - poetry run python make-api-reference.py - - name: Push static files to Github Pages branch run: | cd docs/build diff --git a/docs/make-api-reference.py b/docs/make-api-reference.py new file mode 100644 index 0000000000..81e23b5b35 --- /dev/null +++ b/docs/make-api-reference.py @@ -0,0 +1,25 @@ +import shutil +from pathlib import Path + +from pdoc import pdoc + + +if __name__ == "__main__": + """ + Autogenerate python API documentation + + Output will be put in the docusaurus build directory + """ + here = Path(__file__).parent + out = here / "temp_api_docs" + destination = here / "build" / "docs" / "about" / "getting_started" / "api" + if out.exists(): + shutil.rmtree(out) + + # Generate reference documentation using pdoc + modules = ["libecalc", "!libecalc.application", "!libecalc.core", "!libecalc.fixtures", "!libecalc.presentation"] + pdoc(*modules, output_directory=out) + + shutil.move(str(out / "libecalc.html"), str(destination)) + shutil.move(str(out / "libecalc"), str(destination)) + shutil.rmtree(out) From d4bed535f229e98111ccfb13b1d474db4d49631d Mon Sep 17 00:00:00 2001 From: Frode Helgetun Krogh <70878501+frodehk@users.noreply.github.com> Date: Wed, 11 Dec 2024 10:06:30 +0100 Subject: [PATCH 3/4] docs: remove make-api-reference --- docs/make-api-reference.py | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 docs/make-api-reference.py diff --git a/docs/make-api-reference.py b/docs/make-api-reference.py deleted file mode 100644 index 81e23b5b35..0000000000 --- a/docs/make-api-reference.py +++ /dev/null @@ -1,25 +0,0 @@ -import shutil -from pathlib import Path - -from pdoc import pdoc - - -if __name__ == "__main__": - """ - Autogenerate python API documentation - - Output will be put in the docusaurus build directory - """ - here = Path(__file__).parent - out = here / "temp_api_docs" - destination = here / "build" / "docs" / "about" / "getting_started" / "api" - if out.exists(): - shutil.rmtree(out) - - # Generate reference documentation using pdoc - modules = ["libecalc", "!libecalc.application", "!libecalc.core", "!libecalc.fixtures", "!libecalc.presentation"] - pdoc(*modules, output_directory=out) - - shutil.move(str(out / "libecalc.html"), str(destination)) - shutil.move(str(out / "libecalc"), str(destination)) - shutil.rmtree(out) From 98a101035f7279ba86bcc5d6ada040753c30897d Mon Sep 17 00:00:00 2001 From: Frode Helgetun Krogh <70878501+frodehk@users.noreply.github.com> Date: Wed, 11 Dec 2024 10:14:05 +0100 Subject: [PATCH 4/4] chore: remove api reference from docs-ci --- .github/workflows/docs-ci.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/docs-ci.yml b/.github/workflows/docs-ci.yml index f8b613fee9..294f87badd 100644 --- a/.github/workflows/docs-ci.yml +++ b/.github/workflows/docs-ci.yml @@ -51,8 +51,3 @@ jobs: cd docs npm ci --ignore-scripts npm run build - - - name: Generate API reference - run: | - cd docs - poetry run python make-api-reference.py