easydiffraction 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- easydiffraction-0.1.2/.github/dependabot.yml +10 -0
- easydiffraction-0.1.2/.github/release-drafter.yml +32 -0
- easydiffraction-0.1.2/.github/workflows/delete-old-runs.yml +72 -0
- easydiffraction-0.1.2/.github/workflows/ossar-analysis.yml +39 -0
- easydiffraction-0.1.2/.github/workflows/pypi-publish.yml +40 -0
- easydiffraction-0.1.2/.github/workflows/release-drafter.yml +18 -0
- easydiffraction-0.1.2/.github/workflows/test-code.yaml +113 -0
- easydiffraction-0.1.2/.github/workflows/test-ipynb.yml +79 -0
- easydiffraction-0.1.2/.github/workflows/test-package.yaml +110 -0
- easydiffraction-0.1.2/.github/workflows/verify-pr-labels.yml +23 -0
- easydiffraction-0.1.2/.gitignore +43 -0
- easydiffraction-0.1.2/CONTRIBUTING.md +88 -0
- easydiffraction-0.1.2/DEVELOPMENT.md +63 -0
- easydiffraction-0.1.2/LICENSE +29 -0
- easydiffraction-0.1.2/PKG-INFO +95 -0
- easydiffraction-0.1.2/README.md +24 -0
- easydiffraction-0.1.2/easydiffraction/Interfaces/CFML.py +224 -0
- easydiffraction-0.1.2/easydiffraction/Interfaces/GSASII.py +185 -0
- easydiffraction-0.1.2/easydiffraction/Interfaces/__init__.py +27 -0
- easydiffraction-0.1.2/easydiffraction/Interfaces/cryspy.py +422 -0
- easydiffraction-0.1.2/easydiffraction/Interfaces/cryspyV2.py +826 -0
- easydiffraction-0.1.2/easydiffraction/Interfaces/interfaceTemplate.py +161 -0
- easydiffraction-0.1.2/easydiffraction/Interfaces/pdffit2.py +196 -0
- easydiffraction-0.1.2/easydiffraction/Interfaces/types.py +82 -0
- easydiffraction-0.1.2/easydiffraction/Job.py +1021 -0
- easydiffraction-0.1.2/easydiffraction/Jobs.py +484 -0
- easydiffraction-0.1.2/easydiffraction/Profiles/Analysis.py +118 -0
- easydiffraction-0.1.2/easydiffraction/Profiles/Container.py +78 -0
- easydiffraction-0.1.2/easydiffraction/Profiles/Experiment.py +646 -0
- easydiffraction-0.1.2/easydiffraction/Profiles/JobType.py +259 -0
- easydiffraction-0.1.2/easydiffraction/Profiles/P1D.py +578 -0
- easydiffraction-0.1.2/easydiffraction/Profiles/Sample.py +34 -0
- easydiffraction-0.1.2/easydiffraction/Profiles/__init__.py +3 -0
- easydiffraction-0.1.2/easydiffraction/Profiles/common.py +230 -0
- easydiffraction-0.1.2/easydiffraction/Runner.py +53 -0
- easydiffraction-0.1.2/easydiffraction/__init__.py +14 -0
- easydiffraction-0.1.2/easydiffraction/calculators/CFML.py +273 -0
- easydiffraction-0.1.2/easydiffraction/calculators/GSASII.py +172 -0
- easydiffraction-0.1.2/easydiffraction/calculators/__init__.py +3 -0
- easydiffraction-0.1.2/easydiffraction/calculators/cryspy.py +1008 -0
- easydiffraction-0.1.2/easydiffraction/calculators/pdffit2.py +93 -0
- easydiffraction-0.1.2/easydiffraction/components/__init__.py +3 -0
- easydiffraction-0.1.2/easydiffraction/components/phase.py +72 -0
- easydiffraction-0.1.2/easydiffraction/components/polarization.py +56 -0
- easydiffraction-0.1.2/easydiffraction/components/site.py +187 -0
- easydiffraction-0.1.2/easydiffraction/elements/Backgrounds/Background.py +173 -0
- easydiffraction-0.1.2/easydiffraction/elements/Backgrounds/Factorial.py +207 -0
- easydiffraction-0.1.2/easydiffraction/elements/Backgrounds/Point.py +206 -0
- easydiffraction-0.1.2/easydiffraction/elements/Backgrounds/__init__.py +3 -0
- easydiffraction-0.1.2/easydiffraction/elements/Experiments/Experiment.py +166 -0
- easydiffraction-0.1.2/easydiffraction/elements/Experiments/Pattern.py +59 -0
- easydiffraction-0.1.2/easydiffraction/elements/Experiments/__init__.py +3 -0
- easydiffraction-0.1.2/easydiffraction/elements/__init__.py +3 -0
- easydiffraction-0.1.2/easydiffraction/interface.py +54 -0
- easydiffraction-0.1.2/easydiffraction/io/__init__.py +3 -0
- easydiffraction-0.1.2/easydiffraction/io/cif.py +1392 -0
- easydiffraction-0.1.2/easydiffraction/io/cif_reader.py +244 -0
- easydiffraction-0.1.2/easydiffraction/io/cryspy_parser.py +798 -0
- easydiffraction-0.1.2/easydiffraction/io/helpers.py +30 -0
- easydiffraction-0.1.2/easydiffraction/main.py +13 -0
- easydiffraction-0.1.2/easydiffraction/sample.py +216 -0
- easydiffraction-0.1.2/examples/Change_minimizer.ipynb +745 -0
- easydiffraction-0.1.2/examples/Fitting_PD-NEUT-CW_LBCO-HRPT.ipynb +828 -0
- easydiffraction-0.1.2/examples/Fitting_PD-NEUT-TOF_NCAF-WISH.ipynb +742 -0
- easydiffraction-0.1.2/examples/Fitting_PD-NEUT-TOF_Si-SEPD.ipynb +763 -0
- easydiffraction-0.1.2/examples/data/hrpt.xye +3099 -0
- easydiffraction-0.1.2/examples/data/lbco.cif +25 -0
- easydiffraction-0.1.2/examples/data/ncaf.cif +27 -0
- easydiffraction-0.1.2/examples/data/sepd.xye +5600 -0
- easydiffraction-0.1.2/examples/data/si.cif +22 -0
- easydiffraction-0.1.2/examples/data/wish.xye +3738 -0
- easydiffraction-0.1.2/examples_old/3T2@LLB.xye +2401 -0
- easydiffraction-0.1.2/examples_old/D1A@ILL.xye +2202 -0
- easydiffraction-0.1.2/examples_old/Fitting.ipynb +655 -0
- easydiffraction-0.1.2/examples_old/Fitting_PD-CW_La0.5Ba0.5CoO3-HRPT@PSI/fitting.ipynb +103053 -0
- easydiffraction-0.1.2/examples_old/Fitting_PD-CW_La0.5Ba0.5CoO3-HRPT@PSI/fitting.py +136 -0
- easydiffraction-0.1.2/examples_old/Fitting_PD-CW_La0.5Ba0.5CoO3-HRPT@PSI/hrpt.xye +3099 -0
- easydiffraction-0.1.2/examples_old/Fitting_PD-TOF_Si-SEPD@Argonne/fitting copy.py +117 -0
- easydiffraction-0.1.2/examples_old/Fitting_PD-TOF_Si-SEPD@Argonne/fitting.ipynb +251751 -0
- easydiffraction-0.1.2/examples_old/Fitting_PD-TOF_Si-SEPD@Argonne/fitting.py +117 -0
- easydiffraction-0.1.2/examples_old/Fitting_PD-TOF_Si-SEPD@Argonne/sepd.xye +5600 -0
- easydiffraction-0.1.2/examples_old/Fitting_PD-TOF_Si-SEPD@Argonne/si.cif +22 -0
- easydiffraction-0.1.2/examples_old/Fitting_TOF.ipynb +638 -0
- easydiffraction-0.1.2/examples_old/Fitting_TOF_xye.ipynb +624 -0
- easydiffraction-0.1.2/examples_old/Fitting_multiphase.ipynb +512 -0
- easydiffraction-0.1.2/examples_old/PDF/Calculate_PDF_Profile_Ni.ipynb +429 -0
- easydiffraction-0.1.2/examples_old/PDF/Fitting_PDF_Profile_Ni.ipynb +384 -0
- easydiffraction-0.1.2/examples_old/PDF/Fitting_PDF_Profile_Si.ipynb +1948 -0
- easydiffraction-0.1.2/examples_old/PDF/data/4507226.cif +265 -0
- easydiffraction-0.1.2/examples_old/PDF/data/Ni-xray.gr +2134 -0
- easydiffraction-0.1.2/examples_old/PDF/data/Ni.cif +21 -0
- easydiffraction-0.1.2/examples_old/PDF/data/Si_calibration_cryostat_100A.fgr +9863 -0
- easydiffraction-0.1.2/examples_old/PDF/data/Si_calibration_cryostat_20A.fgr +1864 -0
- easydiffraction-0.1.2/examples_old/PDF/data/Si_calibration_cryostat_20A_01Rmin.fgr +2004 -0
- easydiffraction-0.1.2/examples_old/PDF/data/Si_calibration_cryostat_50A.fgr +4863 -0
- easydiffraction-0.1.2/examples_old/PDF/data/Si_calibration_cryostat_50A_01Rmin.fgr +5003 -0
- easydiffraction-0.1.2/examples_old/PDF2/Calculate_PDF_Profile.ipynb +430 -0
- easydiffraction-0.1.2/examples_old/PDF2/Fitting_PDF_Profile.ipynb +384 -0
- easydiffraction-0.1.2/examples_old/PDF2/Ni-xray.gr +2134 -0
- easydiffraction-0.1.2/examples_old/PDF2/Ni.cif +21 -0
- easydiffraction-0.1.2/examples_old/PDF2/Ni_fitting.py +92 -0
- easydiffraction-0.1.2/examples_old/PDF2/Ni_profile.py +72 -0
- easydiffraction-0.1.2/examples_old/PbSO4.cif +25 -0
- easydiffraction-0.1.2/examples_old/PolNPD5T.cif +356 -0
- easydiffraction-0.1.2/examples_old/Polarized.ipynb +1016 -0
- easydiffraction-0.1.2/examples_old/Simulation.ipynb +523 -0
- easydiffraction-0.1.2/examples_old/TestingAPI/CrysPy/rhochi_unpolarized_tof_powder_Si/calc_chisq.py +16 -0
- easydiffraction-0.1.2/examples_old/TestingAPI/CrysPy/rhochi_unpolarized_tof_powder_Si/cryspy_PbSO4-D1A@ILL.rcif +2972 -0
- easydiffraction-0.1.2/examples_old/TestingAPI/CrysPy/rhochi_unpolarized_tof_powder_Si/cryspy_unpolarized_tof_powder_Si.rcif +3259 -0
- easydiffraction-0.1.2/examples_old/TestingAPI/CrysPy/rhochi_unpolarized_tof_powder_Si/refinement.py +11 -0
- easydiffraction-0.1.2/examples_old/TestingAPI/CrysPy/rhochi_unpolarized_tof_powder_Si/rhochi_unpolarized_tof_powder_CeCuAl.rcif +8953 -0
- easydiffraction-0.1.2/examples_old/TestingAPI/EDB/experiments/d1a.cif +2950 -0
- easydiffraction-0.1.2/examples_old/TestingAPI/EDB/models/pbso4.cif +26 -0
- easydiffraction-0.1.2/examples_old/TestingAPI/EDB/models/pbso4_dark.png +0 -0
- easydiffraction-0.1.2/examples_old/TestingAPI/EDB/project.cif +11 -0
- easydiffraction-0.1.2/examples_old/TestingAPI/EDB/summary/report.cif +6152 -0
- easydiffraction-0.1.2/examples_old/TestingAPI/EDL/D1A@ILL.xye +2910 -0
- easydiffraction-0.1.2/examples_old/TestingAPI/EDL/PbSO4.cif +25 -0
- easydiffraction-0.1.2/examples_old/TestingAPI/EDL/TestingAPI.py +110 -0
- easydiffraction-0.1.2/examples_old/d1a.cif +2950 -0
- easydiffraction-0.1.2/examples_old/diamond_exp.xye +5480 -0
- easydiffraction-0.1.2/examples_old/diamond_phase.cif +232 -0
- easydiffraction-0.1.2/examples_old/experiment_polarized.xye +388 -0
- easydiffraction-0.1.2/examples_old/multiphase.cif +53 -0
- easydiffraction-0.1.2/examples_old/ncaf.cif +27 -0
- easydiffraction-0.1.2/examples_old/structure_polarized.cif +42 -0
- easydiffraction-0.1.2/examples_old/wish.cif +3815 -0
- easydiffraction-0.1.2/pyproject.toml +111 -0
- easydiffraction-0.1.2/tests/__init__.py +0 -0
- easydiffraction-0.1.2/tests/integration_tests/CFML_Cryspy.png +0 -0
- easydiffraction-0.1.2/tests/integration_tests/FittingData.ipynb +408 -0
- easydiffraction-0.1.2/tests/integration_tests/FittingData_CFML-xarrays.ipynb +409 -0
- easydiffraction-0.1.2/tests/integration_tests/FittingData_CFML.ipynb +449 -0
- easydiffraction-0.1.2/tests/integration_tests/PbSO4.cif +24 -0
- easydiffraction-0.1.2/tests/integration_tests/PbSO4_neutrons_short.xye +2202 -0
- easydiffraction-0.1.2/tests/integration_tests/PbSO4_xrays_short.xye +4403 -0
- easydiffraction-0.1.2/tests/integration_tests/SrTiO3.cif +68 -0
- easydiffraction-0.1.2/tests/integration_tests/WorkedExample2.ipynb +2163 -0
- easydiffraction-0.1.2/tests/integration_tests/fit_script.py +65 -0
- easydiffraction-0.1.2/tests/integration_tests/test1.py +64 -0
- easydiffraction-0.1.2/tests/integration_tests/test3.py +38 -0
- easydiffraction-0.1.2/tests/integration_tests/workedExample1.ipynb +4345 -0
- easydiffraction-0.1.2/tests/integration_tests/xarray_test.ipynb +1001 -0
- easydiffraction-0.1.2/tests/resources/PbSO4.cif +25 -0
- easydiffraction-0.1.2/tests/resources/PolNPD5T.cif +356 -0
- easydiffraction-0.1.2/tests/resources/d1a.cif +2950 -0
- easydiffraction-0.1.2/tests/unit_tests/Calculators/__init__.py +2 -0
- easydiffraction-0.1.2/tests/unit_tests/Elements/__init__.py +2 -0
- easydiffraction-0.1.2/tests/unit_tests/Interfaces/__init__.py +2 -0
- easydiffraction-0.1.2/tests/unit_tests/Profiles/__init__.py +2 -0
- easydiffraction-0.1.2/tests/unit_tests/Profiles/test_Experiment.py +76 -0
- easydiffraction-0.1.2/tests/unit_tests/Profiles/test_JobType.py +99 -0
- easydiffraction-0.1.2/tests/unit_tests/__init__.py +0 -0
- easydiffraction-0.1.2/tests/unit_tests/test_Job.py +164 -0
- easydiffraction-0.1.2/tests/unit_tests/test_Jobs.py +17 -0
- easydiffraction-0.1.2/tests/unit_tests/test_Runner.py +19 -0
- easydiffraction-0.1.2/tests/unit_tests/test_interface.py +9 -0
- easydiffraction-0.1.2/tests/unit_tests/test_sample.py +51 -0
- easydiffraction-0.1.2/tools/Scripts/generate_html.py +29 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# https://github.com/marketplace/actions/release-drafter
|
|
2
|
+
name-template: v$NEXT_PATCH_VERSION 🌈
|
|
3
|
+
tag-template: v$NEXT_PATCH_VERSION
|
|
4
|
+
categories:
|
|
5
|
+
- title: 🚀 Features
|
|
6
|
+
labels:
|
|
7
|
+
- feature
|
|
8
|
+
- enhancement
|
|
9
|
+
- title: 🐛 Bug Fixes
|
|
10
|
+
labels:
|
|
11
|
+
- fix
|
|
12
|
+
- bugfix
|
|
13
|
+
- bug
|
|
14
|
+
- title: 🧰 Maintenance
|
|
15
|
+
labels:
|
|
16
|
+
- chore
|
|
17
|
+
- documentation
|
|
18
|
+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
|
|
19
|
+
version-resolver:
|
|
20
|
+
major:
|
|
21
|
+
labels:
|
|
22
|
+
- major
|
|
23
|
+
minor:
|
|
24
|
+
labels:
|
|
25
|
+
- minor
|
|
26
|
+
patch:
|
|
27
|
+
labels:
|
|
28
|
+
- patch
|
|
29
|
+
default: patch
|
|
30
|
+
template: |
|
|
31
|
+
## Changes
|
|
32
|
+
$CHANGES
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# This workflow will delete old workflow runs based on the input parameters.
|
|
2
|
+
# https://github.com/Mattraks/delete-workflow-runs
|
|
3
|
+
|
|
4
|
+
name: Delete old workflow runs
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
# Run monthly, at 00:00 on the 1st day of month.
|
|
8
|
+
schedule:
|
|
9
|
+
- cron: '0 0 1 * *'
|
|
10
|
+
|
|
11
|
+
# Allows you to run this workflow manually from the Actions tab
|
|
12
|
+
workflow_dispatch:
|
|
13
|
+
|
|
14
|
+
inputs:
|
|
15
|
+
days:
|
|
16
|
+
description: 'Number of days.'
|
|
17
|
+
required: true
|
|
18
|
+
default: 30
|
|
19
|
+
minimum_runs:
|
|
20
|
+
description: 'The minimum runs to keep for each workflow.'
|
|
21
|
+
required: true
|
|
22
|
+
default: 6
|
|
23
|
+
delete_workflow_pattern:
|
|
24
|
+
description: 'The name or filename of the workflow. if not set then it will target all workflows.'
|
|
25
|
+
required: false
|
|
26
|
+
delete_workflow_by_state_pattern:
|
|
27
|
+
description: 'Remove workflow by state: active, deleted, disabled_fork, disabled_inactivity, disabled_manually'
|
|
28
|
+
required: true
|
|
29
|
+
default: "All"
|
|
30
|
+
type: choice
|
|
31
|
+
options:
|
|
32
|
+
- "All"
|
|
33
|
+
- active
|
|
34
|
+
- deleted
|
|
35
|
+
- disabled_inactivity
|
|
36
|
+
- disabled_manually
|
|
37
|
+
delete_run_by_conclusion_pattern:
|
|
38
|
+
description: 'Remove workflow by conclusion: action_required, cancelled, failure, skipped, success'
|
|
39
|
+
required: true
|
|
40
|
+
default: "All"
|
|
41
|
+
type: choice
|
|
42
|
+
options:
|
|
43
|
+
- "All"
|
|
44
|
+
- action_required
|
|
45
|
+
- cancelled
|
|
46
|
+
- failure
|
|
47
|
+
- skipped
|
|
48
|
+
- success
|
|
49
|
+
dry_run:
|
|
50
|
+
description: 'Only log actions, do not perform any delete operations.'
|
|
51
|
+
required: false
|
|
52
|
+
|
|
53
|
+
jobs:
|
|
54
|
+
del-runs:
|
|
55
|
+
|
|
56
|
+
runs-on: ubuntu-latest
|
|
57
|
+
|
|
58
|
+
permissions:
|
|
59
|
+
actions: write
|
|
60
|
+
|
|
61
|
+
steps:
|
|
62
|
+
- name: Delete workflow runs
|
|
63
|
+
uses: Mattraks/delete-workflow-runs@v2
|
|
64
|
+
with:
|
|
65
|
+
token: ${{ github.token }}
|
|
66
|
+
repository: ${{ github.repository }}
|
|
67
|
+
retain_days: ${{ github.event.inputs.days }}
|
|
68
|
+
keep_minimum_runs: ${{ github.event.inputs.minimum_runs }}
|
|
69
|
+
delete_workflow_pattern: ${{ github.event.inputs.delete_workflow_pattern }}
|
|
70
|
+
delete_workflow_by_state_pattern: ${{ github.event.inputs.delete_workflow_by_state_pattern }}
|
|
71
|
+
delete_run_by_conclusion_pattern: ${{ github.event.inputs.delete_run_by_conclusion_pattern }}
|
|
72
|
+
dry_run: ${{ github.event.inputs.dry_run }}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Integrates a collection of open source static analysis tools with GitHub code scanning.
|
|
2
|
+
# https://github.com/github/ossar-action
|
|
3
|
+
|
|
4
|
+
name: Run security static analysis
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
# Runs on pull requests
|
|
8
|
+
pull_request:
|
|
9
|
+
|
|
10
|
+
# Allows you to run this workflow manually from the Actions tab
|
|
11
|
+
workflow_dispatch:
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
ossar-analysis:
|
|
15
|
+
# OSSAR runs on windows-latest.
|
|
16
|
+
# ubuntu-latest and macos-latest support coming soon
|
|
17
|
+
runs-on: windows-latest
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- name: Checkout repository
|
|
21
|
+
uses: actions/checkout@v4
|
|
22
|
+
with:
|
|
23
|
+
# We must fetch at least the immediate parents so that if this is
|
|
24
|
+
# a pull request then we can checkout the head.
|
|
25
|
+
fetch-depth: 2
|
|
26
|
+
|
|
27
|
+
# If this run was triggered by a pull request event, then checkout
|
|
28
|
+
# the head of the pull request instead of the merge commit.
|
|
29
|
+
- run: git checkout HEAD^2
|
|
30
|
+
if: ${{ github.event_name == 'pull_request' }}
|
|
31
|
+
|
|
32
|
+
- name: Run open source static analysis tools
|
|
33
|
+
uses: github/ossar-action@main
|
|
34
|
+
id: ossar
|
|
35
|
+
|
|
36
|
+
- name: Upload results to Security tab
|
|
37
|
+
uses: github/codeql-action/upload-sarif@v3
|
|
38
|
+
with:
|
|
39
|
+
sarif_file: ${{ steps.ossar.outputs.sarifFile }}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Builds a Python package and publish it to PyPI when a new tag is created.
|
|
2
|
+
|
|
3
|
+
name: Upload release to PyPI
|
|
4
|
+
|
|
5
|
+
on:
|
|
6
|
+
# Runs on creating a new tag starting with 'v', e.g. 'v1.0.3'
|
|
7
|
+
push:
|
|
8
|
+
tags:
|
|
9
|
+
- 'v*'
|
|
10
|
+
|
|
11
|
+
# Allows you to run this workflow manually from the Actions tab
|
|
12
|
+
workflow_dispatch:
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
pypi-publish:
|
|
16
|
+
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- name: Check-out repository
|
|
21
|
+
uses: actions/checkout@v4
|
|
22
|
+
|
|
23
|
+
- name: Set up Python
|
|
24
|
+
uses: actions/setup-python@v5
|
|
25
|
+
with:
|
|
26
|
+
python-version: '3.12'
|
|
27
|
+
|
|
28
|
+
- name: Upgrade package installer for Python
|
|
29
|
+
run: pip install --upgrade pip
|
|
30
|
+
|
|
31
|
+
- name: Install Python dependencies
|
|
32
|
+
run: pip install '.[dev]'
|
|
33
|
+
|
|
34
|
+
- name: Create Python package
|
|
35
|
+
run: python -m build
|
|
36
|
+
|
|
37
|
+
- name: Publish distribution 📦 to PyPI
|
|
38
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
39
|
+
with:
|
|
40
|
+
password: ${{ secrets.PYPI_PASSWORD }}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Drafts your next Release notes as pull requests are merged into default branch
|
|
2
|
+
|
|
3
|
+
name: Update release draft
|
|
4
|
+
|
|
5
|
+
on:
|
|
6
|
+
# Runs on pushes targeting the default branch
|
|
7
|
+
push:
|
|
8
|
+
branches: [master]
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
update-release-draft:
|
|
12
|
+
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: release-drafter/release-drafter@v6
|
|
17
|
+
env:
|
|
18
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# This workflow will for a variety of Python versions
|
|
2
|
+
# - install the code base
|
|
3
|
+
# - lint the code base
|
|
4
|
+
# - test the code base
|
|
5
|
+
# - upload the test coverage to codecov
|
|
6
|
+
#
|
|
7
|
+
# It will also
|
|
8
|
+
# - build the package
|
|
9
|
+
# - check the package
|
|
10
|
+
#
|
|
11
|
+
# https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
|
|
12
|
+
|
|
13
|
+
name: Test code
|
|
14
|
+
|
|
15
|
+
# Trigger the workflow on push, pull request and manual trigger
|
|
16
|
+
on: [push, pull_request, workflow_call]
|
|
17
|
+
|
|
18
|
+
# Allow only one concurrent workflow, skipping runs queued between the run in-progress and latest queued.
|
|
19
|
+
# And cancel in-progress runs.
|
|
20
|
+
concurrency:
|
|
21
|
+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
22
|
+
cancel-in-progress: true
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
|
|
26
|
+
# Job 1: Check code consistency
|
|
27
|
+
code-consistency:
|
|
28
|
+
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
|
|
31
|
+
steps:
|
|
32
|
+
- name: Checkout repository
|
|
33
|
+
uses: actions/checkout@v4
|
|
34
|
+
|
|
35
|
+
- name: Set up Python
|
|
36
|
+
uses: actions/setup-python@v5
|
|
37
|
+
with:
|
|
38
|
+
python-version: '3.12'
|
|
39
|
+
|
|
40
|
+
- name: Check validity of pyproject.toml
|
|
41
|
+
run: |
|
|
42
|
+
pip install 'validate-pyproject[all]'
|
|
43
|
+
validate-pyproject pyproject.toml
|
|
44
|
+
|
|
45
|
+
# Install Python linter and code formatter and run in the project root
|
|
46
|
+
- name: Install and run Ruff
|
|
47
|
+
run: |
|
|
48
|
+
pip install ruff
|
|
49
|
+
ruff check .
|
|
50
|
+
|
|
51
|
+
- name: Suggestion to fix linter issues
|
|
52
|
+
if: ${{ failure() }}
|
|
53
|
+
run: |
|
|
54
|
+
echo "In project root run 'ruff check . --fix' and commit changes to fix issues."
|
|
55
|
+
exit 1
|
|
56
|
+
|
|
57
|
+
# Job 2: Test code and upload coverage to Codecov
|
|
58
|
+
test-code:
|
|
59
|
+
needs: code-consistency # previous job 'code-consistency' need to be finished first
|
|
60
|
+
|
|
61
|
+
# current job matrix. if modified, remember to UPDATE the strategy in the next job
|
|
62
|
+
strategy:
|
|
63
|
+
fail-fast: false
|
|
64
|
+
matrix:
|
|
65
|
+
os: [ubuntu-24.04, windows-2022, macos-13, macos-14]
|
|
66
|
+
python-version: ['3.10', '3.11', '3.12']
|
|
67
|
+
|
|
68
|
+
runs-on: ${{ matrix.os }}
|
|
69
|
+
|
|
70
|
+
steps:
|
|
71
|
+
- name: Checkout repository
|
|
72
|
+
uses: actions/checkout@v4
|
|
73
|
+
|
|
74
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
75
|
+
uses: actions/setup-python@v5
|
|
76
|
+
with:
|
|
77
|
+
python-version: ${{ matrix.python-version }}
|
|
78
|
+
|
|
79
|
+
- name: Upgrade package installer for Python
|
|
80
|
+
run: python -m pip install --upgrade pip
|
|
81
|
+
|
|
82
|
+
- name: Install Python dependencies
|
|
83
|
+
run: pip install '.[dev]'
|
|
84
|
+
|
|
85
|
+
- name: Run Python tests and create coverage report
|
|
86
|
+
run: >
|
|
87
|
+
pytest tests/
|
|
88
|
+
--cov=./
|
|
89
|
+
--cov-report=xml:coverage/coverage.xml
|
|
90
|
+
--junitxml=./coverage/junit.xml
|
|
91
|
+
--color=yes
|
|
92
|
+
-n auto
|
|
93
|
+
|
|
94
|
+
#- name: Upload test results to Codecov
|
|
95
|
+
# if: ${{ !cancelled() }}
|
|
96
|
+
# uses: codecov/test-results-action@v1
|
|
97
|
+
# with:
|
|
98
|
+
# files: ./coverage/junit.xml
|
|
99
|
+
# fail_ci_if_error: true # optional (default = false)
|
|
100
|
+
# name: Pytest results
|
|
101
|
+
# token: ${{ secrets.CODECOV_TOKEN }}
|
|
102
|
+
|
|
103
|
+
#- name: Upload coverage report to Codecov
|
|
104
|
+
# uses: codecov/codecov-action@v4
|
|
105
|
+
# with:
|
|
106
|
+
# files: ./coverage/coverage.xml
|
|
107
|
+
# env_vars: OS,PYTHON
|
|
108
|
+
# fail_ci_if_error: true # optional (default = false)
|
|
109
|
+
# name: Pytest coverage
|
|
110
|
+
# token: ${{ secrets.CODECOV_TOKEN }}
|
|
111
|
+
# env:
|
|
112
|
+
# OS: ${{ matrix.os }}
|
|
113
|
+
# PYTHON: ${{ matrix.python-version }}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Runs tests on Jupyter notebooks
|
|
2
|
+
|
|
3
|
+
name: Test Jupyter notebooks
|
|
4
|
+
|
|
5
|
+
# Trigger the workflow on push, pull request and manual trigger
|
|
6
|
+
on: [push, pull_request, workflow_call]
|
|
7
|
+
|
|
8
|
+
# Allow only one concurrent workflow, skipping runs queued between the run in-progress and latest queued.
|
|
9
|
+
# And cancel in-progress runs.
|
|
10
|
+
concurrency:
|
|
11
|
+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
12
|
+
cancel-in-progress: true
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
|
|
16
|
+
# Job 1: Check code consistency
|
|
17
|
+
code-consistency:
|
|
18
|
+
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- name: Checkout repository
|
|
23
|
+
uses: actions/checkout@v4
|
|
24
|
+
|
|
25
|
+
- name: Set up Python
|
|
26
|
+
uses: actions/setup-python@v5
|
|
27
|
+
with:
|
|
28
|
+
python-version: '3.12'
|
|
29
|
+
|
|
30
|
+
# Install quality assurance package for Jupyter notebooks and run in the sample directory
|
|
31
|
+
- name: Install and run nbQA
|
|
32
|
+
run: |
|
|
33
|
+
pip install ruff nbqa
|
|
34
|
+
nbqa ruff examples/
|
|
35
|
+
|
|
36
|
+
- name: Suggestion to fix linter issues
|
|
37
|
+
if: ${{ failure() }}
|
|
38
|
+
run: |
|
|
39
|
+
echo "In project root run 'nbqa ruff examples/ --fix' and commit changes to fix issues."
|
|
40
|
+
exit 1
|
|
41
|
+
|
|
42
|
+
# Job 2: Test Jupiter notebooks
|
|
43
|
+
test-ipynb:
|
|
44
|
+
needs: code-consistency # previous job 'code-consistency' need to be finished first
|
|
45
|
+
|
|
46
|
+
timeout-minutes: 30
|
|
47
|
+
|
|
48
|
+
strategy:
|
|
49
|
+
fail-fast: false
|
|
50
|
+
matrix:
|
|
51
|
+
os: [ubuntu-24.04, windows-2022, macos-13, macos-14]
|
|
52
|
+
python-version: ['3.10', '3.11', '3.12']
|
|
53
|
+
|
|
54
|
+
runs-on: ${{ matrix.os }}
|
|
55
|
+
|
|
56
|
+
steps:
|
|
57
|
+
- name: Check-out repository
|
|
58
|
+
uses: actions/checkout@v4
|
|
59
|
+
|
|
60
|
+
- name: Set up Python environment
|
|
61
|
+
uses: actions/setup-python@v5
|
|
62
|
+
with:
|
|
63
|
+
python-version: ${{ matrix.python-version }}
|
|
64
|
+
|
|
65
|
+
- name: Upgrade package installer for Python
|
|
66
|
+
shell: bash
|
|
67
|
+
run: python -m pip install --upgrade pip
|
|
68
|
+
|
|
69
|
+
- name: Install Python dependencies
|
|
70
|
+
run: pip install '.[dev,charts]'
|
|
71
|
+
|
|
72
|
+
- name: Test Jupyter notebooks
|
|
73
|
+
shell: bash
|
|
74
|
+
run: >
|
|
75
|
+
pytest
|
|
76
|
+
--nbmake examples/*ipynb
|
|
77
|
+
--nbmake-timeout=300
|
|
78
|
+
--color=yes
|
|
79
|
+
-n=auto
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# This workflow will for a variety of Python versions
|
|
2
|
+
# - install the code base
|
|
3
|
+
# - lint the code base
|
|
4
|
+
# - test the code base
|
|
5
|
+
# - upload the test coverage to codecov
|
|
6
|
+
#
|
|
7
|
+
# It will also
|
|
8
|
+
# - build the package
|
|
9
|
+
# - check the package
|
|
10
|
+
#
|
|
11
|
+
# https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
|
|
12
|
+
|
|
13
|
+
name: Build and test package
|
|
14
|
+
|
|
15
|
+
# Trigger the workflow on push, pull request and manual trigger
|
|
16
|
+
on: [push, pull_request, workflow_call]
|
|
17
|
+
|
|
18
|
+
# Allow only one concurrent workflow, skipping runs queued between the run in-progress and latest queued.
|
|
19
|
+
# And cancel in-progress runs.
|
|
20
|
+
concurrency:
|
|
21
|
+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
22
|
+
cancel-in-progress: true
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
|
|
26
|
+
# Job 1: Build the package
|
|
27
|
+
build-package:
|
|
28
|
+
|
|
29
|
+
# current job matrix. if modified, remember to UPDATE the strategy in the next job
|
|
30
|
+
strategy:
|
|
31
|
+
fail-fast: false
|
|
32
|
+
matrix:
|
|
33
|
+
os: [ubuntu-24.04, windows-2022, macos-13, macos-14]
|
|
34
|
+
python-version: ['3.10', '3.11', '3.12']
|
|
35
|
+
|
|
36
|
+
runs-on: ${{ matrix.os }}
|
|
37
|
+
|
|
38
|
+
steps:
|
|
39
|
+
- name: Checkout repository
|
|
40
|
+
uses: actions/checkout@v4
|
|
41
|
+
|
|
42
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
43
|
+
uses: actions/setup-python@v5
|
|
44
|
+
with:
|
|
45
|
+
python-version: ${{ matrix.python-version }}
|
|
46
|
+
|
|
47
|
+
- name: Upgrade package installer for Python
|
|
48
|
+
run: python -m pip install --upgrade pip
|
|
49
|
+
|
|
50
|
+
- name: Install Python dependencies
|
|
51
|
+
run: pip install '.[dev]'
|
|
52
|
+
|
|
53
|
+
- name: Create Python package # dist/*.whl
|
|
54
|
+
run: python -m build --wheel --outdir dist
|
|
55
|
+
|
|
56
|
+
- name: Upload zipped Python package (with tests and examples) for next job
|
|
57
|
+
uses: actions/upload-artifact@v4
|
|
58
|
+
with:
|
|
59
|
+
name: EasyDiffractionLib_py${{ matrix.python-version }}_${{ matrix.os }}_${{ runner.arch }}
|
|
60
|
+
path: |
|
|
61
|
+
dist/*.whl
|
|
62
|
+
tests/
|
|
63
|
+
examples/
|
|
64
|
+
if-no-files-found: "error"
|
|
65
|
+
compression-level: 0
|
|
66
|
+
|
|
67
|
+
# Job 2: Test the package
|
|
68
|
+
test-package:
|
|
69
|
+
needs: build-package # previous job 'code-testing' need to be finished first
|
|
70
|
+
|
|
71
|
+
strategy:
|
|
72
|
+
fail-fast: false
|
|
73
|
+
matrix:
|
|
74
|
+
os: [ubuntu-24.04, windows-2022, macos-13, macos-14]
|
|
75
|
+
python-version: ['3.10', '3.11', '3.12']
|
|
76
|
+
|
|
77
|
+
runs-on: ${{ matrix.os }}
|
|
78
|
+
|
|
79
|
+
steps:
|
|
80
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
81
|
+
uses: actions/setup-python@v5
|
|
82
|
+
with:
|
|
83
|
+
python-version: ${{ matrix.python-version }}
|
|
84
|
+
|
|
85
|
+
- name: Upgrade package installer for Python
|
|
86
|
+
run: python -m pip install --upgrade pip
|
|
87
|
+
|
|
88
|
+
- name: Download zipped Python package (with tests and examples) from previous job
|
|
89
|
+
uses: actions/download-artifact@v4
|
|
90
|
+
with: # name or path are taken from the upload step of the previous job
|
|
91
|
+
name: EasyDiffractionLib_py${{ matrix.python-version }}_${{ matrix.os }}_${{ runner.arch }}
|
|
92
|
+
path: . # directory to extract downloaded zipped artifacts
|
|
93
|
+
|
|
94
|
+
- name: Install Python package from previous job with 'dev' extras
|
|
95
|
+
run: pip install 'easydiffraction[dev]' --find-links=dist
|
|
96
|
+
|
|
97
|
+
- name: Run Python tests
|
|
98
|
+
run: >
|
|
99
|
+
pytest tests/
|
|
100
|
+
--color=yes
|
|
101
|
+
-n auto
|
|
102
|
+
|
|
103
|
+
- name: Run tests on Jupyter Notebooks
|
|
104
|
+
shell: bash
|
|
105
|
+
run: >
|
|
106
|
+
pytest
|
|
107
|
+
--nbmake examples/*ipynb
|
|
108
|
+
--nbmake-timeout=300
|
|
109
|
+
--color=yes
|
|
110
|
+
-n=auto
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Verifies if a pull request has at least one label from a set of valid labels before it can be merged.
|
|
2
|
+
|
|
3
|
+
name: Verify pull request labels
|
|
4
|
+
|
|
5
|
+
on:
|
|
6
|
+
# Runs on pull requests to a repository
|
|
7
|
+
pull_request_target:
|
|
8
|
+
types: [opened, labeled, unlabeled, synchronize]
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
verify-pr-labels:
|
|
12
|
+
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
|
|
17
|
+
- name: Verify pull request labels
|
|
18
|
+
uses: jesusvasquez333/verify-pr-label-action@v1.4.0
|
|
19
|
+
with:
|
|
20
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
21
|
+
valid-labels: chore, fix, bugfix, bug, enhancement, feature, dependencies, documentation
|
|
22
|
+
pull-request-number: ${{ github.event.pull_request.number }}
|
|
23
|
+
disable-reviews: false
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# QtCreator
|
|
2
|
+
*.autosave
|
|
3
|
+
|
|
4
|
+
# QtCreator Qml
|
|
5
|
+
*.qmlproject.user
|
|
6
|
+
*.qmlproject.user.*
|
|
7
|
+
|
|
8
|
+
# QtCreator Python
|
|
9
|
+
*.pyproject.user
|
|
10
|
+
*.pyproject.user.*
|
|
11
|
+
|
|
12
|
+
# QtCreator CMake
|
|
13
|
+
CMakeLists.txt.user*
|
|
14
|
+
|
|
15
|
+
# Python
|
|
16
|
+
__pycache__
|
|
17
|
+
.venv
|
|
18
|
+
.coverage
|
|
19
|
+
.pyc
|
|
20
|
+
|
|
21
|
+
# Poetry
|
|
22
|
+
dist
|
|
23
|
+
poetry.lock
|
|
24
|
+
*.egg-info
|
|
25
|
+
|
|
26
|
+
# PyInstaller
|
|
27
|
+
build
|
|
28
|
+
*.spec
|
|
29
|
+
|
|
30
|
+
# Jupyter
|
|
31
|
+
.ipynb_checkpoints
|
|
32
|
+
|
|
33
|
+
# macOS
|
|
34
|
+
.DS_Store
|
|
35
|
+
*.app
|
|
36
|
+
*.dmg
|
|
37
|
+
|
|
38
|
+
# Misc
|
|
39
|
+
..*
|
|
40
|
+
*.log
|
|
41
|
+
*.zip
|
|
42
|
+
.ci/
|
|
43
|
+
.idea/
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
When contributing, please first discuss the change you wish to make via issue,
|
|
4
|
+
email, or any other method with the owners of this repository before making a change.
|
|
5
|
+
|
|
6
|
+
Please note we have a code of conduct, please follow it in all your interactions with the project.
|
|
7
|
+
|
|
8
|
+
## Pull Request Process
|
|
9
|
+
|
|
10
|
+
1. Ensure any install or build dependencies are removed before the end of the layer when doing a
|
|
11
|
+
build.
|
|
12
|
+
2. Update the README.md with details of changes to the interface, this includes new environment
|
|
13
|
+
variables, exposed ports, useful file locations and container parameters.
|
|
14
|
+
3. Increase the version numbers in any example files and the README.md to the new version that this
|
|
15
|
+
Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/).
|
|
16
|
+
4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
|
|
17
|
+
do not have permission to do that, you may request the second reviewer to merge it for you.
|
|
18
|
+
|
|
19
|
+
## Code of Conduct
|
|
20
|
+
|
|
21
|
+
### Our Pledge
|
|
22
|
+
|
|
23
|
+
In the interest of fostering an open and welcoming environment, we as
|
|
24
|
+
contributors and maintainers pledge to make participation in our project and
|
|
25
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
|
26
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
|
27
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
|
28
|
+
orientation.
|
|
29
|
+
|
|
30
|
+
### Our Standards
|
|
31
|
+
|
|
32
|
+
Examples of behavior that contributes to creating a positive environment
|
|
33
|
+
include:
|
|
34
|
+
|
|
35
|
+
* Being respectful of differing viewpoints and experiences
|
|
36
|
+
* Gracefully accepting constructive criticism
|
|
37
|
+
* Focusing on what is best for the community
|
|
38
|
+
|
|
39
|
+
Examples of unacceptable behavior by participants include:
|
|
40
|
+
|
|
41
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
|
42
|
+
* Public or private harassment
|
|
43
|
+
* Publishing others' private information, such as a physical or electronic
|
|
44
|
+
address, without explicit permission
|
|
45
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
46
|
+
professional setting
|
|
47
|
+
|
|
48
|
+
### Our Responsibilities
|
|
49
|
+
|
|
50
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
|
51
|
+
behavior and are expected to take appropriate and fair corrective action in
|
|
52
|
+
response to any instances of unacceptable behavior.
|
|
53
|
+
|
|
54
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
|
55
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
|
56
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
|
57
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
|
58
|
+
threatening, offensive, or harmful.
|
|
59
|
+
|
|
60
|
+
### Scope
|
|
61
|
+
|
|
62
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
|
63
|
+
when an individual is representing the project or its community. Examples of
|
|
64
|
+
representing a project or community include using an official project e-mail
|
|
65
|
+
address, posting via an official social media account, or acting as an appointed
|
|
66
|
+
representative at an online or offline event. Representation of a project may be
|
|
67
|
+
further defined and clarified by project maintainers.
|
|
68
|
+
|
|
69
|
+
### Enforcement
|
|
70
|
+
|
|
71
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
72
|
+
reported by contacting the project team at suport@easydiffraction.org. All
|
|
73
|
+
complaints will be reviewed and investigated and will result in a response that
|
|
74
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
|
75
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
|
76
|
+
Further details of specific enforcement policies may be posted separately.
|
|
77
|
+
|
|
78
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
|
79
|
+
faith may face temporary or permanent repercussions as determined by other
|
|
80
|
+
members of the project's leadership.
|
|
81
|
+
|
|
82
|
+
### Attribution
|
|
83
|
+
|
|
84
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
|
85
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
|
86
|
+
|
|
87
|
+
[homepage]: http://contributor-covenant.org
|
|
88
|
+
[version]: http://contributor-covenant.org/version/1/4/
|