-
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 GISRedeDev/setupproject
Setupproject
- Loading branch information
Showing
8 changed files
with
882 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,28 @@ | ||
name: Python package | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m ensurepip | ||
python -m pip install pdm | ||
pdm install --prod | ||
pdm install --dev | ||
- name: Check code formatting and linting | ||
run: | | ||
pdm lint-check | ||
- name: Run tests | ||
run: | | ||
pdm test -m "not integration" |
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 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Python Debugger: Current File", | ||
"type": "debugpy", | ||
"request": "launch", | ||
"program": "${file}", | ||
"console": "integratedTerminal" | ||
} | ||
] | ||
} |
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 @@ | ||
{ | ||
"python.pythonPath": "./.venv/Scripts/python.exe", | ||
} |
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,52 @@ | ||
[project] | ||
name = "AreasofControl" | ||
version = "0.1.0" | ||
description = "Package to get Russian Areas of control in Ukraine" | ||
authors = [ | ||
{name = "GISRedeDev", email = "dm@gisrede.com"}, | ||
] | ||
dependencies = [ | ||
"geopandas>=0.14.4", | ||
"pytest>=8.2.2", | ||
"black>=24.4.2", | ||
"mypy>=1.10.0", | ||
"flake8>=7.1.0", | ||
"isort>=5.13.2", | ||
"sphinx>=7.3.7", | ||
] | ||
requires-python = ">=3.11" | ||
readme = "README.md" | ||
license = {text = "MIT"} | ||
|
||
[build-system] | ||
requires = ["pdm-backend"] | ||
build-backend = "pdm.backend" | ||
|
||
|
||
[tool.pdm] | ||
distribution = true | ||
|
||
[tool.pdm.dev-dependencies] | ||
test = ["pytest"] | ||
lint = ["black", "flake8", "isort", "mypy"] | ||
doc = ["sphinx"] | ||
|
||
[tool.pdm.scripts] | ||
test = "pytest tests" | ||
test_integration = "pytest tests -m integration" | ||
black = "black areasofcontrol/ tests/" | ||
black-check = "black --check areasofcontrol/ tests/" | ||
flake8 = "flake8 areasofcontrol tests" | ||
flake8-check = "flake8 --count areasofcontrol tests" | ||
isort = "isort areasofcontrol tests" | ||
isort-check = "isort --check-only areasofcontrol tests" | ||
mypy = "mypy areasofcontrol tests" | ||
mypy-check = "mypy --check areasofcontrol tests" | ||
lint = {composite = ["black", "flake8", "isort", "mypy"]} | ||
lint-check = {composite = ["black-check", "flake8-check", "isort-check", "mypy-check"]} | ||
|
||
[tool.flake8] | ||
max-line-length = 120 | ||
|
||
[tool.isort] | ||
profile = "black" |
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_setup_for_cicd(): | ||
assert True |