Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
a52831f
Update save_as paths to include 'data/' directory and adjust test fun…
AndrewSazonov Apr 5, 2026
5fe46b2
Add crysfml
AndrewSazonov Apr 6, 2026
85c937d
Update notebooks
AndrewSazonov Apr 6, 2026
a91eee4
Clean up
AndrewSazonov Apr 6, 2026
5f01122
Add simple integration test for crysfml
AndrewSazonov Apr 7, 2026
ab5a3fe
Bump pycrysfml to 0.2.1
AndrewSazonov Apr 7, 2026
604b7e1
Add pytest marker to neutron_pd_cwl_lbco_crysfml test
AndrewSazonov Apr 7, 2026
325d8a9
Extend package test script by adding pycrysfml
AndrewSazonov Apr 7, 2026
887ff0b
Fix scipp integration test
AndrewSazonov Apr 7, 2026
03aec86
Move jupyterlab and pixi-kernel out from pyproject.toml
AndrewSazonov Apr 7, 2026
0e0aa7a
Remove unnecessary libcxx addition for osx-64 in test.yml
AndrewSazonov Apr 7, 2026
4a53870
Add custom PyPI index support for pycrysfml in test.yml
AndrewSazonov Apr 7, 2026
efdad6e
Update .gitignore to include data directory for tutorial runtime
AndrewSazonov Apr 7, 2026
6582406
Apply latest templates
AndrewSazonov Apr 7, 2026
ef0f286
Add temporary rule ignores for docstring and datetime checks in pypro…
AndrewSazonov Apr 7, 2026
b76fa95
Apply new templates
AndrewSazonov Apr 7, 2026
e1ac6c2
Update index hash for data integrity in utils.py
AndrewSazonov Apr 7, 2026
0cc18d7
Add reverse flag to fit_sequential for reverse-order processing
AndrewSazonov Apr 7, 2026
adc13e4
Update tutorials index
AndrewSazonov Apr 7, 2026
4fdb30e
Update tutorial
AndrewSazonov Apr 7, 2026
346dec7
Add initial structure and analysis configuration files
AndrewSazonov Apr 7, 2026
f476a65
Fix asymmetry and save/restore peak_profile_type in experiment CIF
AndrewSazonov Apr 8, 2026
4ebd9e1
Refactor switchable-type restore into _restore_switchable_types
AndrewSazonov Apr 8, 2026
a57be56
Update test example
AndrewSazonov Apr 8, 2026
91cc7cd
Update data-index.json known hash in utils.py
AndrewSazonov Apr 8, 2026
810c27b
Merge remote-tracking branch 'origin/develop' into asymmetry
AndrewSazonov Apr 8, 2026
c740cf6
Return numpy array from CrysfmlCalculator and adjust pattern length h…
AndrewSazonov Apr 8, 2026
66a360d
Add aliases and constraints for isotropic displacement parameters ref…
AndrewSazonov Apr 8, 2026
4a926d7
Add fit command to CLI
AndrewSazonov Apr 8, 2026
269588a
Update notebooks
AndrewSazonov Apr 8, 2026
1e89aa7
Add CLI documentation to User Guide
AndrewSazonov Apr 8, 2026
34f6b3a
Update documentation to move Command-Line Interface section
AndrewSazonov Apr 8, 2026
87169dc
Bump dependencies
AndrewSazonov Apr 8, 2026
b9cc46a
Merge remote-tracking branch 'origin/develop' into fit-cli
AndrewSazonov Apr 8, 2026
86584c0
Add back the lost doc file
AndrewSazonov Apr 8, 2026
31fff00
Re-copy templates
AndrewSazonov Apr 8, 2026
4756352
Update installation instructions and CI workflow for macOS support
AndrewSazonov Apr 8, 2026
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
22 changes: 14 additions & 8 deletions .github/workflows/pypi-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ jobs:
- name: Init pixi project
run: pixi init easydiffraction

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

- name: Add Python 3.14 from Conda
working-directory: easydiffraction
run: pixi add "python=3.14"
Expand All @@ -58,22 +61,25 @@ jobs:
pixi add gsl
pixi add --platform osx-arm64 libcxx

