From b30cdf31065fa354dc81eb06d738ec50fee35f62 Mon Sep 17 00:00:00 2001
From: Adrien Berchet <adrien.berchet@epfl.ch>
Date: Fri, 8 Nov 2024 10:00:51 +0100
Subject: [PATCH] Chore: Bump Copier template

---
 .codespellrc                                |  2 +-
 .copier-answers.yml                         |  6 ++---
 .github/ISSUE_TEMPLATE/bug_report.yaml      |  2 +-
 .github/ISSUE_TEMPLATE/feature_request.yaml |  2 +-
 .github/ISSUE_TEMPLATE/how_to_use.yaml      |  2 +-
 .github/workflows/run-tox.yml               |  2 +-
 .pre-commit-config.yaml                     |  6 ++---
 AUTHORS.md                                  |  2 +-
 CONTRIBUTING.md                             |  2 +-
 docs/source/conf.py                         |  9 +++----
 docs/source/contributing.rst                |  1 +
 docs/source/index.rst                       |  1 +
 requirements/base.pip                       |  4 ++++
 setup.py                                    | 26 ++++++++-------------
 tox.ini                                     | 19 +++++++--------
 15 files changed, 43 insertions(+), 43 deletions(-)
 create mode 100644 docs/source/contributing.rst

diff --git a/.codespellrc b/.codespellrc
index 4ee856e..477508c 100644
--- a/.codespellrc
+++ b/.codespellrc
@@ -1,2 +1,2 @@
 [codespell]
