From f31d7e1894c9e8915a85f4c6d8765ee2831b182f Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Fri, 6 Mar 2026 09:19:52 +0100 Subject: [PATCH 1/2] Apply new templates --- .copier-answers.yml | 2 +- docs/docs/assets/javascripts/extra.js | 14 ++++++-------- docs/docs/assets/javascripts/mathjax.js | 18 ++++++++++++------ pixi.toml | 6 +++--- tools/add_spdx.py | 2 ++ tools/check_spdx.py | 2 ++ tools/remove_spdx.py | 2 ++ tools/test_scripts.py | 2 ++ tools/update_github_labels.py | 4 +++- 9 files changed, 33 insertions(+), 19 deletions(-) diff --git a/.copier-answers.yml b/.copier-answers.yml index 5751d20f..bbb67a49 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,6 +1,6 @@ # WARNING: Do not edit this file manually. # Any changes will be overwritten by Copier. -_commit: v0.10.0 +_commit: v0.10.1-2-gd05af4f _src_path: gh:easyscience/templates app_docs_url: https://easyscience.github.io/dynamics-app app_doi: 10.5281/zenodo.18163581 diff --git a/docs/docs/assets/javascripts/extra.js b/docs/docs/assets/javascripts/extra.js index dd3fc356..9596ee07 100644 --- a/docs/docs/assets/javascripts/extra.js +++ b/docs/docs/assets/javascripts/extra.js @@ -1,6 +1,5 @@ -(function() { - - "use strict" +;(function () { + 'use strict' // Variables const header = document.getElementsByTagName('header')[0] @@ -10,20 +9,19 @@ // Hide-show header shadow function toggleHeaderShadow() { if (window.pageYOffset <= 0) { - header.classList.remove("md-header--shadow") + header.classList.remove('md-header--shadow') } else { - header.classList.add("md-header--shadow") + header.classList.add('md-header--shadow') } } // Onload - window.onload = function() { + window.onload = function () { toggleHeaderShadow() } // Onscroll - window.onscroll = function() { + window.onscroll = function () { toggleHeaderShadow() } - })() diff --git a/docs/docs/assets/javascripts/mathjax.js b/docs/docs/assets/javascripts/mathjax.js index a92ce69a..333524ec 100644 --- a/docs/docs/assets/javascripts/mathjax.js +++ b/docs/docs/assets/javascripts/mathjax.js @@ -3,21 +3,27 @@ window.MathJax = { //inlineMath: [['\\(', '\\)']], //displayMath: [['\\[', '\\]']], // Add support for $...$ and \(...\) delimiters - inlineMath: [['$', '$'], ['\\(', '\\)']], + inlineMath: [ + ['$', '$'], + ['\\(', '\\)'], + ], // Add support for $$...$$ and \[...]\ delimiters - displayMath: [['$$', '$$'], ['\\[', '\\]']], + displayMath: [ + ['$$', '$$'], + ['\\[', '\\]'], + ], processEscapes: true, - processEnvironments: true + processEnvironments: true, }, options: { //ignoreHtmlClass: ".*|", //processHtmlClass: "arithmatex" // Skip code blocks only - skipHtmlTags: ['script','noscript','style','textarea','pre','code'], + skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code'], // Only ignore explicit opt-out ignoreHtmlClass: 'no-mathjax|tex2jax_ignore', - } -}; + }, +} document$.subscribe(() => { MathJax.startup.output.clearCache() diff --git a/pixi.toml b/pixi.toml index 22dabb86..61e7bbfe 100644 --- a/pixi.toml +++ b/pixi.toml @@ -182,9 +182,9 @@ docs-update-assets = 'python tools/update_docs_assets.py' # 📦 Template Management Tasks ############################## -copier-copy = "copier copy gh:easyscience/templates . --data-file .copier-answers.yml --data template_type=lib" -copier-recopy = "copier recopy --data-file .copier-answers.yml --data template_type=lib" -copier-update = "copier update --data-file .copier-answers.yml --data template_type=lib" +copier-copy = "copier copy gh:easyscience/templates . --data-file ../dynamics/.copier-answers.yml --data template_type=lib" +copier-recopy = "copier recopy --data-file ../dynamics/.copier-answers.yml --data template_type=lib" +copier-update = "copier update --data-file ../dynamics/.copier-answers.yml --data template_type=lib" ##################### # 🪝 Pre-commit Hooks diff --git a/tools/add_spdx.py b/tools/add_spdx.py index 295a7e0d..28febde7 100644 --- a/tools/add_spdx.py +++ b/tools/add_spdx.py @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2026 EasyScience contributors +# SPDX-License-Identifier: BSD-3-Clause """Add SPDX headers to Python files. - SPDX-FileCopyrightText with the license holder name and organization diff --git a/tools/check_spdx.py b/tools/check_spdx.py index 80555ab1..c8a4df21 100644 --- a/tools/check_spdx.py +++ b/tools/check_spdx.py @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2026 EasyScience contributors +# SPDX-License-Identifier: BSD-3-Clause """Check SPDX headers in Python files.""" from __future__ import annotations diff --git a/tools/remove_spdx.py b/tools/remove_spdx.py index 50e547a7..f5d09da5 100644 --- a/tools/remove_spdx.py +++ b/tools/remove_spdx.py @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2026 EasyScience contributors +# SPDX-License-Identifier: BSD-3-Clause """Remove SPDX headers from Python files.""" from __future__ import annotations diff --git a/tools/test_scripts.py b/tools/test_scripts.py index 2d347579..e24b28e2 100644 --- a/tools/test_scripts.py +++ b/tools/test_scripts.py @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2026 EasyScience contributors +# SPDX-License-Identifier: BSD-3-Clause """Test runner for tutorial scripts in the 'tutorials' directory. This test discovers and executes all Python scripts located under the diff --git a/tools/update_github_labels.py b/tools/update_github_labels.py index 8ec8c2d7..84de575e 100644 --- a/tools/update_github_labels.py +++ b/tools/update_github_labels.py @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2026 EasyScience contributors +# SPDX-License-Identifier: BSD-3-Clause """Set/update GitHub labels for current or specified easyscience repository. @@ -17,7 +19,7 @@ import argparse import json import shlex -import subprocess +import subprocess # noqa: S404 import sys from dataclasses import dataclass From 78b206e02a0bc8eed3b77f61352631dff43c1e61 Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Fri, 6 Mar 2026 09:20:28 +0100 Subject: [PATCH 2/2] Fix Zenodo DOI --- .copier-answers.yml | 4 ++-- docs/docs/introduction/index.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.copier-answers.yml b/.copier-answers.yml index bbb67a49..4003a370 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -3,14 +3,14 @@ _commit: v0.10.1-2-gd05af4f _src_path: gh:easyscience/templates app_docs_url: https://easyscience.github.io/dynamics-app -app_doi: 10.5281/zenodo.18163581 +app_doi: 10.5281/zenodo.18877180 app_package_name: easydynamics_app app_python: '3.12' app_repo_name: dynamics-app home_page_url: https://easyscience.github.io/dynamics home_repo_name: dynamics lib_docs_url: https://easyscience.github.io/dynamics-lib -lib_doi: 10.5281/zenodo.18163581 +lib_doi: 10.5281/zenodo.18877180 lib_package_name: easydynamics lib_python_max: '3.12' lib_python_min: '3.11' diff --git a/docs/docs/introduction/index.md b/docs/docs/introduction/index.md index 7b8e76a1..d749ae2a 100644 --- a/docs/docs/introduction/index.md +++ b/docs/docs/introduction/index.md @@ -45,7 +45,7 @@ Zenodo, each with a version-specific Digital Object Identifier (DOI). Citation details in various styles (e.g., APA, MLA) and formats (e.g., BibTeX, JSON) are available on the -[Zenodo archive page](https://doi.org/10.5281/zenodo.18163581). +[Zenodo archive page](https://doi.org/10.5281/zenodo.18877180). ## Contributing