+
Skip to content

feat(server): Add ServerContext.xml_path setter #2386

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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

PProfizi
Copy link
Contributor

@PProfizi PProfizi commented Jun 20, 2025

To allow setting the xml_path for a dpf.AvailableServerContexts.custom_defined context.

First remark: the right AvailableServerContext for using a custom xml path is no_context (context_type=2) instead of custom_defined (context_type=3)... this is confusing.

Second remark: despite the tests passing on my local machine with a unified Ansys install, it does not pass in the GH pipelines with a standalone DPF. Is there something I am missing?

@rafacanton @ansys-akarcher I think I will need some help on this one. This comes from a workaround shared to a client where they needed to remove multiphysics_mapper from default plugins. It is easier for them to share a custom XML file and use it within a PyDPF script rather than modifying their actual DPF installation.
The workaround shared was to use ServerContext(context_type=2, xml_path="path/to/file").
The point here is to make this user-friendly.

@PProfizi PProfizi self-assigned this Jun 20, 2025
@PProfizi PProfizi added the enhancement New feature or request label Jun 20, 2025
Copy link

codecov bot commented Jun 20, 2025

Codecov Report

Attention: Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 46.98%. Comparing base (7c5a4c4) to head (e3d18a1).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #2386       +/-   ##
===========================================
- Coverage   84.20%   46.98%   -37.23%     
===========================================
  Files          91       91               
  Lines       10675    10679        +4     
===========================================
- Hits         8989     5017     -3972     
- Misses       1686     5662     +3976     

Copy link
Contributor

The documentation for this pull request will be available at https://dpf.docs.pyansys.com/pull/2386. Please allow some time for the documentation to be deployed.

PProfizi added 2 commits June 20, 2025 15:23
…xml_path for a "dpf.AvailableServerContexts.custom_defined" context.
@PProfizi PProfizi force-pushed the feat/custom_server_context branch from 43cba7c to ee29bd9 Compare June 20, 2025 13:55
@PProfizi PProfizi marked this pull request as draft June 20, 2025 14:23
@PProfizi PProfizi marked this pull request as ready for review July 4, 2025 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载