-
Notifications
You must be signed in to change notification settings - Fork 23
Simplify library installation #909
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
Merged
Merged
Changes from all commits
Commits
Show all changes
109 commits
Select commit
Hold shift + click to select a range
f243fdb
Add gate module in src/ansys/dpf/
PProfizi 16849b6
remove ansys-dpf-gate from direct dependencies
PProfizi cf4da1b
Add grpc/dpf module to src/ansys/
PProfizi e7213bf
remove ansys-grpc-dpf from requirements_dev.txt
PProfizi ede7512
Fix assert in test_data_tree.py/test_runtime_core_config
PProfizi 48700e2
Temporary fix to dpf_mesh_to_vtk_py
PProfizi 5a2acb2
By default ignore changes to src/ansys/dpf/gate, ansys/dpf/gatebin an…
PProfizi 8b0137d
Remove requirements_dev.txt with gatebin
PProfizi 9c78323
Add gatebin for windows directly
PProfizi d440f84
Revert "Remove requirements_dev.txt with gatebin"
PProfizi 585b896
Remove gatebin from requirements_dev.txt
PProfizi 08828ca
Refactor package for single wheel
PProfizi 9c2a90d
Add manylinux_1 versions of gatebin binaries
PProfizi 516c5e3
Add grpcio as dependency (was working due to something in requirement…
PProfizi f6013a7
Add google-api-python-client as dependency (was working due to someth…
PProfizi 6045767
Exclude gate, gatebin and grpc from api-doc generation
PProfizi 25d774c
Fix title underlines in examples
PProfizi fea1aa7
Update .gitignore
PProfizi 2a5fe22
Update .pre-commit-config.yaml
PProfizi cd66c96
Move everything into src/ansys/dpf/core, also move grpc to src/ansys/…
PProfizi 2a9044b
Fix imports due to refactor
PProfizi c9a4a56
Fix imports due to refactor
PProfizi 8ee7b0f
Add missing refactored files
PProfizi 0107d26
Fix gate/load_pi.py/_try_use_gatebin()
PProfizi 76c1bea
Merge branch 'master' into maint/integrate_pygate
PProfizi d3fe97c
Fix gate/load_pi.py/_find_outdated_ansys_version()
PProfizi a9af2fa
Add .so gatebin binaries
PProfizi dc7dc44
Fix expected path to gatebin module in test_service.py
PProfizi 71c6b57
Update codacy.yml and .gitignore
PProfizi 0d3f558
Try and fix 02-volume_averaged_stress.py for Docker
PProfizi 8d7795a
Fix 04-extrapolation_stress_3d.py for Docker
PProfizi 5beed3d
Switch to setuptools as backend building tool to allow for several pa…
PProfizi df68a6c
Fix ansys/grpc/dpf instead of ansys/dpf/grpc in ignores
PProfizi 1f6706e
Revert operators/math changes due to testing
PProfizi 7268dfe
Include ansys.dpf.gate.generated in packaged packages
PProfizi 9cb010f
Include all in setup("packages")
PProfizi 2854f72
Revert changes to 04-extrapolation_stress_3d.py
PProfizi 219e4d6
Add a 10mn timeout to Test API Entry on Docker
PProfizi e442c1b
Try fix elemental_nodal_to_nodal_fc.outputs[1].type_names
PProfizi 60502af
update_operators.yml now unzips ansys_grpc_dpf in src/ansys/
PProfizi 2ab3265
update_operators.yml now unzips ansys_grpc_dpf in src/ansys/
PProfizi 1c22e2e
update_operators.yml now unzips ansys_grpc_dpf in src/ansys/
PProfizi f94be67
update_operators.yml now unzips ansys_grpc_dpf in src/ansys/
PProfizi 221431e
update_operators.yml now unzips ansys_grpc_dpf in src/ansys/
PProfizi 387293b
update_operators.yml now unzips ansys_grpc_dpf in src/ansys/
PProfizi 9f7ef26
update_operators.yml now unzips ansys_grpc_dpf in src/ansys/
PProfizi fe1acf7
update_operators.yml now unzips ansys_grpc_dpf in src/ansys/
PProfizi 6e34cee
update_operators.yml now unzips ansys_grpc_dpf in src/ansys/
PProfizi b91ca50
update_operators.yml now unzips ansys_grpc_dpf in src/ansys/
PProfizi 9a25b0a
update_operators.yml now unzips ansys_grpc_dpf in src/ansys/
PProfizi 9c8db29
update_operators.yml now unzips ansys_grpc_dpf in src/ansys/ as well …
PProfizi 0fdc616
update_operators.yml now unzips ansys_grpc_dpf in src/ansys/ as well …
PProfizi 7fd82ac
update_operators.yml now unzips ansys_grpc_dpf in src/ansys/ as well …
PProfizi c9b4717
Improve debugging for operators/build;py
PProfizi bed5415
Temp hack to bypass broken operators sweeping_phase specs
PProfizi 3365713
Revert "Temp hack to bypass broken operators sweeping_phase specs"
PProfizi 5bbba2c
Temporarily bypass the mesh_to_vtk operator
PProfizi f79f67c
Fix use of input standalone-suffix
PProfizi 0b8bffe
update operators (#916)
github-actions[bot] 2cf5e0e
Remove previous grpc and gate files and force git add
PProfizi de4039f
Merge remote-tracking branch 'origin/maint/integrate_pygate' into mai…
PProfizi 6ea33c6
Merge branch 'master' into maint/integrate_pygate
PProfizi 6175b30
Merge branch 'master' into maint/integrate_pygate
PProfizi 6c7b291
Merge branch 'master' into maint/integrate_pygate
PProfizi ab5f3d6
Merge branch 'master' into maint/integrate_pygate
PProfizi a910c3c
Still bypass mesh_to_pyvista_op
PProfizi d80edc2
Bypass bug on plot for 00-compute_and_average.py
PProfizi 9adc885
Move all metadata to pyproject.toml, keep setup.py for retro-compatib…
PProfizi 2f43b1d
Merge branch 'master' into maint/integrate_pygate
PProfizi 494d72a
Add update_dpf_dependencies.py script
PProfizi bbedb80
Add update_dpf_dependencies.py script
PProfizi cf35e7d
Remove support for 221 (incompatible with this refactoring of the pac…
PProfizi 5f1135c
Merge branch 'master' into maint/integrate_pygate
PProfizi de93666
Merge branch 'master' into maint/integrate_pygate
PProfizi 0df8e05
Updated dpf dependencies
PProfizi 594f56b
Updated dpf dependencies
PProfizi 17e9a62
Merge remote-tracking branch 'origin/maint/integrate_pygate' into mai…
PProfizi 7629a71
Merge branch 'master' into maint/integrate_pygate
PProfizi f321d17
Updated dpf dependencies
PProfizi 4ccf5c4
Updated dpf dependencies
PProfizi 431278c
Updated dpf dependencies
PProfizi 0fdde42
Merge remote-tracking branch 'origin/maint/integrate_pygate' into mai…
PProfizi 40f60f6
Updated dpf dependencies
PProfizi a769617
Add missing generic_data_container_pb2.py and generic_data_container_…
PProfizi dfc67f2
Update with latest dist from dpf-standalone
PProfizi 2cf8dd9
Merge branch 'master' into maint/integrate_pygate
PProfizi 61b1a8b
Update with latest dist from dpf-standalone
PProfizi 30e0bce
Remove custom requirements and custom wheels inputs and parameters fr…
PProfizi 70a225f
Merge branch 'master' into maint/integrate_pygate
PProfizi 9e51db0
Rename ANSYS_DPF_GATE_ROOT -> ANSYSDPFPYGATE_ROOT, ANSYS_DPF_GRPC_ROO…
PProfizi f5d83cb
update operators (#1109)
github-actions[bot] d9f56ea
Merge branch 'master' into maint/integrate_pygate
PProfizi 64536c4
Fix gatebin integration and core.helpers integration
PProfizi 8cb01f5
Use branches _integrate_gate for dpf-standalone
PProfizi accad6c
Fix test_load_api_without_awp_root_no_gatebin
PProfizi 55cf8fe
Fix gate.load_api._try_use_gatebin
PProfizi d3c52cb
Set branch for update_operators.yml to _test_pygate
PProfizi 007d8ab
Update update_dpf_dependencies.py for debug
PProfizi 2dfcf5d
Update update_dpf_dependencies.py for improved path treatment
PProfizi 68a481a
Update Operators for DPF 241_test_pygate on maint/integrate_pygate (#…
github-actions[bot] eb830c3
Fix doc step
PProfizi 945439c
Merge branch 'master' into maint/integrate_pygate
PProfizi 72bdeaa
Make package discovery dynamic
PProfizi cbe3c27
Fix package_data
PProfizi 6bed6a9
Fix build_doc.bat fluid images copy
PProfizi 5ddc8f7
update operators (#1136)
github-actions[bot] 35952af
Improve update PR text
PProfizi 48086d6
Merge branch 'master' into maint/integrate_pygate
PProfizi f37f8c6
Set CI back to main dpf-standalone branches
PProfizi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
"""Script to update ansys-dpf-gate, ansys-dpf-gatebin and ansys-grpc-dpf based on repositories | ||
|
||
This script should only be used to quickly test changes to any of these dependencies. | ||
Actual commit of updated code should not occur. | ||
The GitHub pipelines take care of the actual update in ansys-dpf-core. | ||
|
||
Define environment variables to know where to get the code from: | ||
- "DPFDV_ROOT" defines the DPF repo where ansys-grpc-dpf resides. | ||
Will unzip the latest wheel built in DPF/proto/dist/. | ||
- "ANSYSDPFPYGATE_ROOT" defines where the ansys-dpf-pygate repository resides. | ||
|
||
It will update the current repo | ||
or the repo defined by the environment variable "ANSYSDPFCORE_ROOT" if it exists. | ||
""" | ||
import os | ||
import glob | ||
import pathlib | ||
import platform | ||
import shutil | ||
import zipfile | ||
|
||
|
||
grpc_path_key = "DPFDV_ROOT" | ||
gate_path_key = "ANSYSDPFPYGATE_ROOT" | ||
core_path = pathlib.Path(__file__).parent.parent.resolve() | ||
if "ANSYSDPFCORE_ROOT" in os.environ: | ||
core_path = os.environ["ANSYSDPFCORE_ROOT"] | ||
|
||
grpc_path = os.getenv(grpc_path_key, None) | ||
gate_path = os.getenv(gate_path_key, None) | ||
|
||
if grpc_path is not None: | ||
# Update ansys-grpc-dpf with latest in proto/dist | ||
print("Updating ansys.grpc.dpf") | ||
dist_path = os.path.join(grpc_path, "proto", "dist", "*") | ||
print(f"from {dist_path}") | ||
destination = os.path.join(core_path, "src") | ||
print(f"into {destination}") | ||
latest_wheel = max(glob.glob(dist_path), key=os.path.getctime) | ||
with zipfile.ZipFile(latest_wheel, 'r') as wheel: | ||
for file in wheel.namelist(): | ||
# print(file) | ||
if file.startswith('ansys/'): | ||
wheel.extract( | ||
file, | ||
path=destination, | ||
) | ||
print("Done updating ansys-grpc-dpf") | ||
else: | ||
print(f"{grpc_path_key} environment variable is not defined. " | ||
"Cannot update ansys-grpc-dpf.") | ||
|
||
if gate_path is not None: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and generation of ansys-grpc-dpf |
||
# Update ansys-dpf-gate | ||
print("Updating ansys.dpf.gate") | ||
dist_path = os.path.join(gate_path, "ansys-dpf-gate", "ansys") | ||
print(f"from {dist_path}") | ||
destination = os.path.join(core_path, "src", "ansys") | ||
print(f"into {destination}") | ||
shutil.copytree( | ||
src=dist_path, | ||
dst=destination, | ||
dirs_exist_ok=True, | ||
ignore=lambda directory, contents: ["__pycache__"] if directory[-5:] == "gate" else [], | ||
) | ||
print("Done updating ansys-dpf-gate") | ||
|
||
# Update ansys-dpf-gatebin | ||
print("Updating ansys.dpf.gatebin") | ||
dist_path = os.path.join(gate_path, "ansys-dpf-gatebin", "ansys") | ||
print(f"from {dist_path}") | ||
destination = os.path.join(core_path, "src", "ansys") | ||
print(f"into {destination}") | ||
shutil.copytree( | ||
src=dist_path, | ||
dst=destination, | ||
dirs_exist_ok=True, | ||
) | ||
print(f"Done updating ansys-dpf-gatebin for {platform.system()}") | ||
else: | ||
print(f"{gate_path_key} environment variable is not defined. " | ||
"Cannot update ansys-dpf-gate or ansys-dpf-gatebin.") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,16 +17,6 @@ on: | |
required: false | ||
type: string | ||
default: '' | ||
custom-requirements: | ||
description: "Path to requirements.txt file to install" | ||
required: false | ||
type: string | ||
default: '' | ||
custom-wheels: | ||
description: "extra pip --find-links argument to find custom dpf wheels" | ||
required: false | ||
type: string | ||
default: '' | ||
# Can be called manually | ||
workflow_dispatch: | ||
inputs: | ||
|
@@ -45,16 +35,6 @@ on: | |
required: false | ||
type: string | ||
default: '' | ||
custom-requirements: | ||
description: "Path to requirements.txt file to install" | ||
required: false | ||
type: string | ||
default: '' | ||
custom-wheels: | ||
description: "extra pip --find-links argument to find custom dpf wheels" | ||
required: false | ||
type: string | ||
default: '' | ||
|
||
env: | ||
PACKAGE_NAME: ansys-dpf-core | ||
|
@@ -107,9 +87,7 @@ jobs: | |
install_extras: plotting | ||
wheelhouse: false | ||
wheel: false | ||
extra-pip-args: ${{ inputs.custom-wheels && format('--find-links {0}', inputs.custom-wheels) || '' }} | ||
standalone_suffix: ${{ inputs.standalone_suffix }} | ||
custom-requirements: ${{ inputs.custom-requirements }} | ||
|
||
- name: "Prepare Testing Environment" | ||
uses: ansys/pydpf-actions/[email protected] | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anslpa