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

added try except for compatibility conda freecad #48

Merged
merged 1 commit into from
Apr 16, 2024
Merged

added try except for compatibility conda freecad #48

merged 1 commit into from
Apr 16, 2024

Conversation

shimwell
Copy link
Collaborator

Thanks for reviewing and merging the last couple of PRs.

This one is another small minimal PR that would allow GEOUNED to work with the conda freecad package.

Conda freecad package provides compiled FreeCAD.so files, compiled to be compatible with the conda python.

The means we can make use of geouned with our system python 🎉 instead of the FreeCAD.cmd command and also we can avoid manually appending paths to the sys 🎉.

The conda freecad package is distributed under the name freecad lower case and once imported it would add the path to the appropriately compile FreeCAD.so and then one can import FreeCAD and it know where to find the .so file.

If the try: fails then it will pass the except and therefore this has no impact on the other ways of running the package.

I've tested the installation of GEOUNED package with conda freecad on windows, mac and ubuntu with python versions 3.8 and 3.11 and converted all 52 step files found in the testing folder. The CI for this testing is here if that is of interest.

Supporting the conda package for freecad also has the potential to reduce the installation to a single command which is something I can add in the future if this PR goes ahead

Many thanks for considering this PR

Tagging @aljaz-kolsek for your interest

@psauvan psauvan merged commit 377156b into GEOUNED-org:dev Apr 16, 2024
psauvan added a commit that referenced this pull request Apr 23, 2024
* update Fuzzy write function

* several stp file update

* script to color CAD document following material label

* fix rounding error of z value acos(z) evaluation

* Add a bug report template and .gitignore (#44)

* Removed unused imports and variables (#35)

* raise value error instead of exit (#41)

* Update to testing path (#40)

* changed hardcoded path to work for all users

* path update

* Update bug_report.md

* raising catchable error instead of exit (#47)

* raising catchable error instead of exit

* added new line

* added try for freecad import (#48)

* Solve SyntaxtError producing a bug (#49)

* Solve SyntaxtError producing a bug

* Limit the amount of decimals printed in the enclosure comment

* fixed error units in OpenMC output

* GEOUNED training presentation added (#53)

* Adding minimal ci to check cad converts (#52)

* added minimal CI

* all step files

* added ci yml

* removed freecadcmd arg

* Update pyproject.toml

Update url links to "GEOUNED-org"

* typo correction to test if CI is working (#54)

* typo correction

* [skip ci] added ci status badge

* opening up ci to all os systems

* fix small bug with torus (bad identification of closed mozaic faces)

* Adding minimal volume checking CI comparing CAD and CSG volumes (#56)

* added volume test to ci

* removed if os cond

* added csg vs cad volume for **most** stp files

* Added mkdocs (#57)

* added example docs

* added docs deps

* Reverting mkdocs PR 57 (#58)

* Revert "added example docs"

This reverts commit bd1c67a.

* Revert "added docs deps"

This reverts commit f31d241.

* Adding minimal particle transport tests on resulting csg files (#59)

* added transport tests

* removed files that break, raised issue

* [skip ci] remove prints

* added link to issue

* Add the name to the cells in OpenMC to improve identification (#61)

The name is the same that is used in MCNP inputs cell.Comments

* converting with no simplification = more geometry works (#62)

* reduced number of skiped geoms (#63)

* [skip ci] corrected bade to main branch (#64)

* Improved import statements (#65)

* changed single file from package to relative imports

* 2nd file converted to relative imports

* converted more fiels to relative import

* relative imports everywhere

* isort on all imports

* Add bug report and .gitignore to main (#45) (#66)

Co-authored-by: AlvaroCubi <[email protected]>

* added standard gitignore for python project (#68)

---------

Co-authored-by: psauvan <[email protected]>
Co-authored-by: Tony <[email protected]>
Co-authored-by: Jonathan Shimwell <[email protected]>
Co-authored-by: Aljaz Kolsek (F4E) <[email protected]>
Co-authored-by: Emilio Castro <[email protected]>
@AlvaroCubi AlvaroCubi mentioned this pull request Apr 24, 2024
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.

2 participants