Skip to content
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
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changes here will be overwritten by Copier

_commit: 0.1.55
_commit: 0.1.66
_src_path: git@bbpgitlab.epfl.ch:neuromath/python-template.git
author_name: Blue Brain Project, EPFL
copyright_license: Apache License 2.0
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ jobs:
check-pr-title:
name: Check PR title
runs-on: ubuntu-latest
env:
PR_TITLE: ${{ github.event.pull_request.title }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand All @@ -16,4 +18,4 @@ jobs:
- run: npm install -g --force commitlint @commitlint/cli commitlint-plugin-cleanfeet
- run: npm install conventional-changelog-conventionalcommits
- run: touch .git/COMMIT_EDITMSG
- run: echo "${{ github.event.pull_request.title }}" | commitlint
- run: echo "$PR_TITLE" | commitlint
4 changes: 2 additions & 2 deletions .github/workflows/publish-sdist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: "3.10"
- name: Build a wheel and a source tarball
run: |
pip install setuptools>=42 build setuptools_scm[toml]>=3.4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/run-tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
min_versions: ["min_versions", "latest_versions"]
exclude:
- min_versions: "min_versions"
include:
- python-version: "3.8"
- python-version: "3.9"
min_versions: "min_versions"

steps:
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
pip install tox
tox run -e min_versions
- name: JUnit Report Action
uses: mikepenz/action-junit-report@v4
uses: mikepenz/action-junit-report@v5
if: always() # always run even if the previous step fails
with:
report_paths: 'reports/pytest-*.xml'
Expand Down
14 changes: 6 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
default_language_version:
python: python3.8
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand All @@ -13,22 +11,22 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.5.0
rev: v9.18.0
hooks:
- id: commitlint
stages:
- commit-msg
additional_dependencies: ['conventional-changelog-conventionalcommits']
- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 23.9.1
rev: 24.10.0
hooks:
- id: black
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
rev: v2.3.0
hooks:
- id: codespell
args: ["-x", ".codespellignorelines"]
Expand All @@ -38,6 +36,6 @@ repos:
- id: pydocstyle
additional_dependencies: ["tomli"]
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
rev: 7.1.1
hooks:
- id: flake8
3 changes: 2 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ disable=
fixme,
invalid-name,
len-as-condition,
no-else-return
no-else-return,
too-many-positional-arguments

[FORMAT]
# Regexp for a line that is allowed to be longer than the limit.
Expand Down
4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
version: 2

build:
os: ubuntu-20.04
os: ubuntu-22.04
tools:
python: "3.9"
python: "3.11"

sphinx:
configuration: docs/source/conf.py
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ When you wish to contribute to the code base, please consider the following guid
or

```shell
tox -e py38 -e lint -e docs -e check-packaging
tox run -e py39,lint,docs,check-packaging
```

* Commit your changes using a descriptive commit message.
Expand Down
9 changes: 5 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@

# -- Project information -----------------------------------------------------

project = "BluePyParallel"
project_name = "BluePyParallel"
package_name = "BluePyParallel"

# The short X.Y version
version = metadata.version("BluePyParallel")
version = metadata.version(package_name)

# The full version, including alpha/beta/rc tags
release = version
Expand Down Expand Up @@ -76,10 +77,10 @@
# html_static_path = ['_static']

html_theme_options = {
"metadata_distribution": "BluePyParallel",
"metadata_distribution": package_name,
}

html_title = project
html_title = project_name

# If true, links to the reST sources are added to the pages.
html_show_sourcelink = False
Expand Down
9 changes: 4 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ authors = [
]
description = "Provides an embarrassingly parallel tool with sql backend."
readme = "README.md"
requires-python = ">=3.8"
requires-python = ">=3.9"
license = { text = "Apache License 2.0" }
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand Down Expand Up @@ -45,8 +44,8 @@ test = [
"packaging>=20",
"pytest>=6.1",
"pytest-benchmark>=3.4",
"pytest-cov>=3",
"pytest-html>=3.1",
"pytest-cov>=4.1",
"pytest-html>=3.2",
]

[project.urls]
Expand All @@ -69,10 +68,10 @@ include = ["bluepyparallel*"]
[tool.black]
line-length = 100
target-version = [
"py38",
"py39",
"py310",
"py311",
"py312",
]

[tool.pydocstyle]
Expand Down
7 changes: 4 additions & 3 deletions tests/test_parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,11 @@ def dict_data():
def data(request, int_data, dict_data):
"""Fixture for simple data depending of the type (range or dict)."""
if request.param == "range":
values = deepcopy(int_data), _evaluation_function_range
return deepcopy(int_data), _evaluation_function_range
elif request.param == "dict":
values = deepcopy(dict_data), _evaluation_function_dict
return values
return deepcopy(dict_data), _evaluation_function_dict
else:
raise ValueError(f"Unknown value '{request.param}'")


def expected_results(data, func, *args, **kwargs):
Expand Down
30 changes: 16 additions & 14 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ envlist =
lint
docs
min_versions
py{38,39,310,311}
py{39,310,311,312}
coverage

minversion = 3.18
Expand All @@ -19,15 +19,10 @@ allowlist_externals =
extras = test
setenv =
COVERAGE_FILE = {env:COVERAGE_FILE:.coverage-{envname}}
deps =
min_versions: Requirements-Builder
commands_pre =
min_versions: requirements-builder --level=min --extras=test -o {envtmpdir}/requirements_min.txt setup.py
min_versions: pip install -r {envtmpdir}/requirements_min.txt
min_versions: pip freeze
commands =
- ipcluster stop --cluster-id={[base]name}_{envname} --signal 9 --debug
ipcluster start -n 2 --daemonize --log-to-file --cluster-id={[base]name}_{envname} --debug
commands =
pytest \
--basetemp={envtmpdir} \
--cov={[base]name} \
Expand All @@ -40,10 +35,11 @@ commands =
--html reports/pytest-{envname}.html \
--junit-xml=reports/pytest-{envname}.xml \
--self-contained-html \
--durations 10 \
--durations-min=2.0 \
--benchmark-skip \
-k "not TestBenchmark" \
{posargs}
commands_post =
- ipcluster stop --cluster-id={[base]name}_{envname} --signal 9 --debug

[testenv:coverage]
Expand All @@ -69,10 +65,16 @@ commands_pre =
commands_post =

[testenv:min_versions]
basepython = python3.8
basepython = python3.9
deps =
Requirements-Builder
commands_pre =
requirements-builder --level=min --extras=test -o {envtmpdir}/requirements_min.txt setup.py
pip install -r {envtmpdir}/requirements_min.txt
pip freeze

[testenv:lint]
basepython = python3.8
basepython = python3.9
deps =
pre-commit
pylint
Expand All @@ -83,7 +85,7 @@ commands_pre =
commands_post =

[testenv:format]
basepython = python3.8
basepython = python3.9
skip_install = true
deps =
codespell
Expand All @@ -107,7 +109,7 @@ commands_post =

[gh-actions]
python =
3.8: py38, lint
3.9: py39, docs
3.9: py39, lint
3.10: py310, check-packaging
3.11: py311
3.11: py311, docs
3.12: py312