Closed PProfizi closed 11 months ago
Merging #480 (d67a405) into master (a713af2) will increase coverage by
0.27%
. Report is 1 commits behind head on master. The diff coverage is69.76%
.
@@ Coverage Diff @@
## master #480 +/- ##
==========================================
+ Coverage 83.49% 83.77% +0.27%
==========================================
Files 45 47 +2
Lines 5041 5072 +31
==========================================
+ Hits 4209 4249 +40
+ Misses 832 823 -9
@rafacanton @cbellot000 @anslpa
Just realized we cannot actually create a ansys.dpf.post.tools
sub-package with ansys.dpf.post.tools.streamlines
module (ansys/dpf/post/tools/streamlines.py
) as we already have a ansys.dpf.post.tools
module (ansys/dpf/post/tools.py
).
Four solutions:
tools
to helpers
. This is the current solution implemented, so now the new method is in ansys.dpf.post.helpers.streamlines
. This is also what was done in ansys-dpf-core
which makes both libraries coherent.streamlines.py
module directly in ansys/dpf/post
tools.py
module, which would mean no streamlines-specific module and a direct call to from ansys.dpf.post.tools import plot_streamlines
.tools.py
module and move its methods in a new module in the tools
sub-package. This would mean makign sure that the old imports would still work. Not sure we can cover all edge-cases.I think the first solution is the best.
What do you think?
@rafacanton @cbellot000 @anslpa
Just realized we cannot actually create a
ansys.dpf.post.tools
sub-package withansys.dpf.post.tools.streamlines
module (ansys/dpf/post/tools/streamlines.py
) as we already have aansys.dpf.post.tools
module (ansys/dpf/post/tools.py
). Four solutions:
- rename the new sub-package from
tools
tohelpers
. This is the current solution implemented, so now the new method is inansys.dpf.post.helpers.streamlines
. This is also what was done inansys-dpf-core
which makes both libraries coherent.- Move the
streamlines.py
module directly inansys/dpf/post
- Move the streamlines helpers in the
tools.py
module, which would mean no streamlines-specific module and a direct call tofrom ansys.dpf.post.tools import plot_streamlines
.- Remove the
tools.py
module and move its methods in a new module in thetools
sub-package. This would mean makign sure that the old imports would still work. Not sure we can cover all edge-cases.I think the first solution is the best.
What do you think?
@PProfizi I agree, I think it is right to have both libraries with a similar structure. Thanks!
@rafacanton @cbellot000 @anslpa Just realized we cannot actually create a
ansys.dpf.post.tools
sub-package withansys.dpf.post.tools.streamlines
module (ansys/dpf/post/tools/streamlines.py
) as we already have aansys.dpf.post.tools
module (ansys/dpf/post/tools.py
). Four solutions:
- rename the new sub-package from
tools
tohelpers
. This is the current solution implemented, so now the new method is inansys.dpf.post.helpers.streamlines
. This is also what was done inansys-dpf-core
which makes both libraries coherent.- Move the
streamlines.py
module directly inansys/dpf/post
- Move the streamlines helpers in the
tools.py
module, which would mean no streamlines-specific module and a direct call tofrom ansys.dpf.post.tools import plot_streamlines
.- Remove the
tools.py
module and move its methods in a new module in thetools
sub-package. This would mean makign sure that the old imports would still work. Not sure we can cover all edge-cases.I think the first solution is the best. What do you think?
@PProfizi I agree, I think it is right to have both libraries with a similar structure. Thanks!
What I ended-up doing:
ansys.dpf.post.helpers
sub-packageansys.dpf.post.helpers.streamlines
moduleansys.dpf.post.helpers.selections
moduleansys.dpf.post.tools.select
method to the ansys.dpf.post.helpers.selections
moduleansys.dpf.post.tools
to ensure retro-compatibilityansys.dpf.post.tools
to mention the move to ansys.dpf.post.helpers
Create the
ansys.dpf.post.tools
package, with theansys.dpf.post.tools.streamlines
module. Add theplot_streamlines
helper to provide a first way of plotting streamlines based on a DataFrame. Add a first test intest_streamlines.py
.Initial mock-up:![image](https://github.com/ansys/pydpf-post/assets/100710998/54afa710-b8cd-49a7-9e60-1df7446aeed5)