Skip to content
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
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# WARNING: Do not edit this file manually.
# Any changes will be overwritten by Copier.
_commit: v0.10.1-40-g29e2ccf
_commit: v0.10.1-41-g508666e
_src_path: gh:easyscience/templates
app_docs_url: https://easyscience.github.io/diffraction-app
app_doi: 10.5281/zenodo.18163581
Expand Down
22 changes: 19 additions & 3 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
- Type-annotate all public function signatures.
- Docstrings on all public classes and methods (numpy style). These must
include sections Parameters, Returns and Raises, where applicable.
- Docstring summary must be a single line no longer than 72 characters
(the `max-doc-length` setting in `pyproject.toml`). If the summary
does not fit, shorten the wording rather than wrapping to a second
line.
- Prefer flat over nested, explicit over clever.
- Write straightforward code; do not add defensive checks for unlikely
edge cases.
Expand Down Expand Up @@ -173,16 +177,28 @@

## Workflow

- Use a two-phase workflow for all non-trivial changes:
- **Phase 1 — Implementation:** implement the change (source code,
docs, architecture updates). Do not create new tests or run existing
tests. Present the implementation for review and iterate until
approved.
- **Phase 2 — Verification:** once the implementation is approved, add
or update tests, then run linting (`pixi run fix`, `pixi run check`)
and all test suites (`pixi run unit-tests`,
`pixi run integration-tests`, `pixi run script-tests`).
- All open issues, design questions, and planned improvements are
tracked in `docs/architecture/issues_open.md`, ordered by priority.
When an issue is fully implemented, move it from that file to
`docs/architecture/issues_closed.md`. When the resolution affects the
architecture, update the relevant sections of
`docs/architecture/architecture.md`.
- After changes, run linting and formatting fixes with `pixi run fix`.
Do not check what was auto-fixed, just accept the fixes and move on.
Then, run linting and formatting checks with `pixi run check` and
address any remaining issues until the code is clean.
This also regenerates `docs/architecture/package-structure-full.md`
and `docs/architecture/package-structure-short.md` automatically — do
not edit those files by hand. Do not check what was auto-fixed, just
accept the fixes and move on. Then, run linting and formatting checks
with `pixi run check` and address any remaining issues until the code
is clean.
- After changes, run unit tests with `pixi run unit-tests`.
- After changes, run integration tests with
`pixi run integration-tests`.
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pypi-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
run: pixi init easydiffraction

- name: Set the minimum system requirements
working-directory: easydiffraction
run: pixi project system-requirements add macos 14.0

- name: Add Python 3.14 from Conda
Expand Down
38 changes: 36 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,27 @@ jobs:
echo
echo "🔹🔸🔹🔸🔹 Python: $py_ver 🔹🔸🔹🔸🔹"

env="py-$(echo $py_ver | tr -d .)-env" # Converts 3.11 -> py-311-env
env="py-$(echo $py_ver | tr -d .)-env" # Converts 3.XX -> py-3XX-env

echo "Running tests in environment: $env"
pixi run --environment $env unit-tests
done

- name: Run functional tests
shell: bash
run: |
set -euo pipefail

for py_ver in $PY_VERSIONS; do
echo
echo "🔹🔸🔹🔸🔹 Python: $py_ver 🔹🔸🔹🔸🔹"

env="py-$(echo $py_ver | tr -d .)-env" # Converts 3.XX -> py-3XX-env

echo "Running tests in environment: $env"
pixi run --environment $env functional-tests
done

- name: Run integration tests ${{ needs.env-prepare.outputs.pytest-marks }}
shell: bash
run: |
Expand All @@ -114,7 +129,7 @@ jobs:
echo
echo "🔹🔸🔹🔸🔹 Python: $py_ver 🔹🔸🔹🔸🔹"

env="py-$(echo $py_ver | tr -d .)-env" # Converts 3.11 -> py-311-env
env="py-$(echo $py_ver | tr -d .)-env" # Converts 3.XX -> py-3XX-env

echo "Running tests in environment: $env"
pixi run --environment $env integration-tests ${{ needs.env-prepare.outputs.pytest-marks }}
Expand Down Expand Up @@ -263,6 +278,25 @@ jobs:
cd ..
done

- name: Run functional tests
shell: bash
run: |
set -euo pipefail

for py_ver in $PY_VERSIONS; do
echo
echo "🔹🔸🔹🔸🔹 Python: $py_ver 🔹🔸🔹🔸🔹"

echo "Entering pixi project directory easydiffraction_py$py_ver"
cd easydiffraction_py$py_ver

echo "Running tests"
pixi run python -m pytest ../tests/functional/ --color=yes -v

echo "Exiting pixi project directory"
cd ..
done

- name: Run integration tests ${{ needs.env-prepare.outputs.pytest-marks }}
shell: bash
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,4 @@ CMakeLists.txt.user*
# Used to fetch tutorials data during their runtime. Need to have '/' at
# the beginning to avoid ignoring 'data' module in the src/.
/data/
/tmp/
Loading
Loading