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

Migrating from setup.py to pyproject.toml #44

Merged
merged 6 commits into from
Oct 2, 2024
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
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jobs:

- name: Build a source tarball and wheel
run: |
pip install wheel
python setup.py sdist bdist_wheel
pip install build
python -m build

- name: Get and store tag from 'Bump version and push tag' step
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 2 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ max-line-length=100
[DESIGN]
# Maximum number of arguments for function / method
max-args=8
# Maximum number of positional arguments for function / method
max-positional-arguments=8
# Argument names that match this expression will be ignored. Default to name
# with leading underscore
ignored-argument-names=_.*
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ The part of the code in this repository developed by the EPFL Blue Brain Project
:target: https://github.com/BlueBrain/Currentscape/blob/main/LICENSE.txt
:alt: license

.. |build| image:: https://github.com/BlueBrain/Currentscape/workflows/Test/badge.svg?branch=main
.. |build| image:: https://github.com/BlueBrain/Currentscape/workflows/test.yml/badge.svg?branch=main
:target: https://github.com/BlueBrain/Currentscape/actions
:alt: actions build status

Expand Down
2 changes: 2 additions & 0 deletions examples/use_case/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ def create_cell():
morph = SSCXNrnFileMorphology(
morphology_path=morph_path,
do_replace_axon=True,
axon_stub_length=60,
axon_nseg_frequency=15,
)

return ephys.models.CellModel(
Expand Down
51 changes: 51 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[build-system]
requires = ["setuptools >= 64", "setuptools_scm"]
build-backend = "setuptools.build_meta"

[project]
name = "currentscape"
authors = [
{name = "Blue Brain Project, EPFL"},
]
description="Module to easily plot currentscape."
readme = "README.rst"
license = {file = "LICENSE.txt"}
requires-python = ">= 3.8"
dynamic = ["version"]
dependencies = [
"numpy",
"matplotlib",
"palettable",
]
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"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",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Bio-Informatics",
]

[project.optional-dependencies]
docs = ["sphinx", "sphinx-bluebrain-theme"]
example = ["scipy", "bluepyopt", "emodelrunner>=1.2.5"]


[project.urls]
Homepage = "https://github.com/BlueBrain/Currentscape"
Source = "https://github.com/BlueBrain/Currentscape"
Repository = "https://github.com/BlueBrain/Currentscape.git"
Tracker = "https://github.com/BlueBrain/Currentscape/issues"
Documentation = "https://currentscape.readthedocs.io/en/latest"

[tool.setuptools.packages.find]
exclude = ["tests",]

[tool.setuptools_scm]
version_scheme = "python-simplified-semver"
local_scheme = "no-local-version"
70 changes: 0 additions & 70 deletions setup.py

This file was deleted.

10 changes: 4 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ ignore_basepython_conflict = true

[gh-actions]
python =
3.7: py3
3.8: py3
3.9: py3
3.10: py3
3.11: check-packaging, lint, docs, coverage
3.11: py3
3.12: check-packaging, lint, docs, coverage

[testenv]
basepython=python
Expand All @@ -49,10 +49,10 @@ commands = do_release.py -p . check-version

[testenv:check-packaging]
deps =
wheel
build
twine
commands =
python setup.py sdist bdist_wheel -d {envtmpdir}/dist
python -m build -o {envtmpdir}/dist
twine check {envtmpdir}/dist/*

[testenv:lint]
Expand All @@ -67,14 +67,12 @@ commands =
pylint {[base]name}
black --diff --check {[base]name}
black --diff --check tests
black --diff --check setup.py

[testenv:format]
deps = black
commands =
black {[base]name}
black tests
black setup.py

[testenv:coverage]
extras = example
Expand Down
Loading