Skip to content

Commit

Permalink
Merge pull request #1 from GISRedeDev/setupproject
Browse files Browse the repository at this point in the history
Setupproject
  • Loading branch information
GISRedeDev authored Jun 23, 2024
2 parents d06ee81 + 2399325 commit 1f58e69
Show file tree
Hide file tree
Showing 8 changed files with 882 additions and 0 deletions.
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

0 comments on commit 1f58e69

Please sign in to comment.