Skip to content
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
39 changes: 0 additions & 39 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,6 @@ orbs:
codecov: codecov/codecov@5.0.3

jobs:
linux39:
machine:
image: ubuntu-2204:2024.11.1
steps:
- checkout
- run:
name: Install python
command: pyenv install 3.9
- run:
name: Load python
command: pyenv global 3.9
- run:
name: Run tests
command: pip install tox==3.24.0 && tox -e py39
no_output_timeout: 60m
- codecov/upload
- store_artifacts:
path: prof/
- store_test_results:
path: .
resource_class: large
linux310:
machine:
image: ubuntu-2204:2024.11.1
Expand Down Expand Up @@ -89,19 +68,6 @@ jobs:
- store_test_results:
path: .
resource_class: large
linters39:
docker:
- image: cimg/python:3.9
steps:
- checkout
- run:
name: Install dependencies
command: pip install -r requirements.dev.txt
- run:
name: Run linters
command: |
pre-commit run --all-files
mypy --ignore-missing-imports --scripts-are-modules .
linters310:
docker:
- image: cimg/python:3.10
Expand All @@ -114,7 +80,6 @@ jobs:
name: Run linters
command: |
pre-commit run --all-files
mypy --ignore-missing-imports --scripts-are-modules .
linters311:
docker:
- image: cimg/python:3.11
Expand All @@ -127,7 +92,6 @@ jobs:
name: Run linters
command: |
pre-commit run --all-files
mypy --ignore-missing-imports --scripts-are-modules .
linters312:
docker:
- image: cimg/python:3.12
Expand All @@ -140,16 +104,13 @@ jobs:
name: Run linters
command: |
pre-commit run --all-files
mypy --ignore-missing-imports --scripts-are-modules .

workflows:
main:
jobs:
- linux39
- linux310
- linux311
- linux312
- linters39
- linters310
- linters311
- linters312
10 changes: 9 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,16 @@ repos:
- id: black
pass_filenames: true
- repo: https://github.com/pycqa/flake8
rev: 5.0.4
rev: 7.3.0
hooks:
- id: flake8
pass_filenames: true
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.14.1
hooks:
- id: mypy
args: ["--ignore-missing-imports", "--scripts-are-modules", "."]
additional_dependencies: ["types-PyYAML==5.4.3"]
pass_filenames: false
always_run: true
exclude: setup.cfg
10 changes: 3 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
lint:
pre-commit run --all-files
mypy --scripts-are-modules --ignore-missing-imports .

dist: clean ## builds source and wheel package
python setup.py sdist bdist_wheel
ls -l dist
Expand Down Expand Up @@ -30,16 +26,16 @@ clean-pyc: ## remove Python file artifacts
find . -name '__pycache__' -exec rm -fr {} +

test:
tox -e "black,flake8,py39"
tox -e "black,flake8,py310"

test-full:
tox

test-short:
tox -e "py39"
tox -e "py310"

format:
tox -e format
pre-commit run --all-files

release: dist ## package and upload release
pip install -qq twine
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ pip install -r requirements.dev.txt
Install the pre-commit hooks:

```
pre-commit install .
pre-commit install
```

Run formatting and tests:
Expand Down
6 changes: 3 additions & 3 deletions requirements.dev.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-r requirements.txt
pre-commit==2.12.0
black==22.3.0
flake8==3.9.1
pre-commit==4.6.0
black==22.8.0
flake8==7.3.0
types-PyYAML==5.4.3
mypy==1.14.1
tox>=3.24.0
8 changes: 3 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,17 @@
install_requires=requirements,
license="MIT license",
zip_safe=False,
python_requires=">=3.6",
python_requires=">=3.10",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries :: Python Modules",
],
Expand Down
18 changes: 6 additions & 12 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[tox]
minversion=3.24.0
envlist = py{39,310,311,312}
envlist = py{310,311,312}

[testenv:py{39,310,311,312}]
[testenv:py{310,311,312}]
deps =
-r{toxinidir}/requirements.test.txt

Expand All @@ -14,7 +14,7 @@ commands =

[black]
deps=
black==22.3.0
black==22.8.0

[testenv:black]
basepython = python3
Expand All @@ -23,24 +23,18 @@ deps = {[black]deps}
commands =
black --check src/ tests/ tools/ examples/

[isort]
profile = black
multi_line_output = 3

[testenv:format]
basepython = python3
skip_install = true
deps=
{[black]deps}
isort==4.3.21
pre-commit==4.6.0
commands =
isort --recursive src/ tests/ tools/ examples/
black src/ tests/ tools/ examples/
pre-commit run --all-files

[flake8]
max-line-length = 80
select = C,E,F,W,B,B950
ignore = E501, W503
ignore = E501, E721, W503
deps =
flake8
flake8-colors
Expand Down