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

make unit handling dependencies optional #2

Open
mcgibbon opened this issue Nov 5, 2015 · 0 comments
Open

make unit handling dependencies optional #2

mcgibbon opened this issue Nov 5, 2015 · 0 comments

Comments

@mcgibbon
Copy link
Contributor

mcgibbon commented Nov 5, 2015

The dependency of atmos on cfunits can be removed by checking whether cfunits can be imported, and if it cannot, disabling unit handling functionality.

This would entail, in solve.py:

  • putting the cfunits import in a try: except ImportError block
  • raising an exception whenever a _units parameter is given when cfunits is not available, which indicates that cfunits is required for unit handling
  • only executing lines that call cfunits when cfunits is available

And also:

  • modifying the tests module so that unit-dependent tests don't execute if cfunits is not installed

The purpose of this is to make installation easier for users that don't have udunits installed on their system to install atmos. But am I right in thinking that cfunits depends on having a system-installed udunits library available? And is there another package on pypi that would install udunits in some sort of wrapper, without needing a system installation of udunits?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant