-
Notifications
You must be signed in to change notification settings - Fork 7
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
Modernize setup to use pyproject.toml #116
Changes from 7 commits
b83bd3f
cf1a83b
efa0df7
59df684
2ae11f5
c03dbd3
38167bc
070fafe
7b85e22
e0eadc0
eb0ab0c
920aece
6f7b478
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,28 +7,26 @@ jobs: | |
steps: | ||
- checkout | ||
- run: | ||
name: Install dev dependencies | ||
name: Create virtualenv | ||
command: | | ||
python3 -m venv ~/venv | ||
. ~/venv/bin/activate | ||
make install | ||
python -m venv /home/circleci/venv/ | ||
echo "source /home/circleci/venv/bin/activate" >> $BASH_ENV | ||
- run: | ||
name: Install dev dependencies | ||
command: make install | ||
- run: | ||
name: Test | ||
command: | | ||
. ~/venv/bin/activate | ||
make test | ||
command: make test | ||
when: always | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TIL |
||
- run: | ||
name: Lint | ||
command: | | ||
. ~/venv/bin/activate | ||
make lint | ||
command: make ruff | ||
when: always | ||
- run: | ||
name: Mypy | ||
command: | | ||
. ~/venv/bin/activate | ||
make mypy | ||
command: make mypy | ||
when: always | ||
- run: | ||
name: Black | ||
command: | | ||
. ~/venv/bin/activate | ||
make black_check | ||
name: Format | ||
command: make format_check | ||
when: always |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,22 +16,6 @@ repos: | |
stages: [commit] | ||
- id: trailing-whitespace # Trims trailing whitespace. | ||
|
||
|
||
- repo: https://github.com/timothycrosley/isort | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. General comment: Thanks for the catch on pre-commit. My VSCode doesn't search in this file. Need to fix that. |
||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
|
||
- repo: https://github.com/ambv/black | ||
rev: 23.1.0 | ||
hooks: | ||
- id: black | ||
|
||
- repo: https://github.com/pycqa/flake8.git | ||
rev: 6.0.0 | ||
hooks: | ||
- id: flake8 | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: 'v1.1.1' | ||
hooks: | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,79 @@ | ||
[tool.black] | ||
line-length = 99 | ||
[build-system] | ||
requires = ["setuptools>=68.2.2"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "xocto" | ||
version = "4.9.0" | ||
requires-python = ">=3.9" | ||
description = "Kraken Technologies Python service utilities" | ||
readme = "README.md" | ||
authors = [ | ||
{name = "Kraken Technologies", email = "[email protected]"}, | ||
] | ||
maintainers = [ | ||
{name = "Kraken Technologies", email = "[email protected]"}, | ||
] | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Developers", | ||
"Topic :: Software Development :: Build Tools", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should add support for Python 3.12 at some point too. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed, created #121. |
||
] | ||
license = {text = "MIT"} | ||
dependencies = [ | ||
"ddtrace>=1.9.0", | ||
"duckdb>=0.9.0", | ||
"django>=4.0", | ||
"openpyxl>=3.1.0", | ||
"pact-python>=1.6.0", | ||
"pandas>=1.5.3", | ||
"pyarrow>=11.0.0", | ||
"python-dateutil>=2.8.2", | ||
"python-magic>=0.4.27", | ||
"pytz", | ||
"structlog>=20.2.0", | ||
"xlrd>=2.0.1", | ||
] | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"boto3==1.26.53", | ||
"botocore==1.29.53", | ||
"hypothesis==6.62.1", | ||
"moto[s3,sqs]==4.1", | ||
"mypy-boto3-s3==1.26.0.post1", | ||
"mypy==0.991", | ||
"numpy==1.22.2", | ||
"pre-commit>=3.2.0", | ||
"pyarrow-stubs==10.0.1.6", | ||
"pytest-django==4.5.2", | ||
"pytest-mock==3.10.0", | ||
"pytest==7.2.1", | ||
"ruff==0.1.3", | ||
"time-machine==2.9.0", | ||
"twine==4.0.2", | ||
"types-openpyxl==3.0.4.5", | ||
"types-python-dateutil==2.8.19.6", | ||
"types-pytz==2022.7.1.0", | ||
"types-requests==2.28.11.8", | ||
"wheel==0.38.4", | ||
] | ||
docs = [ | ||
"Sphinx==4.5.0", | ||
"myst-parser==0.18.1", | ||
] | ||
|
||
[project.urls] | ||
changelog = "https://github.com/octoenergy/xocto/blob/main/CHANGELOG.md" | ||
documentation = "https://xocto.readthedocs.io" | ||
issues = "https://github.com/octoenergy/xocto/issues" | ||
|
||
[tool.setuptools] | ||
packages = ["xocto", "xocto.events", "xocto.storage"] | ||
|
||
[tool.mypy] | ||
# Specify which files to check. | ||
|
@@ -78,7 +152,7 @@ select = [ | |
"I", # isort | ||
] | ||
ignore = [ | ||
"E501", # line too long - black takes care of this for us | ||
"E501", # line too long | ||
] | ||
|
||
[tool.ruff.per-file-ignores] | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General comment: Looking at this I like the bold changes. I think I get too timid with these kinds of chores, trying to keep them tiny in scope.