Skip to content

Commit 4c79ed8

Browse files
committed
Copier update
1 parent df33892 commit 4c79ed8

File tree

12 files changed

+51
-14
lines changed

12 files changed

+51
-14
lines changed

.copier-answers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2-
_commit: 86a1e5c
2+
_commit: 75b9a8f
33
_src_path: gh:scipp/copier_template
44
description: Diffraction data reduction for the European Spallation Source
55
max_python: '3.12'

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- uses: pre-commit/[email protected]
2828
with:
2929
extra_args: --all-files
30-
- uses: pre-commit-ci/[email protected].2
30+
- uses: pre-commit-ci/[email protected].3
3131
if: always()
3232
with:
3333
msg: Apply automatic formatting

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
name: docs_html
7070
path: html/
7171

72-
- uses: JamesIves/[email protected].3
72+
- uses: JamesIves/[email protected].4
7373
if: ${{ inputs.publish }}
7474
with:
7575
branch: gh-pages

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ dist
44
html
55
.tox
66
*.egg-info
7+
uv.lock # we lock dependencies with pip-compile, not uv
78

89
*.sw?
910

1011
# Environments
1112
venv
13+
.venv
1214

1315
# Caches
1416
.clangd/
@@ -39,3 +41,4 @@ docs/generated/
3941
*.cif
4042
*.rcif
4143
*.ort
44+
*.zip

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.5.0
3+
rev: v4.6.0
44
hooks:
55
- id: check-added-large-files
66
- id: check-json
@@ -14,22 +14,22 @@ repos:
1414
args: [ --markdown-linebreak-ext=md ]
1515
exclude: '\.svg'
1616
- repo: https://github.com/kynan/nbstripout
17-
rev: 0.6.0
17+
rev: 0.7.1
1818
hooks:
1919
- id: nbstripout
2020
types: [ "jupyter" ]
2121
args: [ "--drop-empty-cells",
2222
"--extra-keys 'metadata.language_info.version cell.metadata.jp-MarkdownHeadingCollapsed cell.metadata.pycharm'" ]
2323
- repo: https://github.com/astral-sh/ruff-pre-commit
24-
rev: v0.4.3
24+
rev: v0.6.2
2525
hooks:
2626
- id: ruff
2727
args: [ --fix ]
2828
types_or: [ python, pyi, jupyter ]
2929
- id: ruff-format
3030
types_or: [ python, pyi ]
3131
- repo: https://github.com/codespell-project/codespell
32-
rev: v2.2.6
32+
rev: v2.3.0
3333
hooks:
3434
- id: codespell
3535
additional_dependencies:

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.10

conda/meta.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ source:
99

1010
{% set pyproject = load_file_data('pyproject.toml') %}
1111
{% set dependencies = pyproject.get('project', {}).get('dependencies', {}) %}
12+
{% set test_dependencies = pyproject.get('project', {}).get('optional-dependencies', {}).get('test', {}) %}
1213

1314

1415
requirements:
@@ -28,7 +29,13 @@ test:
2829
imports:
2930
- ess.diffraction
3031
requires:
31-
- pytest
32+
33+
{# Conda does not allow spaces between package name and version, so remove them #}
34+
{% for package in test_dependencies %}
35+
- {% if package == "graphviz" %}python-graphviz{% else %}{{ package|replace(" ", "") }}{% endif %}
36+
{% endfor %}
37+
38+
3239
source_files:
3340
- pyproject.toml
3441
- tests/

docs/conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# SPDX-License-Identifier: BSD-3-Clause
2+
# Copyright (c) 2024 Scipp contributors (https://github.com/scipp)
3+
14
import doctest
25
import os
36
import sys

pyproject.toml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ dependencies = [
4444

4545
dynamic = ["version"]
4646

47+
[project.optional-dependencies]
48+
test = [
49+
"pandas",
50+
"pooch",
51+
"pytest",
52+
]
53+
4754
[project.urls]
4855
"Bug Tracker" = "https://github.com/scipp/essdiffraction/issues"
4956
"Documentation" = "https://scipp.github.io/essdiffraction"
@@ -83,7 +90,7 @@ ignore = [
8390
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
8491
"COM812", "COM819", "D206", "D300", "E111", "E114", "E117", "ISC001", "ISC002", "Q000", "Q001", "Q002", "Q003", "W191",
8592
]
86-
fixable = ["I001", "B010"]
93+
fixable = ["B010", "I001", "PT001"]
8794
isort.known-first-party = ["ess.diffraction", "ess.dream", "ess.powder"]
8895
pydocstyle.convention = "numpy"
8996

@@ -115,3 +122,11 @@ enable_error_code = [
115122
"truthy-bool",
116123
]
117124
warn_unreachable = true
125+
126+
[tool.codespell]
127+
ignore-words-list = [
128+
# Codespell wants "socioeconomic" which seems to be the standard spelling.
129+
# But we use the word in our code of conduct which is the contributor covenant.
130+
# Let's not modify it if we don't have to.
131+
"socio-economic",
132+
]

requirements/basetest.in

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# Dependencies that are only used by tests.
22
# Do not make an environment from this file, use test.txt instead!
3+
# Add more dependencies in the ``test`` list
4+
# under ``[project.optional-dependencies]`` section, in ``pyproject.toml``
35

4-
numpy
5-
pandas
6-
pooch
7-
pytest
6+
# Anything above "--- END OF CUSTOM SECTION ---"
7+
# will not be touched by ``make_base.py``
8+
# --- END OF CUSTOM SECTION ---
9+
# The following was generated by 'tox -e deps', DO NOT EDIT MANUALLY!

0 commit comments

Comments
 (0)