Skip to content

Commit 2669c3f

Browse files
Merge pull request #153 from easyscience/develop
Release: merge develop into master
2 parents 13c3294 + be3dfdd commit 2669c3f

259 files changed

Lines changed: 38102 additions & 91963 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

โ€Ž.copier-answers.ymlโ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# WARNING: Do not edit this file manually.
22
# Any changes will be overwritten by Copier.
3-
_commit: v0.10.1-40-g29e2ccf
3+
_commit: v0.10.1-41-g508666e
44
_src_path: gh:easyscience/templates
55
app_docs_url: https://easyscience.github.io/diffraction-app
66
app_doi: 10.5281/zenodo.18163581

โ€Ž.github/copilot-instructions.mdโ€Ž

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@
4444
- Type-annotate all public function signatures.
4545
- Docstrings on all public classes and methods (numpy style). These must
4646
include sections Parameters, Returns and Raises, where applicable.
47+
- Docstring summary must be a single line no longer than 72 characters
48+
(the `max-doc-length` setting in `pyproject.toml`). If the summary
49+
does not fit, shorten the wording rather than wrapping to a second
50+
line.
4751
- Prefer flat over nested, explicit over clever.
4852
- Write straightforward code; do not add defensive checks for unlikely
4953
edge cases.
@@ -173,16 +177,28 @@
173177

174178
## Workflow
175179

180+
- Use a two-phase workflow for all non-trivial changes:
181+
- **Phase 1 โ€” Implementation:** implement the change (source code,
182+
docs, architecture updates). Do not create new tests or run existing
183+
tests. Present the implementation for review and iterate until
184+
approved.
185+
- **Phase 2 โ€” Verification:** once the implementation is approved, add
186+
or update tests, then run linting (`pixi run fix`, `pixi run check`)
187+
and all test suites (`pixi run unit-tests`,
188+
`pixi run integration-tests`, `pixi run script-tests`).
176189
- All open issues, design questions, and planned improvements are
177190
tracked in `docs/architecture/issues_open.md`, ordered by priority.
178191
When an issue is fully implemented, move it from that file to
179192
`docs/architecture/issues_closed.md`. When the resolution affects the
180193
architecture, update the relevant sections of
181194
`docs/architecture/architecture.md`.
182195
- After changes, run linting and formatting fixes with `pixi run fix`.
183-
Do not check what was auto-fixed, just accept the fixes and move on.
184-
Then, run linting and formatting checks with `pixi run check` and
185-
address any remaining issues until the code is clean.
196+
This also regenerates `docs/architecture/package-structure-full.md`
197+
and `docs/architecture/package-structure-short.md` automatically โ€” do
198+
not edit those files by hand. Do not check what was auto-fixed, just
199+
accept the fixes and move on. Then, run linting and formatting checks
200+
with `pixi run check` and address any remaining issues until the code
201+
is clean.
186202
- After changes, run unit tests with `pixi run unit-tests`.
187203
- After changes, run integration tests with
188204
`pixi run integration-tests`.

โ€Ž.github/workflows/pypi-test.ymlโ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ jobs:
4949
run: pixi init easydiffraction
5050

5151
- name: Set the minimum system requirements
52+
working-directory: easydiffraction
5253
run: pixi project system-requirements add macos 14.0
5354

5455
- name: Add Python 3.14 from Conda

โ€Ž.github/workflows/test.ymlโ€Ž

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,27 @@ jobs:
9999
echo
100100
echo "๐Ÿ”น๐Ÿ”ธ๐Ÿ”น๐Ÿ”ธ๐Ÿ”น Python: $py_ver ๐Ÿ”น๐Ÿ”ธ๐Ÿ”น๐Ÿ”ธ๐Ÿ”น"
101101
102-
env="py-$(echo $py_ver | tr -d .)-env" # Converts 3.11 -> py-311-env
102+
env="py-$(echo $py_ver | tr -d .)-env" # Converts 3.XX -> py-3XX-env
103103
104104
echo "Running tests in environment: $env"
105105
pixi run --environment $env unit-tests
106106
done
107107
108+
- name: Run functional tests
109+
shell: bash
110+
run: |
111+
set -euo pipefail
112+
113+
for py_ver in $PY_VERSIONS; do
114+
echo
115+
echo "๐Ÿ”น๐Ÿ”ธ๐Ÿ”น๐Ÿ”ธ๐Ÿ”น Python: $py_ver ๐Ÿ”น๐Ÿ”ธ๐Ÿ”น๐Ÿ”ธ๐Ÿ”น"
116+
117+
env="py-$(echo $py_ver | tr -d .)-env" # Converts 3.XX -> py-3XX-env
118+
119+
echo "Running tests in environment: $env"
120+
pixi run --environment $env functional-tests
121+
done
122+
108123
- name: Run integration tests ${{ needs.env-prepare.outputs.pytest-marks }}
109124
shell: bash
110125
run: |
@@ -114,7 +129,7 @@ jobs:
114129
echo
115130
echo "๐Ÿ”น๐Ÿ”ธ๐Ÿ”น๐Ÿ”ธ๐Ÿ”น Python: $py_ver ๐Ÿ”น๐Ÿ”ธ๐Ÿ”น๐Ÿ”ธ๐Ÿ”น"
116131
117-
env="py-$(echo $py_ver | tr -d .)-env" # Converts 3.11 -> py-311-env
132+
env="py-$(echo $py_ver | tr -d .)-env" # Converts 3.XX -> py-3XX-env
118133
119134
echo "Running tests in environment: $env"
120135
pixi run --environment $env integration-tests ${{ needs.env-prepare.outputs.pytest-marks }}
@@ -263,6 +278,25 @@ jobs:
263278
cd ..
264279
done
265280
281+
- name: Run functional tests
282+
shell: bash
283+
run: |
284+
set -euo pipefail
285+
286+
for py_ver in $PY_VERSIONS; do
287+
echo
288+
echo "๐Ÿ”น๐Ÿ”ธ๐Ÿ”น๐Ÿ”ธ๐Ÿ”น Python: $py_ver ๐Ÿ”น๐Ÿ”ธ๐Ÿ”น๐Ÿ”ธ๐Ÿ”น"
289+
290+
echo "Entering pixi project directory easydiffraction_py$py_ver"
291+
cd easydiffraction_py$py_ver
292+
293+
echo "Running tests"
294+
pixi run python -m pytest ../tests/functional/ --color=yes -v
295+
296+
echo "Exiting pixi project directory"
297+
cd ..
298+
done
299+
266300
- name: Run integration tests ${{ needs.env-prepare.outputs.pytest-marks }}
267301
shell: bash
268302
run: |

โ€Ž.gitignoreโ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,4 @@ CMakeLists.txt.user*
4949
# Used to fetch tutorials data during their runtime. Need to have '/' at
5050
# the beginning to avoid ignoring 'data' module in the src/.
5151
/data/
52+
/tmp/

0 commit comments

Comments
ย (0)