Skip to content

Commit 27182bb

Browse files
authored
Merge pull request #597 from ghisvail/mnt/flit-scm
MNT: Migrate project to flit-scm
2 parents a5dfe42 + cd95d0d commit 27182bb

15 files changed

+147
-2608
lines changed

.circleci/config.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ jobs:
4646
- checkout
4747
- run:
4848
name: Install deps
49-
command: pip install --no-cache-dir -r docs/requirements.txt
49+
command: |
50+
pip install --upgrade pip
51+
pip install --no-cache-dir .[doc]
5052
- run:
5153
name: Build only this commit
5254
command: make -C docs SPHINXOPTS="-W" BUILDDIR="_build/no_version_html" SPHINX_APIDOC_OPTIONS="members,undoc-members,show-inheritance,noindex" html

.flake8

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[flake8]
2+
doctests = True
3+
exclude =
4+
**/__init__.py
5+
**/tests/*
6+
*build/
7+
docs/sphinxext/
8+
docs/tools/
9+
docs/conf.py
10+
pydra/_version.py
11+
versioneer.py
12+
max-line-length=105
13+
ignore = E203,W503,F541

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ jobs:
2020
- name: Install dependencies
2121
run: |
2222
python -m pip install --upgrade pip
23-
pip install setuptools wheel twine
23+
pip install build twine
2424
2525
- name: Build and publish
2626
env:
2727
TWINE_USERNAME: __token__
2828
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
2929
run: |
30-
python setup.py bdist_wheel
30+
python -m build
3131
twine upload dist/*

.github/workflows/testsingularity.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
with:
5454
python-version: ${{ matrix.python-version }}
5555
- name: Update build tools
56-
run: python -m pip install --upgrade pip setuptools
56+
run: python -m pip install --upgrade pip
5757

5858

5959
- name: Checkout Pydra repo

.github/workflows/testslurm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
docker exec slurm bash -c "echo $NO_ET"
3939
docker exec slurm bash -c "ls -la && echo list top level dir"
4040
docker exec slurm bash -c "ls -la /pydra && echo list pydra dir"
41-
docker exec slurm bash -c "pip install -e /pydra[test] && python -c 'import pydra; print(pydra.__version__)'"
41+
docker exec slurm bash -c "pip install --upgrade pip && pip install -e /pydra[test] && python -c 'import pydra; print(pydra.__version__)'"
4242
- name: Run pytest
4343
run: docker exec slurm bash -c "pytest --color=yes -vs -n auto --cov pydra --cov-config /pydra/.coveragerc --cov-report xml:/pydra/cov.xml --doctest-modules /pydra/pydra"
4444
- name: Upload to codecov

.pre-commit-config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ repos:
1616
rev: v2.2.2
1717
hooks:
1818
- id: codespell
19-
exclude: ^(pydra/_version\.py|versioneer\.py)$
19+
additional_dependencies:
20+
- tomli
2021
- repo: https://github.com/PyCQA/flake8
2122
rev: 5.0.4
2223
hooks:

.readthedocs.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# .readthedocs.yaml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Build with Python 3.9 on the latest version of Ubuntu.
9+
build:
10+
os: ubuntu-22.04
11+
tools:
12+
python: '3.9'
13+
14+
# Build documentation in the docs/ directory with Sphinx.
15+
sphinx:
16+
configuration: docs/conf.py
17+
18+
# Install extra requirements for the documentation.
19+
python:
20+
install:
21+
- method: pip
22+
path: '.'
23+
extra_requirements:
24+
- doc

docs/requirements.txt

Lines changed: 0 additions & 9 deletions
This file was deleted.

long_description.rst

Lines changed: 0 additions & 6 deletions
This file was deleted.

pydra/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@
1212
import logging
1313

1414
logger = logging.getLogger("pydra")
15-
from ._version import get_versions
1615

17-
__version__ = get_versions()["version"]
18-
del get_versions
16+
try:
17+
from ._version import __version__
18+
except ImportError:
19+
pass
1920

2021
from .engine import Submitter, Workflow, AuditFlag, ShellCommandTask, DockerTask, specs
2122
from . import mark

0 commit comments

Comments
 (0)