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

Don't require pyke #3597

Closed
baerbock opened this issue Dec 12, 2019 · 3 comments
Closed

Don't require pyke #3597

baerbock opened this issue Dec 12, 2019 · 3 comments

Comments

@baerbock
Copy link

When installing iris it requires https://github.com/mayask/pyke – which hasn't seen any commit in 10 years and is probably Py2 only.

/usr/bin/python -c import os; from pyke.target_pkg import target_pkg; target_pkg.load = lambda *args, **kwargs: None; os.chdir(os.path.join('build/lib', 'iris', 'fileformats', '_pyke_rules')); from pyke import knowledge_engine; knowledge_engine.engine('')
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'pyke'

Is there any way to completely disable the tests, or at least those requiring pyke?

@pp-mo
Copy link
Member

pp-mo commented Dec 12, 2019

This clearly connects to #3415.

Is there any way to completely disable the tests, or at least those requiring pyke?

Pyke-requiring tests aren't identified, for reasons below ...

Is there any way to completely disable the tests ..

Then you don't need to run tests at all ?


Unfortunately, Pyke is still a core dependency, as we haven't decoupled Iris netcdf decoding from the "core" code. It's not optional, because it is imported on the first import of iris.
We should eventually fix this, along with #3415 as above.

In fact, all the various fileformat subpackages in iris.fileformats are imported before evidence of need, so we can construct a filetype-to-loader mapping.
However an exception is iris-grib, which since moving it out to a separate package is now import-deferred to make it a an optional dependency.
This is maybe a bit nasty, because the code to identify "what a grib file looks like" is left within Iris itself. But it shows it can be done!

If you fancy a go at #3415, please give a poke to @bjlittle, who I believe may have some partially-complete solution in this area.

@rhattersley
Copy link
Member

we haven't decoupled Iris netcdf decoding from the "core" code

#3657 is an attempt at a first step along that journey

@bjlittle
Copy link
Member

bjlittle commented Jul 7, 2021

@baerbock The pyke package is available on conda-forge and also on PyPI but is called scitools-pyke.

As of #4198, which was merged to main on 1 July 2021, pyke is now no longer a dependency of iris.

This will be available in iris 3.1.0, which is scheduled for release around September 2021, see the associated v3.1.x GitHub Discussion.

I'm now going to close this issue. However, please reopen this issue if you want to discuss this further, thanks 👍

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

No branches or pull requests

4 participants