Skip to content

Commit

Permalink
Remove docstrings_common.json and do not track this file here since t…
Browse files Browse the repository at this point in the history
…his is actually not needed

Instead, trigger the rebuild of the documentation when docstrings_common.json is updated in opm-common
  • Loading branch information
lisajulia committed Jun 26, 2024
1 parent eaffa1b commit 8a70d0c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 155 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/python_sphinx_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:
paths:
- 'python/**'
- '.github/workflows/python_sphinx_docs.yml'
repository_dispatch:
types: [docstrings_common_updated]
permissions:
contents: write
jobs:
Expand All @@ -21,6 +23,9 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all tags and branches
- name: Get docstrings_common.json from opm-common
run: |
curl -L -o python/docstrings_common.json https://raw.githubusercontent.com/${{ github.repository_owner }}/opm-common/master/python/docstrings_common.json
- name: Set up Python
uses: actions/setup-python@v5
with:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ build/
# Python sphinx build
python/sphinx_docs/docs/_build/

# docstrings_common.json - this is copied over from opm-common and not tracked here
python/docstrings_common.json

# Python cache directories
**/__pycache__/

155 changes: 0 additions & 155 deletions python/docstrings_common.json

This file was deleted.

4 changes: 4 additions & 0 deletions python/simulators/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ add_custom_command(
COMMENT "Generating PyBlackOilSimulatorDoc.hpp from JSON file"
)

# This file from opm-common is needed to build the documentation using Sphinx
# For local builds of the documentation, it is copied to opm-simulators from opm-common
# For the online documentation, this file is copied using a github Action
# This file is not tracked by git here, it is in the .gitignore
find_file(DOCSTRINGS_JSON docstrings_common.json
PATHS ${opm-common_DIR} ${opm-common_PYTHON_COMMON_DIR}
PATH_SUFFIXES python NO_DEFAULT_PATH REQUIRED)
Expand Down

0 comments on commit 8a70d0c

Please sign in to comment.