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

Simplify library installation #909

Merged
merged 109 commits into from
Sep 6, 2023
Merged

Simplify library installation #909

merged 109 commits into from
Sep 6, 2023

Conversation

PProfizi
Copy link
Contributor

@PProfizi PProfizi commented Apr 20, 2023

The goal of this PR is to simplify installation of pydpf-core when a user does pip install ansys-dpf-core:

  • it integrates ansys-dpf-gate and ansys-grpc-dpf as packages of the ansys-dpf-core library instead of separate packages, ensuring synchronization at install (only works for Ansys >= 222)
  • it also integrates ansys-dpf-gatebin binaries (windows and manylinux_1) which are loaded at runtime when required
  • It adds them however to the .gitignore so people do not commit changes to anything else than ansys.dpf.core
  • it changes the CI accordingly
  • update code generation scripts for ansys-dpf-gate, ansys-dpf-gatebin and ansys-grpc-dpf to accept a custom path (the one of the pydpf-core repo) (push version)
  • Add a script in .ci which updates all dependencies (pull version) based on two environment variables: one for ansys-grpc-dpf, one for ansys-dpf-gate and ansys-dpf-gatebin.
  • it changes the update_operators pipeline to also update ansys-dpf-gate, gatebin and ansys-grpc-dpf according to the latest in dpf-standalone/dist
  • Remove support for 221
  • Wait for legal
  • Update documentation

@PProfizi PProfizi added CI/CD Related to CI/CD maintenance Repository structure maintenance dependencies Related to package requirements labels Apr 20, 2023
@PProfizi PProfizi self-assigned this Apr 20, 2023
@codecov
Copy link

codecov bot commented Apr 20, 2023

Codecov Report

Merging #909 (48086d6) into master (bf5f83c) will decrease coverage by 1.27%.
The diff coverage is n/a.

❗ Current head 48086d6 differs from pull request most recent head f37f8c6. Consider uploading reports for the commit f37f8c6 to get more accurate results

@@            Coverage Diff             @@
##           master     #909      +/-   ##
==========================================
- Coverage   87.39%   86.13%   -1.27%     
==========================================
  Files          81       81              
  Lines        9197     9197              
==========================================
- Hits         8038     7922     -116     
- Misses       1159     1275     +116     

pyproject.toml Outdated Show resolved Hide resolved
src/ansys/dpf/__init__.py Outdated Show resolved Hide resolved
@@ -0,0 +1,310 @@
from typing import NamedTuple
import numpy as np
import weakref
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please point me to how we now handle using local binaries?

src/ansys/dpf/gate/__init__.py Outdated Show resolved Hide resolved
@PProfizi PProfizi added this to the v0.9.1 milestone Jul 25, 2023
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
print(f"{grpc_path_key} environment variable is not defined. "
"Cannot update ansys-grpc-dpf.")

if gate_path is not None:
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it would be great to run the "cparser" step to generate ansys-dpf-gate/generated content

Copy link
Contributor

@anslpa anslpa Aug 31, 2023

Choose a reason for hiding this comment

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

and generation of ansys-grpc-dpf

@@ -4,7 +4,8 @@ call sphinx-apidoc -o ../docs/source/api ../src/ansys ../src/ansys/dpf/core/log.
../src/ansys/dpf/core/field_base.py ../src/ansys/dpf/core/cache.py ../src/ansys/dpf/core/misc.py ^
../src/ansys/dpf/core/check_version.py ../src/ansys/dpf/core/operators/build.py ../src/ansys/dpf/core/operators/specification.py ^
../src/ansys/dpf/core/vtk_helper.py ../src/ansys/dpf/core/label_space.py ../src/ansys/dpf/core/examples/python_plugins/* ^
../src/ansys/dpf/core/examples/examples.py ../src/ansys/dpf/core/property_fields_container.py ^
../src/ansys/dpf/core/examples/examples.py ../src/ansys/dpf/gate/* ../src/ansys/dpf/gatebin/* ../src/ansys/grpc/dpf/* ^
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@PProfizi PProfizi merged commit 2c7f4bf into master Sep 6, 2023
24 of 26 checks passed
@PProfizi PProfizi deleted the maint/integrate_pygate branch September 6, 2023 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD Related to CI/CD dependencies Related to package requirements maintenance Repository structure maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants