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

Conversation

janvonrickenbach
Copy link
Contributor

@janvonrickenbach janvonrickenbach commented Jan 23, 2024

  • Add self contained example that builds an ACP model from a cdb file that just contains the mesh.
  • Add workflow helper to simplify file transfer operations
  • Move to_pyvista function one level lower so that the user does not have to specify the component enums.
  • Add tree printer

closes #343
closes #232

Todo:

  • How should we handle the dependency on pydpf-composites?

Done

  • Add docs
  • Add description to example
  • Upload example files to examples repo
  • Complete tree printer including docs
  • Add tests for workflow with and without temp directory
  • Add type inference tests for plots.
  • Expose labels in the same way as the remaining data
  • check if runtime type matches the declared type for VectorData and ScalarData
  • Convert pyACP unit system to dpf unit system

Postponed:

examples/002_start_from_existing_project.py Show resolved Hide resolved
src/ansys/acp/core/model_printer.py Outdated Show resolved Hide resolved
examples/data/flat_plate/flat_plate_input.dat Outdated Show resolved Hide resolved
examples/solve_class40.py Show resolved Hide resolved
examples/001_basic_flat_plate.py Outdated Show resolved Hide resolved
Copy link
Member

@greschd greschd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall! Some nit-picky discussion points below.

README.rst Outdated Show resolved Hide resolved
examples/001_basic_flat_plate.py Outdated Show resolved Hide resolved
src/ansys/acp/core/_client.py Outdated Show resolved Hide resolved
src/ansys/acp/core/_client.py Outdated Show resolved Hide resolved
src/ansys/acp/core/_tree_objects/_mesh_data.py Outdated Show resolved Hide resolved
src/ansys/acp/core/_tree_objects/_mesh_data.py Outdated Show resolved Hide resolved
src/ansys/acp/core/model_printer.py Outdated Show resolved Hide resolved
@janvonrickenbach janvonrickenbach marked this pull request as ready for review January 29, 2024 10:19
README.rst Show resolved Hide resolved
README.rst Show resolved Hide resolved
doc/source/api/workflow.rst Show resolved Hide resolved
examples/001_basic_flat_plate.py Outdated Show resolved Hide resolved
examples/001_basic_flat_plate.py Show resolved Hide resolved
src/ansys/acp/core/_workflow.py Show resolved Hide resolved
src/ansys/acp/core/_workflow.py Outdated Show resolved Hide resolved
@greschd
Copy link
Member

greschd commented Jan 29, 2024

I've just noticed the following: when running the tests with a local executable, we now get new and modified files (tracked by git) in the tests/data directory. This should probably be addressed by modifying the corresponding tests.

I haven't looked into it in detail, but if I'd have to guess: this is probably because the tests previously used a tempdir by default.

examples/001_basic_flat_plate.py Show resolved Hide resolved
examples/001_basic_flat_plate.py Outdated Show resolved Hide resolved
examples/001_basic_flat_plate.py Show resolved Hide resolved
examples/001_basic_flat_plate.py Show resolved Hide resolved
examples/001_basic_flat_plate.py Show resolved Hide resolved
src/ansys/acp/core/_workflow.py Outdated Show resolved Hide resolved
src/ansys/acp/core/_workflow.py Outdated Show resolved Hide resolved
src/ansys/acp/core/_workflow.py Show resolved Hide resolved
src/ansys/acp/core/_workflow.py Outdated Show resolved Hide resolved
src/ansys/acp/core/_workflow.py Show resolved Hide resolved
@janvonrickenbach
Copy link
Contributor Author

I've just noticed the following: when running the tests with a local executable, we now get new and modified files (tracked by git) in the tests/data directory. This should probably be addressed by modifying the corresponding tests.

I haven't looked into it in detail, but if I'd have to guess: this is probably because the tests previously used a tempdir by default.

Yes has been resovlved by creating additional temp directories in some tests.

@janvonrickenbach janvonrickenbach enabled auto-merge (squash) January 31, 2024 16:28
@janvonrickenbach janvonrickenbach merged commit cc7c17d into main Jan 31, 2024
10 checks passed
@janvonrickenbach janvonrickenbach deleted the feat/cleanup_for_release branch January 31, 2024 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unify local and remote examples Create helper to convert ACP unit system to DPF unit system
3 participants