Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setupproject #1

Merged
merged 7 commits into from
Jun 23, 2024
Merged
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
28 changes: 28 additions & 0 deletions .github/workflows/python-cicd.yaml
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"
15 changes: 15 additions & 0 deletions .vscode/launch.json
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"
}
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"python.pythonPath": "./.venv/Scripts/python.exe",
}
Empty file added areasofcontrol/__init__.py
Empty file.
782 changes: 782 additions & 0 deletions pdm.lock

Large diffs are not rendered by default.

52 changes: 52 additions & 0 deletions pyproject.toml
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 added tests/__init__.py
Empty file.
2 changes: 2 additions & 0 deletions tests/test_setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def test_setup_for_cicd():
assert True
Loading