generated from openclimatefix/ocf-template
-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from openclimatefix/regrid_nwp
Regrid NWP inputs
- Loading branch information
Showing
48 changed files
with
264 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Conda pytest | ||
on: push | ||
|
||
jobs: | ||
push_to_registry: | ||
name: Build docker file for testing | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v2 | ||
|
||
- uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
miniconda-version: "latest" | ||
channels: bioconda, conda-forge, defaults | ||
auto-update-conda: true | ||
auto-activate-base: true | ||
|
||
- name: Install the conda | ||
shell: bash -l {0} | ||
run: | | ||
conda install -c conda-forge xesmf esmpy -y | ||
- name: Install the repo | ||
shell: bash -l {0} | ||
run: | | ||
pip install -e . | ||
- name: run pytest | ||
shell: bash -l {0} | ||
run: | | ||
python -m pytest |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,36 @@ | ||
FROM python:3.10-slim | ||
FROM continuumio/miniconda3 | ||
|
||
ARG TESTING=0 | ||
|
||
# make sure it doesnt fail if the docker file doesnt know the git commit | ||
ARG GIT_PYTHON_REFRESH=quiet | ||
SHELL ["/bin/bash", "-l", "-c"] | ||
|
||
RUN apt-get update | ||
RUN apt-get install git -y | ||
RUN apt-get install g++ gcc libgeos++-dev libproj-dev proj-data proj-bin -y | ||
|
||
# copy files | ||
# Copy files | ||
COPY setup.py app/setup.py | ||
COPY README.md app/README.md | ||
COPY requirements.txt app/requirements.txt | ||
RUN pip install git+https://github.com/SheffieldSolar/PV_Live-API#pvlive_api | ||
|
||
|
||
# install requirements | ||
RUN pip install torch --index-url https://download.pytorch.org/whl/cpu | ||
RUN pip install -r app/requirements.txt | ||
|
||
# copy library files | ||
COPY pvnet_app/ app/pvnet_app/ | ||
COPY tests/ app/tests/ | ||
COPY scripts/ app/scripts/ | ||
COPY data/ app/data/ | ||
|
||
# change to app folder | ||
# Install requirements | ||
RUN conda install python=3.10 | ||
RUN conda install -c conda-forge xesmf esmpy -y | ||
RUN echo "export ESMFMKFILE='/opt/conda/lib/esmf.mk'" >> ~/.bashrc | ||
RUN pip install torch --index-url https://download.pytorch.org/whl/cpu | ||
RUN pip install -r app/requirements.txt | ||
RUN pip install git+https://github.com/SheffieldSolar/PV_Live-API#pvlive_api | ||
|
||
# Change to app folder | ||
WORKDIR /app | ||
|
||
# install library | ||
# Install library | ||
RUN pip install -e . | ||
|
||
# download models so app can used cached | ||
RUN python scripts/cache_default_models.py | ||
|
||
|
||
RUN if [ "$TESTING" = 1 ]; then pip install pytest pytest-cov coverage; fi | ||
|
||
CMD ["python", "-u","pvnet_app/app.py"] | ||
CMD ["python", "-u","pvnet_app/app.py"] |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"zarr_format": 2 | ||
} | ||
} |
Oops, something went wrong.