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

Blocked: Fix nox when HOME not set #269

Closed
wants to merge 1 commit into from

Conversation

TomDufall
Copy link
Contributor

When a HOME environment variable isn't set, nox --list currently fails due to trying to cast None to a Path. I noticed this when trying to run tests on my Windows PC.

This PR adds a check before casting the env var to a Path. Having None as a value should be acceptable - CARTOPY_CACHE_DIR is later checked for None values.

@TomDufall
Copy link
Contributor Author

nox > python -m iris_grib.tests.runner --default-tests --unit-tests --integration-tests
Traceback (most recent call last):
File "/tmp/cirrus-ci-build/.nox/tests-iris-conda-forge/lib/python3.6/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/tmp/cirrus-ci-build/.nox/tests-iris-conda-forge/lib/python3.6/runpy.py", line 109, in _get_module_details
import(pkg_name)
File "/tmp/cirrus-ci-build/iris_grib/init.py", line 28, in
from iris.util import _array_slice_ifempty
ImportError: cannot import name '_array_slice_ifempty'

@TomDufall
Copy link
Contributor Author

The function has recently been removed in Iris here.

The PR says that this is a um-data-specific workaround that is no longer required - I assume that means it can also be removed here? I don't know the answer to this, but I'll raise a PR that solves the technical issue, assuming it is fine to do so, and someone who knows the context can decide if that's the right thing to do.

@TomDufall TomDufall changed the title Fix nox when HOME not set Blocked: Fix nox when HOME not set Jun 1, 2021
@TomDufall TomDufall mentioned this pull request Jun 1, 2021
@TomDufall
Copy link
Contributor Author

Closing this PR as dependencies don't support Windows and Linux should generally have a $HOME. The fixes to master will continue in #270

@TomDufall TomDufall closed this Jun 1, 2021
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.

1 participant