Skip to content

Commit

Permalink
Merge pull request #275 from openclimatefix/fix/top-import
Browse files Browse the repository at this point in the history
fix trying to import OpenTopography
  • Loading branch information
peterdudfield authored Feb 23, 2024
2 parents 64ed0e0 + 8d25def commit 4ae78d1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
sudo_apt_install: "libgeos++-dev libproj-dev proj-data proj-bin"
# brew_install: "proj geos librttopo"
os_list: '["ubuntu-latest"]'
python-version: "['3.9','3.10','3.11']"
python-version: "['3.10','3.11']"
12 changes: 11 additions & 1 deletion ocf_datapipes/training/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,21 @@
OpenPVFromNetCDF,
OpenPVFromPVSitesDB,
OpenSatellite,
OpenTopography,
OpenWindFromNetCDF,
)
from ocf_datapipes.utils.utils import flatten_nwp_source_dict

try:
from ocf_datapipes.load import OpenTopography

# Rioxarray is sometimes a pain to install, so only load this if its installed
except ImportError:
print(
"Could not import OpenTopography," " this is probably becasye Rioxarray is not installed."
)
pass


logger = logging.getLogger(__name__)


Expand Down

0 comments on commit 4ae78d1

Please sign in to comment.