Skip to content

Commit

Permalink
made error handling of missing magnetocosmics library slightly less h…
Browse files Browse the repository at this point in the history
…arsh, so users can still import the library without major exceptions.
  • Loading branch information
ChrisSWDavis committed Nov 15, 2023
1 parent d94fe40 commit f2809c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion AsympDirsCalculator/AsympDirsTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
try:
assert not (shutil.which("magnetocosmics") is None)
except AssertionError:
raise Exception("ERROR: AsympDirsCalculator currently requires magnetocosmics to be installed, such that the command 'magnetocosmics' can be run in terminal. If you have installed a copy of magnetocosmics, please check to see ensure that your paths have been set correctly, and that magneto-env.sh has been sourced correctly. If you are having issues or suspect there might be a bug, please feel free to report it at https://github.com/ssc-maire/AsymptoticDirectionsCalculator-public/issues , and I will try to respond to your issue as soon as I'm able to.")
print("ERROR: AsympDirsCalculator currently requires magnetocosmics to be installed, such that the command 'magnetocosmics' can be run in terminal. All AsympDirsCalculator runs will currently fail until magnetocosmics is installed. If you have installed a copy of magnetocosmics, please check to see ensure that your paths have been set correctly, and that magneto-env.sh has been sourced correctly. If you are having issues or suspect there might be a bug, please feel free to report it at https://github.com/ssc-maire/AsymptoticDirectionsCalculator-public/issues , and I will try to respond to your issue as soon as I'm able to.")

from .MAGNETOCOSMICSrunManager import MAGNETOCOSMICSrunManager

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
package_data={"AsympDirsCalculator":["magcos_running_scripts/runNoRewriteMAGCOSsimulation.sh",
"magcos_running_scripts/AsymptoticDirection.g4mac",
]},
version='1.0.5',
version='1.0.6',
description='Python library containing tools for calculating asymptotic directions and vertical cut-off rigidities.',
long_description=long_description,
long_description_content_type='text/markdown',
Expand Down

0 comments on commit f2809c4

Please sign in to comment.