Skip to content

Commit

Permalink
feat: Reorganize codegen and generated API files (#2767)
Browse files Browse the repository at this point in the history
* feat: move codegen

* feat: move codegen

* feat: Specify generated API dir as module variable

* feat: Specify generated API dir as module variable

* feat: Specify generated API dir as module variable

* feat: Specify generated API dir as module variable

* feat: doc

* fix: ci

* fix: dir creation in CI

* fix: search

* fix: 22.2 tuigen

* fix: test

* fix: test

* fix: test
  • Loading branch information
mkundu1 authored May 2, 2024
1 parent 336769c commit 8b253c1
Show file tree
Hide file tree
Showing 44 changed files with 330 additions and 347 deletions.
102 changes: 51 additions & 51 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,16 +145,16 @@ jobs:
id: cache-api-code
with:
path: |
src/ansys/fluent/core/datamodel_231
src/ansys/fluent/core/fluent_version_231.py
src/ansys/fluent/core/meshing/tui_231.py
src/ansys/fluent/core/solver/settings_231
src/ansys/fluent/core/solver/tui_231.py
src/ansys/fluent/core/generated/datamodel_231
src/ansys/fluent/core/generated/fluent_version_231.py
src/ansys/fluent/core/generated/meshing/tui_231.py
src/ansys/fluent/core/generated/solver/settings_231
src/ansys/fluent/core/generated/solver/tui_231.py
doc/source/api/meshing/tui
doc/source/api/meshing/datamodel
doc/source/api/solver/tui
doc/source/api/solver/datamodel
key: API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-${{ env.DOC_DEPLOYMENT_IMAGE_TAG }}-${{ hashFiles('codegen/**') }}
key: API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-${{ env.DOC_DEPLOYMENT_IMAGE_TAG }}-${{ hashFiles('src/ansys/fluent/core/codegen/**') }}
restore-keys: API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-${{ env.DOC_DEPLOYMENT_IMAGE_TAG }}

- name: Login to GitHub Container Registry
Expand Down Expand Up @@ -251,17 +251,17 @@ jobs:
id: cache-222-api-code
with:
path:
src/ansys/fluent/core/datamodel_222
src/ansys/fluent/core/fluent_version_222.py
src/ansys/fluent/core/meshing/tui_222.py
src/ansys/fluent/core/solver/settings_222
src/ansys/fluent/core/solver/tui_222.py
src/ansys/fluent/core/data/api_tree_222.pickle
src/ansys/fluent/core/generated/datamodel_222
src/ansys/fluent/core/generated/fluent_version_222.py
src/ansys/fluent/core/generated/meshing/tui_222.py
src/ansys/fluent/core/generated/solver/settings_222
src/ansys/fluent/core/generated/solver/tui_222.py
src/ansys/fluent/core/generated/data/api_tree_222.pickle
doc/source/api/core/meshing/tui
doc/source/api/core/meshing/datamodel
doc/source/api/core/solver/tui
doc/source/api/core/solver/datamodel
key: API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-v22.2.0-${{ hashFiles('codegen/**') }}
key: API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-v22.2.0-${{ hashFiles('src/ansys/fluent/core/codegen/**') }}
restore-keys: API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-v22.2.0

- name: Login to GitHub Container Registry
Expand All @@ -285,25 +285,25 @@ jobs:

- name: Print 22.2 Fluent version info
run: |
cat src/ansys/fluent/core/fluent_version_222.py
python -c "from ansys.fluent.core.solver.settings_222 import SHASH; print(f'SETTINGS_HASH = {SHASH}')"
cat src/ansys/fluent/core/generated/fluent_version_222.py
python -c "from ansys.fluent.core.generated.solver.settings_222 import SHASH; print(f'SETTINGS_HASH = {SHASH}')"
- name: Cache 23.1 API Code
uses: actions/cache@v4
id: cache-231-api-code
with:
path:
src/ansys/fluent/core/datamodel_231
src/ansys/fluent/core/fluent_version_231.py
src/ansys/fluent/core/meshing/tui_231.py
src/ansys/fluent/core/solver/settings_231
src/ansys/fluent/core/solver/tui_231.py
src/ansys/fluent/core/data/api_tree_231.pickle
src/ansys/fluent/core/generated/datamodel_231
src/ansys/fluent/core/generated/fluent_version_231.py
src/ansys/fluent/core/generated/meshing/tui_231.py
src/ansys/fluent/core/generated/solver/settings_231
src/ansys/fluent/core/generated/solver/tui_231.py
src/ansys/fluent/core/generated/data/api_tree_231.pickle
doc/source/api/core/meshing/tui
doc/source/api/core/meshing/datamodel
doc/source/api/core/solver/tui
doc/source/api/core/solver/datamodel
key: API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-v23.1.0-${{ hashFiles('codegen/**') }}
key: API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-v23.1.0-${{ hashFiles('src/ansys/fluent/core/codegen/**') }}
restore-keys: API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-v23.1.0

- name: Pull 23.1 Fluent docker image
Expand All @@ -320,25 +320,25 @@ jobs:

- name: Print 23.1 Fluent version info
run: |
cat src/ansys/fluent/core/fluent_version_231.py
python -c "from ansys.fluent.core.solver.settings_231 import SHASH; print(f'SETTINGS_HASH = {SHASH}')"
cat src/ansys/fluent/core/generated/fluent_version_231.py
python -c "from ansys.fluent.core.generated.solver.settings_231 import SHASH; print(f'SETTINGS_HASH = {SHASH}')"
- name: Cache 23.2 API Code
uses: actions/cache@v4
id: cache-232-api-code
with:
path:
src/ansys/fluent/core/datamodel_232
src/ansys/fluent/core/fluent_version_232.py
src/ansys/fluent/core/meshing/tui_232.py
src/ansys/fluent/core/solver/settings_232
src/ansys/fluent/core/solver/tui_232.py
src/ansys/fluent/core/data/api_tree_232.pickle
src/ansys/fluent/core/generated/datamodel_232
src/ansys/fluent/core/generated/fluent_version_232.py
src/ansys/fluent/core/generated/meshing/tui_232.py
src/ansys/fluent/core/generated/solver/settings_232
src/ansys/fluent/core/generated/solver/tui_232.py
src/ansys/fluent/core/generated/data/api_tree_232.pickle
doc/source/api/core/meshing/tui
doc/source/api/core/meshing/datamodel
doc/source/api/core/solver/tui
doc/source/api/core/solver/datamodel
key: API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-v23.2.0-${{ hashFiles('codegen/**') }}
key: API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-v23.2.0-${{ hashFiles('src/ansys/fluent/core/codegen/**') }}
restore-keys: API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-v23.2.0

- name: Pull 23.2 Fluent docker image
Expand All @@ -355,25 +355,25 @@ jobs:

- name: Print 23.2 Fluent version info
run: |
cat src/ansys/fluent/core/fluent_version_232.py
python -c "from ansys.fluent.core.solver.settings_232 import SHASH; print(f'SETTINGS_HASH = {SHASH}')"
cat src/ansys/fluent/core/generated/fluent_version_232.py
python -c "from ansys.fluent.core.generated.solver.settings_232 import SHASH; print(f'SETTINGS_HASH = {SHASH}')"
- name: Cache 24.1 API Code
uses: actions/cache@v4
id: cache-241-api-code
with:
path:
src/ansys/fluent/core/datamodel_241
src/ansys/fluent/core/fluent_version_241.py
src/ansys/fluent/core/meshing/tui_241.py
src/ansys/fluent/core/solver/settings_241
src/ansys/fluent/core/solver/tui_241.py
src/ansys/fluent/core/data/api_tree_241.pickle
src/ansys/fluent/core/generated/datamodel_241
src/ansys/fluent/core/generated/fluent_version_241.py
src/ansys/fluent/core/generated/meshing/tui_241.py
src/ansys/fluent/core/generated/solver/settings_241
src/ansys/fluent/core/generated/solver/tui_241.py
src/ansys/fluent/core/generated/data/api_tree_241.pickle
doc/source/api/core/meshing/tui
doc/source/api/core/meshing/datamodel
doc/source/api/core/solver/tui
doc/source/api/core/solver/datamodel
key: API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-v24.1.0-${{ hashFiles('codegen/**') }}
key: API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-v24.1.0-${{ hashFiles('src/ansys/fluent/core/codegen/**') }}
restore-keys: API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-v24.1.0

- name: Pull 24.1 Fluent docker image
Expand All @@ -390,25 +390,25 @@ jobs:

- name: Print 24.1 Fluent version info
run: |
cat src/ansys/fluent/core/fluent_version_241.py
python -c "from ansys.fluent.core.solver.settings_241 import SHASH; print(f'SETTINGS_HASH = {SHASH}')"
cat src/ansys/fluent/core/generated/fluent_version_241.py
python -c "from ansys.fluent.core.generated.solver.settings_241 import SHASH; print(f'SETTINGS_HASH = {SHASH}')"
- name: Cache 24.2 API Code
uses: actions/cache@v4
id: cache-242-api-code
with:
path:
src/ansys/fluent/core/datamodel_242
src/ansys/fluent/core/fluent_version_242.py
src/ansys/fluent/core/meshing/tui_242.py
src/ansys/fluent/core/solver/settings_242
src/ansys/fluent/core/solver/tui_242.py
src/ansys/fluent/core/data/api_tree_242.pickle
src/ansys/fluent/core/generated/datamodel_242
src/ansys/fluent/core/generated/fluent_version_242.py
src/ansys/fluent/core/generated/meshing/tui_242.py
src/ansys/fluent/core/generated/solver/settings_242
src/ansys/fluent/core/generated/solver/tui_242.py
src/ansys/fluent/core/generated/data/api_tree_242.pickle
doc/source/api/core/meshing/tui
doc/source/api/core/meshing/datamodel
doc/source/api/core/solver/tui
doc/source/api/core/solver/datamodel
key: API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-v24.2.0-${{ hashFiles('codegen/**') }}
key: API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-v24.2.0-${{ hashFiles('src/ansys/fluent/core/codegen/**') }}
restore-keys: API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-v24.2.0

- name: Pull 24.2 Fluent docker image
Expand All @@ -425,8 +425,8 @@ jobs:

- name: Print 24.2 Fluent version info
run: |
cat src/ansys/fluent/core/fluent_version_242.py
python -c "from ansys.fluent.core.solver.settings_242 import SHASH; print(f'SETTINGS_HASH = {SHASH}')"
cat src/ansys/fluent/core/generated/fluent_version_242.py
python -c "from ansys.fluent.core.generated.solver.settings_242 import SHASH; print(f'SETTINGS_HASH = {SHASH}')"
- name: Install again after codegen
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-run-custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:

- name: Print Fluent version info
run: |
cat src/ansys/fluent/core/fluent_version_${{ matrix.version }}.py
cat src/ansys/fluent/core/generated/fluent_version_${{ matrix.version }}.py
- name: Install again after codegen
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-run-dev-version-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ jobs:

- name: Print 24.2 Fluent version info
run: |
cat src/ansys/fluent/core/fluent_version_242.py
python -c "from ansys.fluent.core.solver.settings_242 import SHASH; print(f'SETTINGS_HASH = {SHASH}')"
cat src/ansys/fluent/core/generated/fluent_version_242.py
python -c "from ansys.fluent.core.generated.solver.settings_242 import SHASH; print(f'SETTINGS_HASH = {SHASH}')"
- name: Install again after codegen
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-run-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ jobs:

- name: Print 24.1 Fluent version info
run: |
cat src/ansys/fluent/core/fluent_version_241.py
python -c "from ansys.fluent.core.solver.settings_241 import SHASH; print(f'SETTINGS_HASH = {SHASH}')"
cat src/ansys/fluent/core/generated/fluent_version_241.py
python -c "from ansys.fluent.core.generated.solver.settings_241 import SHASH; print(f'SETTINGS_HASH = {SHASH}')"
- name: Install again after codegen
run: |
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test-run-old-versions-weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ jobs:

- name: Print 22.2 Fluent version info
run: |
cat src/ansys/fluent/core/fluent_version_222.py
python -c "from ansys.fluent.core.solver.settings_222 import SHASH; print(f'SETTINGS_HASH = {SHASH}')"
cat src/ansys/fluent/core/generated/fluent_version_222.py
python -c "from ansys.fluent.core.generated.solver.settings_222 import SHASH; print(f'SETTINGS_HASH = {SHASH}')"
- name: Pull 23.1 Fluent docker image
run: make docker-pull
Expand All @@ -81,8 +81,8 @@ jobs:

- name: Print 23.1 Fluent version info
run: |
cat src/ansys/fluent/core/fluent_version_231.py
python -c "from ansys.fluent.core.solver.settings_231 import SHASH; print(f'SETTINGS_HASH = {SHASH}')"
cat src/ansys/fluent/core/generated/fluent_version_231.py
python -c "from ansys.fluent.core.generated.solver.settings_231 import SHASH; print(f'SETTINGS_HASH = {SHASH}')"
- name: Pull 23.2 Fluent docker image
run: make docker-pull
Expand All @@ -96,8 +96,8 @@ jobs:

- name: Print 23.2 Fluent version info
run: |
cat src/ansys/fluent/core/fluent_version_232.py
python -c "from ansys.fluent.core.solver.settings_231 import SHASH; print(f'SETTINGS_HASH = {SHASH}')"
cat src/ansys/fluent/core/generated/fluent_version_232.py
python -c "from ansys.fluent.core.generated.solver.settings_231 import SHASH; print(f'SETTINGS_HASH = {SHASH}')"
- name: Install again after codegen
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-run-solvermode-weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ jobs:

- name: Print 24.2 Fluent version info
run: |
cat src/ansys/fluent/core/fluent_version_242.py
python -c "from ansys.fluent.core.solver.settings_242 import SHASH; print(f'SETTINGS_HASH = {SHASH}')"
cat src/ansys/fluent/core/generated/fluent_version_242.py
python -c "from ansys.fluent.core.generated.solver.settings_242 import SHASH; print(f'SETTINGS_HASH = {SHASH}')"
- name: Install again after codegen
run: |
Expand Down
6 changes: 1 addition & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,7 @@ dmypy.json
.vscode

# generated API files
src/ansys/fluent/core/fluent_version_*.py
src/ansys/fluent/core/meshing/tui_*.py
src/ansys/fluent/core/solver/tui_*.py
src/ansys/fluent/core/datamodel_*/
src/ansys/fluent/core/solver/settings_*/
src/ansys/fluent/core/generated/

# Fluent generated files
*.trn
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ repos:
'flake8-annotations==3.0.1'
]
args: [
--exclude, src/ansys/fluent/core/meshing/tui* src/ansys/fluent/core/solver/tui* src/ansys/fluent/core/datamodel_222/* src/ansys/fluent/core/datamodel_231/* src/ansys/fluent/core/datamodel_232/* src/ansys/fluent/core/datamodel_241/* src/ansys/fluent/core/solver/settings_222/* src/ansys/fluent/core/solver/settings_231/* src/ansys/fluent/core/solver/settings_232/* src/ansys/fluent/core/solver/settings_241/*,
--exclude, src/ansys/fluent/core/generated,
--select, W191 W291 W293 W391 E115 E117 E122 E124 E125 E225 E231 E301 E303 F401 F403 N801 N802 N803 N804 N805 N806,
#--select, W191 W291 W293 W391 E115 E117 E122 E124 E125 E225 E231 E301 E303 F401 F403 N801 N802 N803 N804 N805 N806 ANN001 ANN201 ANN205 ANN206,
--count,
--statistics,
--max-complexity, "10",
--max-line-length, "88",
--extend-ignore, E203 E501,
ansys, codegen, doc, examples, tests
ansys, doc, examples, tests
]

- repo: https://github.com/codespell-project/codespell
Expand Down
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ include src/ansys/fluent/core/docs/README.rst
include src/ansys/fluent/core/logging_config.yaml
include src/ansys/fluent/core/quantity/cfg.yaml
include src/ansys/fluent/core/launcher/watchdog_exec
recursive-include src/ansys/fluent/core *pyi
recursive-include src/ansys/fluent/core/data api_tree_*.pickle
recursive-include src/ansys/fluent/core *.pyi
recursive-include src/ansys/fluent/core *.pickle
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ development version or previously released versions.
You can also `view <https://cheatsheets.docs.pyansys.com/pyfluent_cheat_sheet.png>`_ or
`download <https://cheatsheets.docs.pyansys.com/pyfluent_cheat_sheet.pdf>`_ the
PyFluent cheat sheet. This one-page reference provides syntax rules and commands
for using PyFluent.
for using PyFluent.

On the `PyFluent Issues <https://github.com/ansys/pyfluent/issues>`_ page, you can create
issues to report bugs and request new features. On the `PyFluent Discussions
<https://github.com/ansys/pyfluent/discussions>`_ page or the `Discussions <https://discuss.ansys.com/>`_
page on the Ansys Developer portal, you can post questions, share ideas, and get community feedback.
page on the Ansys Developer portal, you can post questions, share ideas, and get community feedback.

To reach the project support team, email `[email protected] <[email protected]>`_.

Expand Down
Loading

0 comments on commit 8b253c1

Please sign in to comment.