-
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.
- Loading branch information
1 parent
c1141bc
commit 5878213
Showing
10 changed files
with
592 additions
and
0 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,39 @@ | ||
name: Integration | ||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.12"] | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
version: "1.2.2" | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
installer-parallel: true | ||
- name: Install dependencies | ||
run: poetry install --no-interaction --no-root | ||
- name: Install project | ||
run: poetry install --no-interaction | ||
- name: Run checks | ||
run: | | ||
source .venv/bin/activate | ||
make check | ||
- name: Run tests | ||
run: | | ||
source .venv/bin/activate | ||
make test |
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,30 @@ | ||
name: Publish | ||
on: | ||
release: | ||
types: [created] | ||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.12"] | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
version: "1.2.2" | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
installer-parallel: true | ||
- name: Publish | ||
run: | | ||
poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }} | ||
poetry version $(git describe --tags --abbrev=0) | ||
poetry publish --build |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
sources = geodantic tests | ||
|
||
.PHONY: test lint check | ||
|
||
test: | ||
pytest -vv --cov=geodantic tests | ||
|
||
lint: | ||
isort $(sources) | ||
black $(sources) | ||
|
||
check: | ||
isort --check --diff $(sources) | ||
black --check --diff $(sources) | ||
mypy -p geodantic |
Empty file.
Empty file.
Large diffs are not rendered by default.
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,36 @@ | ||
[tool.poetry] | ||
name = "geodantic" | ||
version = "0.0.0" | ||
description = "GeoJSON parsing and validation using Pydantic" | ||
authors = ["Alexander Malyga <alexander@malyga.io>"] | ||
license = "MIT" | ||
readme = "README.md" | ||
homepage = "https://github.com/alexandermalyga/geodantic" | ||
repository = "https://github.com/alexandermalyga/geodantic" | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.12" | ||
pydantic = "^2.5.3" | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
mypy = "^1.8.0" | ||
black = "^23.12.1" | ||
isort = "^5.13.2" | ||
pytest = "^7.4.4" | ||
pytest-cov = "^4.1.0" | ||
|
||
[tool.mypy] | ||
strict = true | ||
|
||
[tool.black] | ||
target_version = ["py312"] | ||
|
||
[tool.isort] | ||
profile = "black" | ||
|
||
[tool.coverage.report] | ||
exclude_lines = ["pragma: not covered", "@overload"] | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
def test_dummy() -> None: | ||
assert True |