Skip to content

Commit 2f06002

Browse files
committed
Merge branch 'develop' into pdf
2 parents fd549a0 + 9a08ceb commit 2f06002

File tree

69 files changed

+55058
-1133
lines changed

Some content is hidden

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

69 files changed

+55058
-1133
lines changed

.github/workflows/ci-testing.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ jobs:
5151
shell: bash
5252
run: python -m pip install -r requirements.txt
5353

54+
- name: Run Python unit tests
55+
shell: bash
56+
run: PYTHONPATH=$(pwd)/src python -m pytest tests/unit_tests/ --color=yes -n auto
57+
5458
- name: Run Python functional tests
5559
shell: bash
5660
run: PYTHONPATH=$(pwd)/src python -m pytest tests/functional_tests/ --color=yes -n auto

examples/single-fit_basic-usage.py

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@
6464

6565
# Unit cell parameters
6666
project.sample_models['lbco'].cell.length_a = 3.88
67-
#project.sample_models['lbco'].cell.length_b = 3.8909 # Symmetry constraints are temporarily disabled
68-
#project.sample_models['lbco'].cell.length_c = 3.8909 # Symmetry constraints are temporarily disabled
6967

7068
# Atom sites
7169
project.sample_models['lbco'].atom_sites.add(label='La',
@@ -277,17 +275,16 @@
277275

278276
# Set aliases for parameters
279277
project.analysis.aliases.add(
280-
alias='biso_La',
281-
param=project.sample_models['lbco'].atom_sites['La'].b_iso
278+
label='biso_La',
279+
param_uid=project.sample_models['lbco'].atom_sites['La'].b_iso.uid
282280
)
283281
project.analysis.aliases.add(
284-
alias='biso_Ba',
285-
param=project.sample_models['lbco'].atom_sites['Ba'].b_iso
282+
label='biso_Ba',
283+
param_uid=project.sample_models['lbco'].atom_sites['Ba'].b_iso.uid
286284
)
287285

288286
# Set constraints
289287
project.analysis.constraints.add(
290-
id="1",
291288
lhs_alias='biso_Ba',
292289
rhs_expr='biso_La'
293290
)
@@ -310,18 +307,17 @@
310307

311308
# Set more aliases for parameters
312309
project.analysis.aliases.add(
313-
alias='occ_La',
314-
param=project.sample_models['lbco'].atom_sites['La'].occupancy
310+
label='occ_La',
311+
param_uid=project.sample_models['lbco'].atom_sites['La'].occupancy.uid
315312
)
316313
project.analysis.aliases.add(
317-
alias='occ_Ba',
318-
param=project.sample_models['lbco'].atom_sites['Ba'].occupancy
314+
label='occ_Ba',
315+
param_uid=project.sample_models['lbco'].atom_sites['Ba'].occupancy.uid
319316
)
320317

321318
# Set more constraints
322319
project.analysis.show_constraints()
323320
project.analysis.constraints.add(
324-
id="2",
325321
lhs_alias='occ_Ba',
326322
rhs_expr='1 - occ_La'
327323
)

src/easydiffraction/__init__.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@
44
ProjectInfo
55
)
66

7-
# Sample model management
8-
from easydiffraction.sample_models.sample_models import (
9-
SampleModel,
10-
SampleModels
11-
)
7+
# Sample model
8+
from easydiffraction.sample_models.sample_model import SampleModel
9+
from easydiffraction.sample_models.sample_models import SampleModels
1210

13-
# Experiment creation and collection management
11+
# Experiments
1412
from easydiffraction.experiments.experiment import Experiment
1513
from easydiffraction.experiments.experiments import Experiments
1614

0 commit comments

Comments
 (0)