Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various improvements to streamline example code #350

Merged
merged 40 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
4aeb607
Initial prototypes for workflow and examples
janvonrickenbach Jan 19, 2024
8bcfa09
Move to_pvista function to individual data points
janvonrickenbach Jan 22, 2024
80ff74d
Cleanup example
janvonrickenbach Jan 23, 2024
b81ed76
Fix component names in mesh data
janvonrickenbach Jan 23, 2024
40f5444
Initial prototypes for workflow and examples
janvonrickenbach Jan 23, 2024
d88d2f4
Document upload and download
janvonrickenbach Jan 23, 2024
2152ab7
Remove unneeded readme parts
janvonrickenbach Jan 23, 2024
f3faadd
Initial prototypes for workflow and examples
janvonrickenbach Jan 24, 2024
7702f4f
Improve plotting API
janvonrickenbach Jan 24, 2024
7e2c94a
Move temp directory logic from ACP Client to ACP workflow
janvonrickenbach Jan 24, 2024
d6c4204
Merge with main
janvonrickenbach Jan 25, 2024
5f7f062
Add type hints for plot data objects
janvonrickenbach Jan 25, 2024
d2e6ef8
Get example files from example-data repo
janvonrickenbach Jan 25, 2024
8ce6887
Fix download location of example
janvonrickenbach Jan 25, 2024
3f3c5e6
Fix package structure and add documentation
janvonrickenbach Jan 25, 2024
bc7f779
Delay import of ansys-dpf-composites
janvonrickenbach Jan 25, 2024
db17cab
Finish tree printer
janvonrickenbach Jan 26, 2024
b11678e
Add tests for workflow
janvonrickenbach Jan 26, 2024
fe570fb
Merge branch 'main' into feat/cleanup_for_release
janvonrickenbach Jan 26, 2024
35d4295
Add type checks for plots
janvonrickenbach Jan 26, 2024
153de9c
Return labels the same way as other data.
janvonrickenbach Jan 26, 2024
2b2e8cc
Convert unit systems.
janvonrickenbach Jan 29, 2024
8d12d56
Delay imports from dpf core
janvonrickenbach Jan 29, 2024
92128de
Remove obsolete local example
janvonrickenbach Jan 29, 2024
ec44b32
Remove obsolete local example
janvonrickenbach Jan 29, 2024
cb2c796
Remove obsolete local example
janvonrickenbach Jan 29, 2024
116231c
Fix docstring
janvonrickenbach Jan 30, 2024
2e23309
Avoid modifications of input files and fix doc
janvonrickenbach Jan 30, 2024
a4c3acd
Remove obsolete input file
janvonrickenbach Jan 30, 2024
d5d6b47
Implement PR comments
janvonrickenbach Jan 31, 2024
581386a
Improve tree printer
janvonrickenbach Jan 31, 2024
73d57f9
Update src/ansys/acp/core/_workflow.py
janvonrickenbach Jan 31, 2024
f448438
Update src/ansys/acp/core/_workflow.py
janvonrickenbach Jan 31, 2024
ddc2f37
Update src/ansys/acp/core/_workflow.py
janvonrickenbach Jan 31, 2024
4e912b9
Fix renames
janvonrickenbach Jan 31, 2024
fb0dba0
Better import error for optional dependencies
janvonrickenbach Jan 31, 2024
22c0bc4
Fix renames
janvonrickenbach Jan 31, 2024
423b387
Fix examples title
janvonrickenbach Jan 31, 2024
560a9c3
Remove note on docker containers from example readme
janvonrickenbach Jan 31, 2024
af1b49c
Close open dpf streams by setting composite model to None
janvonrickenbach Jan 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,11 @@ jobs:
- name: Build HTML
run: |
xvfb-run poetry run make -C doc html SPHINXOPTS="-W --keep-going -v"
env:
PYMAPDL_PORT: "50557"
PYMAPDL_START_INSTANCE: "FALSE"
PYDPF_COMPOSITES_DOCKER_CONTAINER_PORT: "50558"


- name: Stop and clean up MAPDL and DPF servers
run: |
Expand Down
38 changes: 17 additions & 21 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -153,19 +153,9 @@ You will need to follow these steps:

poetry shell

.. TODO: If we add tox, add instructions on its use here.

.. 6. Verify your development installation by running:

.. .. code-block:: bash

.. tox

Testing
^^^^^^^

.. TODO: If we add tox, add instructions on its use here.

The PyACP test suite uses `pytest`_. You can run it with

.. code-block:: bash
Expand Down Expand Up @@ -210,16 +200,9 @@ need to create a commit without running the hooks, you can skip them with ``git

Documentation
^^^^^^^^^^^^^

To build the documentation, DPF Composites and MAPDL servers need to be running:

.. code-block:: bash

docker-compose -f docker-compose/docker-compose-extras.yaml up -d

In addition, the PyACP server needs to be configured via ``ansys-launcher``, see `Launching ACP <launching_server>`_ above.

It can then be built using `Sphinx`_.
Before generating the documentation, configure the PyACP server via the
``ansys-launcher``, see `Launching ACP <launching_server>`_ above.
If Ansys is installed the examples can directly built with `Sphinx`_.

On Linux & MacOS:

Expand All @@ -235,6 +218,20 @@ On Windows:

The generated HTML files can be viewed with the browser of your choice.

Alternatively you can build the documentation by starting a mapdl and pydpf-composites docker
container. First ensure that you have accepted the DPF Preview License Agreement by setting the
ANSYS_DPF_ACCEPT_LA environment variable to Y
(see `DPF Preview License Agreement <https://dpf.docs.pyansys.com/version/stable/user_guide/getting_started_with_dpf_server.html#dpf-preview-license-agreement>`_
). In addition the ANSYSLMD_LICENSE_FILE environment variable needs be set to a
valid license server (e.g [email protected]). Then start the docker containers with:

.. code-block:: bash

docker-compose -f docker-compose/docker-compose-extras.yaml up -d

Then build the documentation with the `Sphinx`_ commands mentioned above.


Distribution
^^^^^^^^^^^^

Expand Down Expand Up @@ -264,4 +261,3 @@ License
.. _pre-commit: https://pre-commit.com/
.. _pytest: https://docs.pytest.org/en/stable/
.. _Sphinx: https://www.sphinx-doc.org/en/master/
.. _tox: https://tox.wiki/
1 change: 1 addition & 0 deletions doc/source/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ and attributes.
linked_object_definitions
material_property_sets
other_types
workflow
2 changes: 2 additions & 0 deletions doc/source/api/tree_objects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ ACP objects
ProductionPly
AnalysisPly
Sensor
ScalarData
VectorData
16 changes: 16 additions & 0 deletions doc/source/api/workflow.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Workflow
--------

.. currentmodule:: ansys.acp.core

.. autosummary::
:toctree: _autosummary

ACPWorkflow
get_composite_post_processing_files
get_model_tree
get_dpf_unit_system
print_model



3 changes: 0 additions & 3 deletions doc/source/examples/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,3 @@ Examples

.. include:: gallery_examples/index.rst
:start-line: 2

:doc:`./others/local_pyacp_executable` demonstrates running the
PyACP server from a local executable instead of in a Docker container
Loading