-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: Deprecate the outdated pyro_risks modules, CLI, and examples * refactor: Remove Heroku deployment files * refactor: Remove DVC / CML pipelines * chore: Add poetry for packaging and dependency management * chore: Bump Geopandas to 1.0.1, replace fiona backend with pyogrio * chore: Add rasterio manylinux wheel * chore: Add ruff for linting and formatting * chore: Update docker build and config * chore: Update CI workflows * chore: Add Mock predictor * fix: Update mypy config * fix: Fix type hints and linting * style: Fix type hints, formatting, and linting * docs: Remove deprecated modules from docs
- Loading branch information
Showing
107 changed files
with
2,770 additions
and
6,170 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Scheduled Scripts | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 1 * * *" | ||
|
||
jobs: | ||
get-effis-fwi: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Python Version | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.10.5 | ||
|
||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
version: 1.8.1 | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
|
||
- name: Install dependencies | ||
run: poetry install | ||
|
||
- name: Get Today Effis Fwi | ||
run: poetry run python pyrorisks/platform_fwi/main.py | ||
env: | ||
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
BUCKET_NAME: risk | ||
REGION_NAME: gra | ||
ENDPOINT_URL: https://s3.gra.io.cloud.ovh.net/ | ||
|
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,80 @@ | ||
name: style | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
linting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Python Version | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.10.5 | ||
|
||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
version: 1.8.1 | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
|
||
- name: Install dependencies | ||
run: poetry install | ||
|
||
- name: Run Ruff linter | ||
run: | | ||
poetry run ruff --version | ||
poetry run ruff check --diff . | ||
formating: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Python Version | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.10.5 | ||
|
||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
version: 1.8.1 | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
|
||
- name: Install dependencies | ||
run: poetry install | ||
|
||
- name: Run Ruff formatter | ||
run: | | ||
poetry run ruff --version | ||
poetry run ruff format --diff . | ||
typing: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Python Version | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.10.5 | ||
|
||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
version: 1.8.1 | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
|
||
- name: Install dependencies | ||
run: poetry install | ||
|
||
- name: Run mypy | ||
run: | | ||
poetry run mypy --version | ||
poetry run mypy app pyrorisks |
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 |
---|---|---|
|
@@ -8,7 +8,7 @@ __pycache__/ | |
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
docs/build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
|
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,28 +1,19 @@ | ||
FROM python:3.8.1 | ||
FROM python:3.10-buster | ||
|
||
# set work directory | ||
WORKDIR /usr/src/app | ||
RUN pip install poetry==1.8.1 | ||
|
||
# set environment variables | ||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
ENV PYTHONUNBUFFERED 1 | ||
ENV POETRY_NO_INTERACTION=1 \ | ||
POETRY_VIRTUALENVS_IN_PROJECT=1 \ | ||
POETRY_VIRTUALENVS_CREATE=1 \ | ||
POETRY_CACHE_DIR=/tmp/poetry_cache \ | ||
VIRTUAL_ENV=/app/.venv \ | ||
PATH="/app/.venv/bin:$PATH" | ||
|
||
# copy app requirements | ||
COPY ./requirements.txt requirements.txt | ||
COPY ./requirements-app.txt /usr/src/app/requirements-app.txt | ||
COPY ./setup.py setup.py | ||
COPY ./README.md README.md | ||
COPY ./pyro_risks pyro_risks | ||
WORKDIR /app | ||
|
||
# install dependencies | ||
RUN apt-get update && \ | ||
apt-get install --no-install-recommends -y libspatialindex-dev python3-rtree && \ | ||
pip install --upgrade pip setuptools wheel && \ | ||
pip install -e . && \ | ||
pip install -r /usr/src/app/requirements-app.txt && \ | ||
mkdir /usr/src/app/app && \ | ||
rm -rf /root/.cache/pip && \ | ||
rm -rf /var/lib/apt/lists/* | ||
COPY pyrorisks ./pyrorisks | ||
COPY app ./app | ||
COPY build ./build | ||
COPY pyproject.toml poetry.lock README.md ./ | ||
|
||
# copy project | ||
COPY app/ /usr/src/app/app/ | ||
RUN poetry install |
File renamed without changes.
File renamed without changes.
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
Empty file.
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
Oops, something went wrong.