-
Notifications
You must be signed in to change notification settings - Fork 0
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 #1 from OpenDataServices/setup
Setup project boilerplate
- Loading branch information
Showing
9 changed files
with
161 additions
and
1 deletion.
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,23 @@ | ||
name: CI | ||
on: [push] | ||
|
||
jobs: | ||
ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
- name: Install dev requirements | ||
run: pip install -r requirements_dev.txt | ||
- name: Check black | ||
run: black --check oc4ids_datastore_pipeline/ tests/ | ||
- name: Check isort | ||
run: isort --check-only oc4ids_datastore_pipeline/ tests/ | ||
- name: Check flake8 | ||
run: flake8 oc4ids_datastore_pipeline/ tests/ | ||
- name: Check mypy | ||
run: mypy oc4ids_datastore_pipeline/ tests/ | ||
- name: Run tests | ||
run: pytest |
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,2 @@ | ||
.venv | ||
__pycache__ |
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 @@ | ||
3.12 |
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 +1,39 @@ | ||
# oc4ids-datastore-pipeline | ||
# OC4IDS Datastore Pipeline | ||
|
||
A Python application to validate and store published OC4IDS datasets. | ||
|
||
## Local Development | ||
|
||
### Prerequisites | ||
|
||
- Python 3.12 | ||
|
||
### Install Python requirements | ||
|
||
``` | ||
python -m venv .venv | ||
source .venv/bin/activate | ||
pip install -r requirements_dev.txt | ||
``` | ||
|
||
### Run app | ||
|
||
``` | ||
pip install -e . | ||
oc4ids-datastore-pipeline | ||
``` | ||
|
||
### Run linting and type checking | ||
|
||
``` | ||
black oc4ids_datastore_pipeline/ tests/ | ||
isort oc4ids_datastore_pipeline/ tests/ | ||
flake8 oc4ids_datastore_pipeline/ tests/ | ||
mypy oc4ids_datastore_pipeline/ tests/ | ||
``` | ||
|
||
### Run tests | ||
|
||
``` | ||
pytest | ||
``` |
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,9 @@ | ||
import logging | ||
import time | ||
|
||
logging.basicConfig( | ||
level=logging.INFO, | ||
format="%(asctime)s:%(levelname)s:%(name)s:%(message)s", | ||
datefmt="%Y-%m-%dT%H:%M:%S", | ||
) | ||
logging.Formatter.converter = time.gmtime |
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,7 @@ | ||
import logging | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
def run() -> None: | ||
logger.info("Hello World!") |
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 @@ | ||
[build-system] | ||
requires = ["flit_core >=3.2,<4"] | ||
build-backend = "flit_core.buildapi" | ||
|
||
[project] | ||
name = "oc4ids-datastore-pipeline" | ||
description = "OC4IDS Datastore Pipeline" | ||
version = "0.1.0" | ||
readme = "README.md" | ||
dependencies = [] | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"black", | ||
"isort", | ||
"flake8", | ||
"Flake8-pyproject", | ||
"mypy", | ||
"pytest", | ||
] | ||
|
||
[project.scripts] | ||
oc4ids-datastore-pipeline = "oc4ids_datastore_pipeline.pipeline:run" | ||
|
||
[tool.isort] | ||
profile = "black" | ||
|
||
[tool.flake8] | ||
max-line-length = 88 | ||
|
||
[tool.mypy] | ||
strict = true |
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,46 @@ | ||
# | ||
# This file is autogenerated by pip-compile with Python 3.12 | ||
# by the following command: | ||
# | ||
# pip-compile --extra=dev --output-file=requirements_dev.txt pyproject.toml | ||
# | ||
black==25.1.0 | ||
# via oc4ids-datastore-pipeline (pyproject.toml) | ||
click==8.1.8 | ||
# via black | ||
flake8==7.1.1 | ||
# via | ||
# flake8-pyproject | ||
# oc4ids-datastore-pipeline (pyproject.toml) | ||
flake8-pyproject==1.2.3 | ||
# via oc4ids-datastore-pipeline (pyproject.toml) | ||
iniconfig==2.0.0 | ||
# via pytest | ||
isort==6.0.0 | ||
# via oc4ids-datastore-pipeline (pyproject.toml) | ||
mccabe==0.7.0 | ||
# via flake8 | ||
mypy==1.14.1 | ||
# via oc4ids-datastore-pipeline (pyproject.toml) | ||
mypy-extensions==1.0.0 | ||
# via | ||
# black | ||
# mypy | ||
packaging==24.2 | ||
# via | ||
# black | ||
# pytest | ||
pathspec==0.12.1 | ||
# via black | ||
platformdirs==4.3.6 | ||
# via black | ||
pluggy==1.5.0 | ||
# via pytest | ||
pycodestyle==2.12.1 | ||
# via flake8 | ||
pyflakes==3.2.0 | ||
# via flake8 | ||
pytest==8.3.4 | ||
# via oc4ids-datastore-pipeline (pyproject.toml) | ||
typing-extensions==4.12.2 | ||
# via mypy |
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,2 @@ | ||
def test_hello_world() -> None: | ||
pass |