Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .coderabbit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ reviews:
- Avoid general concepts and focus on the current code.
- Suggest code changes with concrete code rather than explanations.
path_filters:
- "!datascience/**"
- "!pipeline/**"
2 changes: 0 additions & 2 deletions .env.dev.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ POSTGRES_HOST=localhost
POSTGRES_SCHEMA=public
POSTGRES_PASSWORD=postgres

MONITORENV_DATA_FOLDER=./datascience/src/pipeline/data

################################################################################
# Monitoring & Backup

Expand Down
2 changes: 0 additions & 2 deletions .env.infra.example
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ POSTGRES_HOST=
POSTGRES_SCHEMA=
POSTGRES_PASSWORD=

MONITORENV_DATA_FOLDER=

################################################################################
# Monitoring & Backup

Expand Down
2 changes: 0 additions & 2 deletions .env.test.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ POSTGRES_HOST=localhost
POSTGRES_SCHEMA=public
POSTGRES_PASSWORD=postgres

MONITORENV_DATA_FOLDER=./datascience/src/pipeline/data

################################################################################
# Monitoring & Backup

Expand Down
6 changes: 1 addition & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,14 @@ updates:
update-types: ["minor", "patch"]

- package-ecosystem: "pip"
directory: "/datascience"
directory: "/pipeline"
assignees:
- "VincentAntoine"
schedule:
interval: "monthly"
commit-message:
prefix: "[Tech] "
labels: ["tech. enhancement", "dependencies"]
# Disable all dependencies update
# TODO Re-enable once Env is migrated to Poetry-only.
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#open-pull-requests-limit
open-pull-requests-limit: 0
groups:
non-major-dependencies:
applies-to: version-updates
Expand Down
94 changes: 0 additions & 94 deletions .github/workflows/cicd-datapipeline.yml

This file was deleted.

14 changes: 0 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,24 @@ github_token.txt
/infra/data-pipeline-prefect3/.prefect-worker

# Notebooks
/datascience/notebooks
/pipeline/notebooks
/datascience/.local
/pipeline/.local
/datascience/.ipython
/pipeline/.ipython
/datascience/.cache
/pipeline/.cache
.ipynb_checkpoints/
.jupyter/

# Coverage reports
datascience/htmlcov/
pipeline/htmlcov/
datascience/.coverage
pipeline/.coverage
frontend/cypress/screenshots/
frontend/cypress/videos/

# Local data
/.backups
/data
/datascience/data
/pipeline/src/data/**/*
!/pipeline/src/data/**/dummy_control_objectives.csv
/datascience/src/pipeline/data/control_objectives.csv
/datascience/src/pipeline/data/control_unit_resources.csv
/datascience/src/pipeline/data/control_unit_contacts.csv
/datascience/src/pipeline/data/bases.csv
/datascience/src/pipeline/data/area_notes.csv
/datascience/src/pipeline/data/terms_notes.csv

# Python
*.pyc
Expand All @@ -48,7 +35,6 @@ frontend/cypress/videos/

