-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proposal to use pre-commit for continuous integration (#121)
* Proposal to use pre-commit for continuous integration * Minor change * Minor change
- Loading branch information
Showing
18 changed files
with
740 additions
and
709 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ on: | |
- master | ||
|
||
jobs: | ||
update: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup python | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 24.8.0 | ||
hooks: | ||
- id: black | ||
args: [--safe, --line-length=100, --preview] | ||
language_version: python3 | ||
|
||
- repo: https://github.com/pycqa/docformatter | ||
rev: v1.7.5 | ||
hooks: | ||
- id: docformatter | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.11.2 | ||
hooks: | ||
- id: mypy | ||
additional_dependencies: [ | ||
types-PyYAML, types-tqdm, types-pytz, | ||
types-requests, types-setuptools, | ||
] | ||
|
||
- repo: https://github.com/pycqa/flake8 | ||
rev: 7.1.1 | ||
hooks: | ||
- id: flake8 | ||
|
||
ci: | ||
autoupdate_schedule: weekly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[flake8] | ||
# Set maximum width of the line to 100 | ||
max-line-length = 100 | ||
|
||
# E203 whitespace before ':' | ||
# E402 module level import not at top of file | ||
# E501 line too long | ||
# E731 do not assign a lambda expression, use a def | ||
# F541 f-string is missing placeholders | ||
# F401 imported but unused | ||
# F403 unable to detect undefined names | ||
# F405 name may be undefined, or defined from star imports | ||
# W503 line break before binary operator | ||
# ignore = E203, E731, F541, W503 | ||
per-file-ignores = | ||
utilix/*__init__.py: F401, E402 | ||
tests/*: F403, F405 | ||
tests/test_import.py: F401 | ||
|
||
|
||
[docformatter] | ||
in-place = true | ||
blank = true | ||
style = sphinx | ||
wrap-summaries = 100 | ||
wrap-descriptions = 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,23 @@ | ||
from setuptools import setup, find_packages | ||
|
||
# Get requirements from requirements.txt, stripping the version tags | ||
with open('requirements.txt') as f: | ||
requires = [ | ||
r.split('/')[-1] if r.startswith('git+') else r | ||
for r in f.read().splitlines()] | ||
with open("requirements.txt") as f: | ||
requires = [r.split("/")[-1] if r.startswith("git+") else r for r in f.read().splitlines()] | ||
|
||
with open('README.md') as file: | ||
with open("README.md") as file: | ||
readme = file.read() | ||
|
||
with open('HISTORY.md') as file: | ||
with open("HISTORY.md") as file: | ||
history = file.read() | ||
|
||
setup( | ||
name="utilix", | ||
version="0.8.5", | ||
url='https://github.com/XENONnT/utilix', | ||
url="https://github.com/XENONnT/utilix", | ||
description="User-friendly interface to various utilities for XENON users", | ||
long_description_content_type='text/markdown', | ||
long_description_content_type="text/markdown", | ||
packages=find_packages(), | ||
install_requires=requires, | ||
python_requires=">=3.6", | ||
long_description=readme + '\n\n' + history, | ||
long_description=readme + "\n\n" + history, | ||
) |
Oops, something went wrong.