Skip to content

Commit

Permalink
Merge pull request #175 from cleder/170-modernize-packaging
Browse files Browse the repository at this point in the history
170 modernize packaging - requirements to toml
  • Loading branch information
cleder authored Oct 27, 2023
2 parents 930f6bf + 2032a19 commit a889b39
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 71 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/run-all-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov typing_extensions
python -m pip install -e ".[tests]"
- name: Test with pytest
run: |
pytest tests --cov=tests --cov=pygeoif --cov-report=xml
Expand All @@ -36,7 +36,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
python-version: ['3.11']

steps:
- uses: actions/checkout@v4
Expand All @@ -47,14 +47,15 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r test-requirements.txt
python -m pip install -e ".[typing, complexity, linting]"
- name: Typecheck
run: |
mypy pygeoif
- name: Linting
run: |
flake8 pygeoif
black --check pygeoif tests
ruff --no-fix pygeoif tests
yamllint .github/workflows/
- name: Check complexity
run: |
Expand All @@ -76,7 +77,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest typing_extensions
python -m pip install -e ".[tests]"
- name: Test with pytest
run: |
pytest tests
Expand All @@ -88,10 +89,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: 3.12
- name: Install pypa/build
run: >-
python -m
Expand Down
30 changes: 29 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,45 @@ requires-python = ">=3.7"
text = "LGPL"

[project.optional-dependencies]
complexity = [
"lizard",
"radon",
]
dev = [
"pre-commit",
"pygeoif[complexity]",
"pygeoif[linting]",
"pygeoif[tests]",
]
lint = [
linting = [
"black",
"flake8",
"flake8-cognitive-complexity",
"flake8-comments",
"flake8-complex-f-strings",
"flake8-continuation",
"flake8-docstrings",
"flake8-dunder-all",
"flake8-encodings",
"flake8-expression-complexity",
"flake8-length",
"flake8-literal",
"flake8-pep3101",
"flake8-rst-docstrings",
"flake8-string-format",
"flake8-super",
"flake8-typing-imports",
"flake8-use-fstring",
"ruff",
"yamllint",
]
tests = [
"pytest",
"pytest-cov",
]
typing = [
"mypy",
]

[project.readme]
content-type = "text/x-rst"
Expand Down
64 changes: 0 additions & 64 deletions test-requirements.txt

This file was deleted.

0 comments on commit a889b39

Please sign in to comment.