-skip = .git/*
+skip = .git/*,*.pdf
diff --git a/.copier-answers.yml b/.copier-answers.yml
index 3f23a7c..0879964 100644
--- a/.copier-answers.yml
+++ b/.copier-answers.yml
@@ -1,6 +1,6 @@
 # Changes here will be overwritten by Copier
 
-_commit: 0.1.65
+_commit: 0.1.67
 _src_path: git@bbpgitlab.epfl.ch:neuromath/python-template.git
 author_email: ''
 author_name: Blue Brain Project, EPFL
@@ -9,11 +9,11 @@ copyright_year: '2022'
 distribution_name: synthesis-workflow
 download_url: https://github.com/BlueBrain/synthesis-workflow
 init_git: false
-maintainer: Adrien Berchet
+maintainer: Adrien Berchet (@adrien-berchet)
 package_name: synthesis_workflow
 project_description: Workflow used for synthesis and its validation.
 project_name: Synthesis Workflow
-project_url: https://synthesis_workflow.readthedocs.io
+project_url: https://synthesis-workflow.readthedocs.io
 repository_name: synthesis-workflow
 repository_namespace: BlueBrain
 repository_provider: github
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml
index 1921990..8b76e49 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yaml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yaml
@@ -43,7 +43,7 @@ Your reports must include the following features:
   - type: input
     id: relevant_documentation
     attributes:
-      label: Optional link from https://synthesis_workflow.readthedocs.io which documents the behavior that is expected
+      label: Optional link from https://synthesis-workflow.readthedocs.io which documents the behavior that is expected
       description: "
 Please make sure the behavior you are seeing is definitely in contradiction to what's documented as the correct behavior.
 "
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml
index 1b4267d..fd87733 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.yaml
+++ b/.github/ISSUE_TEMPLATE/feature_request.yaml
@@ -12,7 +12,7 @@ body:
 Thanks for taking the time to fill out this feature request!
 
 
-Before submitting, make sure the feature does not already exist in the [documentation](https://synthesis_workflow.readthedocs.io) and that you searched in the [issue list](https://github.com/BlueBrain/synthesis-workflow/issues) that a similar feature request has not already been reported.
+Before submitting, make sure the feature does not already exist in the [documentation](https://synthesis-workflow.readthedocs.io) and that you searched in the [issue list](https://github.com/BlueBrain/synthesis-workflow/issues) that a similar feature request has not already been reported.
 If it is not the case, please read the following guidelines.
 
 ### GUIDELINES FOR REQUESTING HELP
diff --git a/.github/ISSUE_TEMPLATE/how_to_use.yaml b/.github/ISSUE_TEMPLATE/how_to_use.yaml
index a6bc893..e284ad2 100644
--- a/.github/ISSUE_TEMPLATE/how_to_use.yaml
+++ b/.github/ISSUE_TEMPLATE/how_to_use.yaml
@@ -12,7 +12,7 @@ body:
 Thanks for using this package and taking the time to fill out this help request!
 
 
-Before submitting, make sure you read the [documentation](https://synthesis_workflow.readthedocs.io) carefully.
+Before submitting, make sure you read the [documentation](https://synthesis-workflow.readthedocs.io) carefully.
 If you still have a question, you should search in the [issue list](https://github.com/BlueBrain/synthesis-workflow/issues) that a similar issue has not already been reported, you might find your answer there.
 If it is not the case, please read the following guidelines.
 
diff --git a/.github/workflows/run-tox.yml b/.github/workflows/run-tox.yml
index be0401f..2807fdc 100644
--- a/.github/workflows/run-tox.yml
+++ b/.github/workflows/run-tox.yml
@@ -64,7 +64,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'
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 997194b..6e8187f 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,6 +1,6 @@
 repos:
   - repo: https://github.com/pre-commit/pre-commit-hooks
-    rev: v4.6.0
+    rev: v5.0.0
     hooks:
       - id: check-added-large-files
       - id: check-case-conflict
@@ -11,7 +11,7 @@ repos:
       - id: end-of-file-fixer
       - id: trailing-whitespace
   - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
-    rev: v9.17.0
+    rev: v9.18.0
     hooks:
         - id: commitlint
           stages:
@@ -22,7 +22,7 @@ repos:
     hooks:
       - id: isort
   - repo: https://github.com/psf/black
-    rev: 24.8.0
+    rev: 24.10.0
     hooks:
       - id: black
   - repo: https://github.com/codespell-project/codespell
diff --git a/AUTHORS.md b/AUTHORS.md
index 814515a..d517877 100644
--- a/AUTHORS.md
+++ b/AUTHORS.md
@@ -1,5 +1,5 @@
 # Maintainer
 
-Adrien Berchet
+Adrien Berchet (@adrien-berchet)
 
 # Contributors
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index a4ba867..ff67771 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -59,7 +59,7 @@ When you wish to contribute to the code base, please consider the following guid
   or
 
   ```shell
-  tox -e py39 -e lint -e docs -e check-packaging
+  tox run -e py39,lint,docs,check-packaging
   ```
 
 * Commit your changes using a descriptive commit message.
diff --git a/docs/source/conf.py b/docs/source/conf.py
index 6836457..01574b6 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -25,10 +25,11 @@
 
 # -- Project information -----------------------------------------------------
 
-project = "Synthesis Workflow"
+project_name = "Synthesis Workflow"
+package_name = "synthesis-workflow"
 
 # The short X.Y version
-version = metadata.version("synthesis-workflow")
+version = metadata.version(package_name)
 
 # The full version, including alpha/beta/rc tags
 release = version
@@ -94,10 +95,10 @@
 # html_static_path = ['_static']
 
 html_theme_options = {
-    "metadata_distribution": "synthesis-workflow",
+    "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
diff --git a/docs/source/contributing.rst b/docs/source/contributing.rst
new file mode 100644
index 0000000..f2c987c
--- /dev/null
+++ b/docs/source/contributing.rst
@@ -0,0 +1 @@
+.. mdinclude:: ../../CONTRIBUTING.md
diff --git a/docs/source/index.rst b/docs/source/index.rst
index a82cb22..59dc7d1 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -50,3 +50,4 @@ The :doc:`./api_ref` page contains detailed documentation of:
    cli
    api_ref
    changelog
+   contributing
diff --git a/requirements/base.pip b/requirements/base.pip
index 3af6b0f..309a696 100644
--- a/requirements/base.pip
+++ b/requirements/base.pip
@@ -1,3 +1,7 @@
+atlas_analysis>=0.0.5
+bluepy>=2.5,<3
+bluepy-configfile>=0.1.19
+bluepymm>=0.8.5
 bluepyparallel>=0.0.8
 brainbuilder>=0.20
 diameter_synthesis>=0.5.4
diff --git a/setup.py b/setup.py
index ce8f0e0..bb256a6 100644
--- a/setup.py
+++ b/setup.py
@@ -1,19 +1,10 @@
 """Setup for the synthesis-workflow package."""
 
-import importlib
 from pathlib import Path
 
 from setuptools import find_namespace_packages
 from setuptools import setup
 
-spec = importlib.util.spec_from_file_location(
-    "src.version",
-    "src/version.py",
-)
-module = importlib.util.module_from_spec(spec)
-spec.loader.exec_module(module)
-VERSION = module.VERSION
-
 # Read the requirements
 with open("requirements/base.pip", "r", encoding="utf-8") as f:
     reqs = f.read().splitlines()
@@ -28,21 +19,23 @@
 
 setup(
     name="synthesis-workflow",
-    author="bbp-ou-cells",
-    author_email="bbp-ou-cells@groupes.epfl.ch",
+    author="Blue Brain Project, EPFL",
     description="Workflow used for synthesis and its validation.",
     long_description=Path("README.rst").read_text(encoding="utf-8"),
     long_description_content_type="text/x-rst",
-    url="https://bbpteam.epfl.ch/documentation/projects/synthesis-workflow",
+    url="https://synthesis-workflow.readthedocs.io",
     project_urls={
-        "Tracker": "https://bbpteam.epfl.ch/project/issues/projects/CELLS/issues",
-        "Source": "https://bbpgitlab.epfl.ch/neuromath/synthesis-workflow",
+        "Tracker": "https://github.com/BlueBrain/synthesis-workflow/issues",
+        "Source": "https://github.com/BlueBrain/synthesis-workflow",
     },
-    license="BBP-internal-confidential",
+    license="Apache License 2.0",
     packages=find_namespace_packages("src"),
     package_dir={"": "src"},
     python_requires=">=3.9",
-    version=VERSION,
+    use_scm_version=True,
+    setup_requires=[
+        "setuptools_scm",
+    ],
     install_requires=reqs,
     extras_require={
         "docs": doc_reqs,
@@ -56,6 +49,7 @@
     },
     include_package_data=True,
     classifiers=[
+        # TODO: Update to relevant classifiers
         "Development Status :: 2 - Pre-Alpha",
         "Intended Audience :: Education",
         "Intended Audience :: Science/Research",
diff --git a/tox.ini b/tox.ini
index 2dee8de..098b3b4 100644
--- a/tox.ini
+++ b/tox.ini
@@ -5,7 +5,6 @@ files = src/{[base]name} src/{[base]morphval} tests docs/source/conf.py setup.py
 
 [tox]
 envlist =
-    check-version
     check-packaging
     lint
     docs
@@ -19,8 +18,6 @@ minversion = 3.18
 extras = test
 setenv =
     COVERAGE_FILE = {env:COVERAGE_FILE:.coverage-{envname}}
-    PIP_INDEX_URL = {env:PIP_INDEX_URL:https://bbpteam.epfl.ch/repository/devpi/simple}
-    PIP_EXTRA_INDEX_URL = {env:PIP_EXTRA_INDEX_URL:https://pypi.python.org/simple}
 commands =
     pytest \
         -n {env:PYTEST_NPROCS:3} \
@@ -38,6 +35,8 @@ commands =
         --junit-xml=reports/pytest-{envname}.xml \
         --self-contained-html \
         --dcd-export-formatted-data \
+        --durations 10 \
+        --durations-min=2.0 \
         {posargs}
 
 [testenv:coverage]
@@ -49,13 +48,6 @@ commands =
     coverage xml
     coverage report
 
-[testenv:check-version]
-skip_install = true
-deps = bbp-nse-ci>=0.2.5
-commands =
-    do_release.py -p . check-version
-    do_release.py -p . check-changelog --release-only --path CHANGELOG.md
-
 [testenv:check-packaging]
 skip_install = true
 deps =
@@ -104,3 +96,10 @@ allowlist_externals =
 commands =
     make clean
     make html SPHINXOPTS=-W
+
+[gh-actions]
+python =
+  3.9: py39, lint
+  3.10: py310, check-packaging
+  3.11: py311, docs
+  3.12: py312