# Doc
docs/redmine_wiki/*
datascience/docs/build
pipeline/docs/build

# TypeScript cache
Expand Down
51 changes: 27 additions & 24 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
# Contributing

- [Getting Started: Backend \& Frontend](#getting-started-backend--frontend)
- [Requirements](#requirements)
- [First Setup](#first-setup)
- [Local Development](#local-development)
- [Getting Started: Data Pipeline](#getting-started-data-pipeline)
- [Requirements](#requirements-1)
- [First Setup](#first-setup-1)
- [Local Development](#local-development-1)
- [Technical Stack](#technical-stack)
- [Legacy Instructions](#legacy-instructions)
- [Technical Stack (Main Components)](#technical-stack-main-components)
- [Development Environment Setup](#development-environment-setup)
- [Prerequisites](#prerequisites)
- [Configuration](#configuration)
- [Sentry](#sentry)
- [Frontend](#frontend)
- [Linting](#linting)
- [Environment Variables](#environment-variables)
- [Backend](#backend)
- [Contributing](#contributing)
- [Getting Started: Backend \& Frontend](#getting-started-backend--frontend)
- [Requirements](#requirements)
- [First Setup](#first-setup)
- [Local Development](#local-development)
- [Getting Started: Data Pipeline](#getting-started-data-pipeline)
- [Requirements](#requirements-1)
- [First Setup](#first-setup-1)
- [Local Development](#local-development-1)
- [Running a test](#running-a-test)
- [Technical Stack](#technical-stack)
- [Legacy Instructions](#legacy-instructions)
- [Technical Stack (Main Components)](#technical-stack-main-components)
- [Development Environment Setup](#development-environment-setup)
- [Prerequisites](#prerequisites)
- [Configuration](#configuration)
- [Sentry](#sentry)
- [Frontend](#frontend)
- [Linting](#linting)
- [Environment Variables](#environment-variables)
- [Backend](#backend)

---

Expand Down Expand Up @@ -60,15 +62,16 @@ make dev-run-front

- Debian-based Linux or macOS
- Docker v25 (with Docker Compose v2)
- Python v3.10 (with Poetry)
- Python 3 (with pyenv and Poetry)

if you have a mac with apple chipset please check the checkbox in docker dashboard
`Allow the default Docker socket to be used (requires password)` in `settings/advanced`

### First Setup

- install Peotry (follow online documentation, it changes really often)
- run ```cd datascience``` and ```poetry install```
- install pyenv and Poetry (follow online documentation, it changes really often)
- install the correct python version using ```pyenv install <VERSION>``` (use version defined in pipeline/.python-version)
- run ```make install-pipeline```

### Local Development

Expand Down Expand Up @@ -121,7 +124,7 @@ For example :
- OpenLayers
- Rsuite
- Data pipeline:
- Python 3.10
- Python 3
- Poetry
- Prefect

Expand All @@ -133,7 +136,7 @@ For example :
- openjdk (osx: `brew install openjdk`)
- postgres (only `psql` is required. osx: `brew install libpq`)
- docker + docker-compose
- python 3.10 + poetry
- python 3 + poetry

#### Configuration

Expand Down
16 changes: 2 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,9 @@ init-geoserver:
# DATA commands
.PHONY: install-pipeline run-notebook test-pipeline update-python-dependencies
install-pipeline:
cd datascience && poetry install
cd pipeline && poetry install
run-notebook:
cd datascience && poetry run jupyter notebook
test-pipeline:
cd datascience && export TEST_LOCAL=True && poetry run coverage run -m pytest --pdb tests/ && poetry run coverage report && poetry run coverage html
cd pipeline && poetry run jupyter notebook
test-pipeline-prefect3:
cd pipeline && export TEST=True && poetry run coverage run -m pytest -s --pdb tests/ && poetry run coverage report && poetry run coverage html

Expand All @@ -135,16 +133,6 @@ test: test-back
cd frontend && CI=true npm run test:unit

# CI commands - pipeline
.PHONY: docker-build-pipeline docker-test-pipeline docker-tag-pipeline docker-push-pipeline
docker-build-pipeline:
docker build -f "infra/docker/datapipeline/Dockerfile" . -t monitorenv-pipeline:$(VERSION)
docker-test-pipeline:
docker run --network host -v /var/run/docker.sock:/var/run/docker.sock -u monitorenv-pipeline:$(DOCKER_GROUP) --env-file datascience/.env.test --env HOST_MIGRATIONS_FOLDER=$(HOST_MIGRATIONS_FOLDER) monitorenv-pipeline:$(VERSION) coverage run -m pytest --pdb tests
docker-tag-pipeline:
docker tag monitorenv-pipeline:$(VERSION) ghcr.io/mtes-mct/monitorenv/monitorenv-pipeline:$(VERSION)
docker-push-pipeline:
docker push ghcr.io/mtes-mct/monitorenv/monitorenv-pipeline:$(VERSION)

.PHONY: docker-build-pipeline-prefect3 docker-test-pipeline-prefect3 docker-tag-pipeline-prefect3 docker-push-pipeline-prefect3
docker-build-pipeline-prefect3:
docker build -f "infra/docker/datapipeline/prefect3.Dockerfile" . -t monitorenv-pipeline-prefect3:$(VERSION)
Expand Down
62 changes: 0 additions & 62 deletions datascience/.env.template

This file was deleted.

Loading
Loading