Skip to content

Commit

Permalink
Merge pull request #7 from neuro-ml/dev
Browse files Browse the repository at this point in the history
BIMCV
  • Loading branch information
maxme1 committed Dec 13, 2022
2 parents 923ad31 + cce0e32 commit 27440c1
Show file tree
Hide file tree
Showing 42 changed files with 826 additions and 288 deletions.
11 changes: 11 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[flake8]
# W503: line break before binary operator is actually considered best-practice
# E203: spaces around complex variables in slices are pep-right
# F401: unused imports in __init__.py-s
# I251: allow absolute imports in upper files
# B019: @lru_cache for static methods is fine
# C408: for identifier-like fields dict(x=y) is just more concise
ignore = W503,E203,B019,C408
per-file-ignores =
__init__.py:F401
max-line-length = 120
14 changes: 12 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ env:

jobs:
test:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [ '3.6', '3.7', '3.8', '3.9', '3.10' ]
Expand All @@ -19,12 +19,15 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Check the version and build the package
- name: Check the version
if: "! github.event.pull_request.head.repo.fork "
run: |
VERSION=$(python -c "from pathlib import Path; import runpy; folder, = {d.parent for d in Path().resolve().glob('*/__init__.py') if d.parent.is_dir() and (d.parent / '__version__.py').exists()}; print(runpy.run_path(folder / '__version__.py')['__version__'])")
MATCH=$(pip index versions $MODULE_NAME | grep "Available versions:" | grep $VERSION) || echo
echo $MATCH
if [ "$GITHUB_BASE_REF" = "master" ] && [ "$MATCH" != "" ]; then exit 1; fi
- name: Build the package
run: |
python setup.py sdist
- name: Install
Expand All @@ -39,6 +42,13 @@ jobs:
echo $MODULE_PARENT
echo "MODULE_PARENT=$(echo $MODULE_PARENT)" >> $GITHUB_ENV
- name: Check code style
run: |
pip install -r lint-requirements.txt
flake8 .
isort --check .
black --check .
- name: Create the storage
run: |
mkdir -p ~/.config/amid/ && cp tests/assets/.bev.yml ~/.config/amid/.bev.yml
Expand Down
1 change: 1 addition & 0 deletions amid/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

from .__version__ import __version__


unstable_module(__name__)
2 changes: 1 addition & 1 deletion amid/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.3.0'
__version__ = '0.4.0'
Loading

0 comments on commit 27440c1

Please sign in to comment.