Skip to content
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

[MAINT] update packaging #27

Merged
merged 9 commits into from
May 29, 2023
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
7 changes: 7 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[flake8]
max-line-length = 99
exclude = *build/,_version.py,due.py
putty-ignore =
*/__init__.py : +F401
ignore = E203,E402,E722,W503
docstring-convention = numpy
2 changes: 1 addition & 1 deletion .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.7'
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ jobs:
outputs:
skip: ${{ steps.result_step.outputs.ci-skip }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- id: result_step
uses: mstachniuk/ci-skip@master
with:
Expand All @@ -32,18 +29,20 @@ jobs:
run_tests:
needs: check_skip
if: ${{ needs.check_skip.outputs.skip == 'false' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11']
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} with Python ${{ matrix.python-version }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up python
uses: actions/setup-python@v4
with:
Expand All @@ -53,7 +52,7 @@ jobs:
run: python -c "import sys; print(sys.version)"
- name: Install pybids-reports
shell: bash {0}
run: pip install -e .[tests]
run: pip install .[tests]
- name: Run tests
shell: bash {0}
run: python -m pytest --pyargs bids/ext/reports --cov=bids/ext/reports
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# do not track _version.py for hatch
bids/ext/reports/_version.py

tmp.py

# Byte-compiled / optimized / DLL files
Expand Down
54 changes: 29 additions & 25 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,44 +12,48 @@ repos:
- id: check-added-large-files
- id: check-case-conflict


- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black

- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
args: [--config=setup.cfg]

# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v0.991
# hooks:
# - id: mypy

- repo: https://github.com/pyCQA/isort
rev: 5.12.0
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: isort

- id: codespell
args: [--toml=pyproject.toml]
additional_dependencies: [tomli]

- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.3
hooks:
- id: yamlfmt
args: [--mapping, '2', --sequence, '2', --offset, '0']

# - repo: https://github.com/asottile/setup-cfg-fmt
# rev: v2.2.0
# hooks:
# - id: setup-cfg-fmt

- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
hooks:
- id: pyupgrade
args: [--py37-plus]
args: [--py38-plus]

- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
- id: black
args: [--config=pyproject.toml, --verbose]

- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.2.0
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v0.991
# hooks:
# - id: mypy

# - repo: https://github.com/pyCQA/isort
# rev: 5.11.4
# hooks:
# - id: isort

- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: setup-cfg-fmt
- id: flake8
args: [--config=.flake8]
2 changes: 1 addition & 1 deletion bids/ext/reports/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

del due, Doi

__version__ = _version.get_versions()["version"]
__version__ = _version.__version__
Loading