- name: Add easydiffraction from PyPI
working-directory: easydiffraction
run: pixi add --pypi "easydiffraction"

- name: Add dev dependencies from PyPI
- name: Add pycrysfml calculator from custom PyPI index
working-directory: easydiffraction
run: pixi add --pypi pytest pytest-xdist
run: |
echo '' >> pixi.toml
echo '[pypi-dependencies]' >> pixi.toml
echo 'pycrysfml = { version = ">=0.2.1", index = "https://easyscience.github.io/pypi/" }' >> pixi.toml

- name: Add Pixi task as a shortcut
- name: Add easydiffraction (with dev dependencies) from PyPI
working-directory: easydiffraction
run: pixi task add easydiffraction "python -m easydiffraction"
run: pixi add --pypi "easydiffraction[dev]"

- name: Run unit tests to verify the installation
working-directory: easydiffraction
run: pixi run python -m pytest ../tests/unit/ --color=yes -v

- name: Run functional tests to verify the installation
working-directory: easydiffraction
run: pixi run python -m pytest ../tests/functional/ --color=yes -v

- name: Run integration tests to verify the installation
working-directory: easydiffraction
run: pixi run python -m pytest ../tests/integration/ --color=yes -n auto
Expand Down
90 changes: 90 additions & 0 deletions docs/docs/cli/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
---
icon: material/console
---

# :material-console: Command-Line Interface

In addition to the Python API and Jupyter Notebooks, EasyDiffraction
provides a **command-line interface (CLI)**. This is useful for basic
operations without writing Python code.

## Running the CLI

The CLI is invoked as a Python module:

```bash
python -m easydiffraction [COMMAND] [OPTIONS]
```

If you use **Pixi** and have defined the `easydiffraction` task (see
[Installation & Setup](../installation-and-setup/index.md)), you can
use:

```bash
pixi run easydiffraction [COMMAND] [OPTIONS]
```

To see all available commands and options:

```bash
python -m easydiffraction --help
```

## Available Commands

### Show Version

Display the installed EasyDiffraction version:

```bash
python -m easydiffraction --version
```

### List Tutorials

List all available tutorial notebooks:

```bash
python -m easydiffraction list-tutorials
```

### Download Tutorials

Download a specific tutorial by ID:

```bash
python -m easydiffraction download-tutorial 1
```

Download all available tutorials:

```bash
python -m easydiffraction download-all-tutorials
```

Both commands accept `--destination` (`-d`) to specify the output
directory (default: `tutorials/`) and `--overwrite` (`-o`) to replace
existing files.

### Fit a Project

Load a saved project and run structural refinement:

```bash
python -m easydiffraction fit PROJECT_DIR
```

`PROJECT_DIR` is the path to a project directory previously created by
`project.save_as()`. It must contain a `project.cif` file along with the
`structures/`, `experiments/`, and `analysis/` subdirectories.

After fitting, the command displays the fit results and a project
summary. By default, updated parameter values are **saved back** to the
project directory.

Use the `--dry` flag to run the fit **without overwriting** the project
files:

```bash
python -m easydiffraction fit PROJECT_DIR --dry
```
7 changes: 5 additions & 2 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
![](assets/images/logo_dark.svg#gh-dark-mode-only)![](assets/images/logo_light.svg#gh-light-mode-only)

# Diffraction data analysis library
# Diffraction data analysis

Here is a brief overview of the main documentation sections:

- [:material-information-slab-circle: Introduction](introduction/index.md)
– Provides an overview of EasyDiffraction, including its purpose,
– Provides a description of EasyDiffraction, including its purpose,
licensing, latest release details, and contact information.
- [:material-cog-box: Installation & Setup](installation-and-setup/index.md)
– Guides users through system requirements, environment configuration,
Expand All @@ -19,3 +19,6 @@ Here is a brief overview of the main documentation sections:
- [:material-code-braces-box: API Reference](api-reference/index.md) –
An auto-generated reference detailing the available functions and
modules in EasyDiffraction.
- [:material-console: Command-Line Interface](cli/index.md) – Describes
how to use EasyDiffraction from the terminal for batch fitting and
other tasks.
Loading
Loading