erlab 3.5.1__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.
- erlab-3.5.1/.codecov.yml +5 -0
- erlab-3.5.1/.github/ISSUE_TEMPLATE/bug-report.yml +56 -0
- erlab-3.5.1/.github/ISSUE_TEMPLATE/config.yml +5 -0
- erlab-3.5.1/.github/ISSUE_TEMPLATE/feature-request.yml +36 -0
- erlab-3.5.1/.github/dependabot.yml +11 -0
- erlab-3.5.1/.github/workflows/ci.yml +129 -0
- erlab-3.5.1/.github/workflows/release.yml +64 -0
- erlab-3.5.1/.gitignore +167 -0
- erlab-3.5.1/.pre-commit-config.yaml +61 -0
- erlab-3.5.1/.readthedocs.yaml +27 -0
- erlab-3.5.1/CHANGELOG.md +1593 -0
- erlab-3.5.1/LICENSE +674 -0
- erlab-3.5.1/PKG-INFO +808 -0
- erlab-3.5.1/PythonInterface.ipf +57 -0
- erlab-3.5.1/README.md +55 -0
- erlab-3.5.1/docs/Makefile +20 -0
- erlab-3.5.1/docs/make.bat +35 -0
- erlab-3.5.1/docs/requirements.txt +4 -0
- erlab-3.5.1/docs/source/_static/custom.css +41 -0
- erlab-3.5.1/docs/source/bibliography.rst +14 -0
- erlab-3.5.1/docs/source/changelog.md +5 -0
- erlab-3.5.1/docs/source/conf.py +576 -0
- erlab-3.5.1/docs/source/contributing.rst +458 -0
- erlab-3.5.1/docs/source/erlab.analysis.rst +4 -0
- erlab-3.5.1/docs/source/erlab.constants.rst +42 -0
- erlab-3.5.1/docs/source/erlab.interactive.rst +4 -0
- erlab-3.5.1/docs/source/erlab.io.rst +4 -0
- erlab-3.5.1/docs/source/erlab.lattice.rst +20 -0
- erlab-3.5.1/docs/source/erlab.plotting.rst +4 -0
- erlab-3.5.1/docs/source/erlab.utils.rst +4 -0
- erlab-3.5.1/docs/source/getting-started.rst +172 -0
- erlab-3.5.1/docs/source/images/dtool_dark.png +0 -0
- erlab-3.5.1/docs/source/images/dtool_light.png +0 -0
- erlab-3.5.1/docs/source/images/flowchart_multiple.pdf +0 -0
- erlab-3.5.1/docs/source/images/flowchart_single.pdf +0 -0
- erlab-3.5.1/docs/source/images/imagetool_dark.png +0 -0
- erlab-3.5.1/docs/source/images/imagetool_light.png +0 -0
- erlab-3.5.1/docs/source/images/ktool_1_dark.png +0 -0
- erlab-3.5.1/docs/source/images/ktool_1_light.png +0 -0
- erlab-3.5.1/docs/source/images/ktool_2_dark.png +0 -0
- erlab-3.5.1/docs/source/images/ktool_2_light.png +0 -0
- erlab-3.5.1/docs/source/index.rst +88 -0
- erlab-3.5.1/docs/source/make_accessor_docs.py +120 -0
- erlab-3.5.1/docs/source/pyplots/norms.py +104 -0
- erlab-3.5.1/docs/source/reference.rst +47 -0
- erlab-3.5.1/docs/source/refs.bib +98 -0
- erlab-3.5.1/docs/source/user-guide/curve-fitting.ipynb +1185 -0
- erlab-3.5.1/docs/source/user-guide/filtering.ipynb +323 -0
- erlab-3.5.1/docs/source/user-guide/imagetool.rst +213 -0
- erlab-3.5.1/docs/source/user-guide/index.rst +39 -0
- erlab-3.5.1/docs/source/user-guide/indexing.ipynb +552 -0
- erlab-3.5.1/docs/source/user-guide/io.ipynb +1557 -0
- erlab-3.5.1/docs/source/user-guide/kconv.ipynb +486 -0
- erlab-3.5.1/docs/source/user-guide/plotting.ipynb +750 -0
- erlab-3.5.1/environment.yml +28 -0
- erlab-3.5.1/pyproject.toml +277 -0
- erlab-3.5.1/setup.cfg +4 -0
- erlab-3.5.1/src/erlab/__init__.py +40 -0
- erlab-3.5.1/src/erlab/accessors/__init__.py +22 -0
- erlab-3.5.1/src/erlab/accessors/fit.py +695 -0
- erlab-3.5.1/src/erlab/accessors/general.py +701 -0
- erlab-3.5.1/src/erlab/accessors/kspace.py +979 -0
- erlab-3.5.1/src/erlab/accessors/utils.py +48 -0
- erlab-3.5.1/src/erlab/analysis/__init__.py +25 -0
- erlab-3.5.1/src/erlab/analysis/__init__.pyi +21 -0
- erlab-3.5.1/src/erlab/analysis/correlation.py +162 -0
- erlab-3.5.1/src/erlab/analysis/fit/__init__.py +22 -0
- erlab-3.5.1/src/erlab/analysis/fit/__init__.pyi +3 -0
- erlab-3.5.1/src/erlab/analysis/fit/functions/__init__.py +18 -0
- erlab-3.5.1/src/erlab/analysis/fit/functions/__init__.pyi +43 -0
- erlab-3.5.1/src/erlab/analysis/fit/functions/dynamic.py +397 -0
- erlab-3.5.1/src/erlab/analysis/fit/functions/general.py +371 -0
- erlab-3.5.1/src/erlab/analysis/fit/minuit.py +229 -0
- erlab-3.5.1/src/erlab/analysis/fit/models.py +452 -0
- erlab-3.5.1/src/erlab/analysis/fit/spline.py +42 -0
- erlab-3.5.1/src/erlab/analysis/gold.py +923 -0
- erlab-3.5.1/src/erlab/analysis/image.py +969 -0
- erlab-3.5.1/src/erlab/analysis/interpolate.py +566 -0
- erlab-3.5.1/src/erlab/analysis/kspace.py +338 -0
- erlab-3.5.1/src/erlab/analysis/mask/__init__.py +294 -0
- erlab-3.5.1/src/erlab/analysis/mask/polygon.py +272 -0
- erlab-3.5.1/src/erlab/analysis/transform.py +398 -0
- erlab-3.5.1/src/erlab/constants.py +99 -0
- erlab-3.5.1/src/erlab/interactive/__init__.py +48 -0
- erlab-3.5.1/src/erlab/interactive/__init__.pyi +16 -0
- erlab-3.5.1/src/erlab/interactive/bzplot.py +409 -0
- erlab-3.5.1/src/erlab/interactive/colors.py +851 -0
- erlab-3.5.1/src/erlab/interactive/curvefittingtool.py +683 -0
- erlab-3.5.1/src/erlab/interactive/derivative.py +388 -0
- erlab-3.5.1/src/erlab/interactive/dtool.ui +587 -0
- erlab-3.5.1/src/erlab/interactive/fermiedge.py +946 -0
- erlab-3.5.1/src/erlab/interactive/imagetool/__init__.py +23 -0
- erlab-3.5.1/src/erlab/interactive/imagetool/__init__.pyi +16 -0
- erlab-3.5.1/src/erlab/interactive/imagetool/_deprecated/__init__.py +0 -0
- erlab-3.5.1/src/erlab/interactive/imagetool/_deprecated/imagetool_mpl.py +1449 -0
- erlab-3.5.1/src/erlab/interactive/imagetool/_deprecated/imagetool_old.py +3220 -0
- erlab-3.5.1/src/erlab/interactive/imagetool/_itool.py +162 -0
- erlab-3.5.1/src/erlab/interactive/imagetool/_mainwindow.py +660 -0
- erlab-3.5.1/src/erlab/interactive/imagetool/controls.py +692 -0
- erlab-3.5.1/src/erlab/interactive/imagetool/core.py +2691 -0
- erlab-3.5.1/src/erlab/interactive/imagetool/dialogs.py +501 -0
- erlab-3.5.1/src/erlab/interactive/imagetool/fastbinning.py +418 -0
- erlab-3.5.1/src/erlab/interactive/imagetool/fastslicing.py +99 -0
- erlab-3.5.1/src/erlab/interactive/imagetool/manager/__init__.py +109 -0
- erlab-3.5.1/src/erlab/interactive/imagetool/manager/__main__.py +4 -0
- erlab-3.5.1/src/erlab/interactive/imagetool/manager/_console.py +312 -0
- erlab-3.5.1/src/erlab/interactive/imagetool/manager/_dialogs.py +143 -0
- erlab-3.5.1/src/erlab/interactive/imagetool/manager/_io.py +193 -0
- erlab-3.5.1/src/erlab/interactive/imagetool/manager/_mainwindow.py +1184 -0
- erlab-3.5.1/src/erlab/interactive/imagetool/manager/_modelview.py +635 -0
- erlab-3.5.1/src/erlab/interactive/imagetool/manager/_server.py +200 -0
- erlab-3.5.1/src/erlab/interactive/imagetool/manager/_wrapper.py +266 -0
- erlab-3.5.1/src/erlab/interactive/imagetool/manager/icon.icns +0 -0
- erlab-3.5.1/src/erlab/interactive/imagetool/manager/icon.png +0 -0
- erlab-3.5.1/src/erlab/interactive/imagetool/slicer.py +898 -0
- erlab-3.5.1/src/erlab/interactive/kspace.py +705 -0
- erlab-3.5.1/src/erlab/interactive/ktool.ui +602 -0
- erlab-3.5.1/src/erlab/interactive/restool.ui +655 -0
- erlab-3.5.1/src/erlab/interactive/utils.py +2371 -0
- erlab-3.5.1/src/erlab/io/__init__.py +70 -0
- erlab-3.5.1/src/erlab/io/__init__.pyi +27 -0
- erlab-3.5.1/src/erlab/io/characterization/__init__.py +14 -0
- erlab-3.5.1/src/erlab/io/characterization/resistance.py +141 -0
- erlab-3.5.1/src/erlab/io/characterization/xrd.py +74 -0
- erlab-3.5.1/src/erlab/io/dataloader.py +2176 -0
- erlab-3.5.1/src/erlab/io/exampledata.py +496 -0
- erlab-3.5.1/src/erlab/io/igor.py +337 -0
- erlab-3.5.1/src/erlab/io/nexusutils.py +482 -0
- erlab-3.5.1/src/erlab/io/plugins/__init__.py +53 -0
- erlab-3.5.1/src/erlab/io/plugins/da30.py +196 -0
- erlab-3.5.1/src/erlab/io/plugins/erpes.py +215 -0
- erlab-3.5.1/src/erlab/io/plugins/esm.py +16 -0
- erlab-3.5.1/src/erlab/io/plugins/i05.py +79 -0
- erlab-3.5.1/src/erlab/io/plugins/kriss.py +17 -0
- erlab-3.5.1/src/erlab/io/plugins/lorea.py +66 -0
- erlab-3.5.1/src/erlab/io/plugins/maestro.py +269 -0
- erlab-3.5.1/src/erlab/io/plugins/merlin.py +229 -0
- erlab-3.5.1/src/erlab/io/plugins/ssrl52.py +307 -0
- erlab-3.5.1/src/erlab/io/utils.py +381 -0
- erlab-3.5.1/src/erlab/lattice.py +130 -0
- erlab-3.5.1/src/erlab/plotting/IgorCT/BlueHot.ibw +0 -0
- erlab-3.5.1/src/erlab/plotting/IgorCT/CTBlueWhite.ibw +0 -0
- erlab-3.5.1/src/erlab/plotting/IgorCT/CTRainbowLIght.ibw +0 -0
- erlab-3.5.1/src/erlab/plotting/IgorCT/CTRedTemperature.ibw +0 -0
- erlab-3.5.1/src/erlab/plotting/IgorCT/ColdWarm.ibw +0 -0
- erlab-3.5.1/src/erlab/plotting/IgorCT/PlanetEarth.ibw +0 -0
- erlab-3.5.1/src/erlab/plotting/IgorCT/ametrine.ibw +0 -0
- erlab-3.5.1/src/erlab/plotting/IgorCT/isolum.ibw +0 -0
- erlab-3.5.1/src/erlab/plotting/IgorCT/morgenstemning.ibw +0 -0
- erlab-3.5.1/src/erlab/plotting/__init__.py +95 -0
- erlab-3.5.1/src/erlab/plotting/__init__.pyi +82 -0
- erlab-3.5.1/src/erlab/plotting/annotations.py +1181 -0
- erlab-3.5.1/src/erlab/plotting/atoms.py +536 -0
- erlab-3.5.1/src/erlab/plotting/bz.py +143 -0
- erlab-3.5.1/src/erlab/plotting/colors.py +1296 -0
- erlab-3.5.1/src/erlab/plotting/erplot.py +94 -0
- erlab-3.5.1/src/erlab/plotting/general.py +1128 -0
- erlab-3.5.1/src/erlab/plotting/plot3d.py +84 -0
- erlab-3.5.1/src/erlab/plotting/stylelib/fira.mplstyle +131 -0
- erlab-3.5.1/src/erlab/plotting/stylelib/firalight.mplstyle +131 -0
- erlab-3.5.1/src/erlab/plotting/stylelib/khan.mplstyle +416 -0
- erlab-3.5.1/src/erlab/plotting/stylelib/nature.mplstyle +227 -0
- erlab-3.5.1/src/erlab/plotting/stylelib/poster.mplstyle +30 -0
- erlab-3.5.1/src/erlab/plotting/stylelib/times.mplstyle +151 -0
- erlab-3.5.1/src/erlab/utils/__init__.py +26 -0
- erlab-3.5.1/src/erlab/utils/__init__.pyi +3 -0
- erlab-3.5.1/src/erlab/utils/array.py +291 -0
- erlab-3.5.1/src/erlab/utils/formatting.py +383 -0
- erlab-3.5.1/src/erlab/utils/misc.py +170 -0
- erlab-3.5.1/src/erlab/utils/parallel.py +62 -0
- erlab-3.5.1/src/erlab.egg-info/PKG-INFO +808 -0
- erlab-3.5.1/src/erlab.egg-info/SOURCES.txt +216 -0
- erlab-3.5.1/src/erlab.egg-info/dependency_links.txt +1 -0
- erlab-3.5.1/src/erlab.egg-info/entry_points.txt +5 -0
- erlab-3.5.1/src/erlab.egg-info/requires.txt +63 -0
- erlab-3.5.1/src/erlab.egg-info/top_level.txt +1 -0
- erlab-3.5.1/tests/accessors/test_fit.py +190 -0
- erlab-3.5.1/tests/accessors/test_general.py +179 -0
- erlab-3.5.1/tests/accessors/test_kspace.py +181 -0
- erlab-3.5.1/tests/analysis/fit/test_functions_dynamic.py +190 -0
- erlab-3.5.1/tests/analysis/fit/test_functions_general.py +188 -0
- erlab-3.5.1/tests/analysis/fit/test_minuit.py +40 -0
- erlab-3.5.1/tests/analysis/fit/test_models.py +202 -0
- erlab-3.5.1/tests/analysis/test_gold.py +77 -0
- erlab-3.5.1/tests/analysis/test_image.py +304 -0
- erlab-3.5.1/tests/analysis/test_image_savgol.py +112 -0
- erlab-3.5.1/tests/analysis/test_interpolate.py +202 -0
- erlab-3.5.1/tests/analysis/test_kspace.py +51 -0
- erlab-3.5.1/tests/analysis/test_mask.py +88 -0
- erlab-3.5.1/tests/analysis/test_transform.py +142 -0
- erlab-3.5.1/tests/conftest.py +350 -0
- erlab-3.5.1/tests/interactive/test_fastbinning.py +28 -0
- erlab-3.5.1/tests/interactive/test_imagetool.py +587 -0
- erlab-3.5.1/tests/interactive/test_imagetool_manager.py +474 -0
- erlab-3.5.1/tests/interactive/test_tools.py +241 -0
- erlab-3.5.1/tests/interactive/test_utils.py +54 -0
- erlab-3.5.1/tests/io/plugins/test_da30.py +35 -0
- erlab-3.5.1/tests/io/plugins/test_erpes.py +50 -0
- erlab-3.5.1/tests/io/plugins/test_esm.py +32 -0
- erlab-3.5.1/tests/io/plugins/test_i05.py +24 -0
- erlab-3.5.1/tests/io/plugins/test_lorea.py +35 -0
- erlab-3.5.1/tests/io/plugins/test_maestro.py +35 -0
- erlab-3.5.1/tests/io/plugins/test_merlin.py +71 -0
- erlab-3.5.1/tests/io/plugins/test_ssrl52.py +37 -0
- erlab-3.5.1/tests/io/test_dataloader.py +334 -0
- erlab-3.5.1/tests/io/test_exampledata.py +96 -0
- erlab-3.5.1/tests/io/test_igor/exp0.pxt +0 -0
- erlab-3.5.1/tests/io/test_igor/exp1.pxt +0 -0
- erlab-3.5.1/tests/io/test_igor/wave0.ibw +0 -0
- erlab-3.5.1/tests/io/test_igor.py +34 -0
- erlab-3.5.1/tests/plotting/test_annotations.py +58 -0
- erlab-3.5.1/tests/plotting/test_atoms.py +52 -0
- erlab-3.5.1/tests/plotting/test_colors.py +164 -0
- erlab-3.5.1/tests/plotting/test_general.py +215 -0
- erlab-3.5.1/tests/plotting/test_plot3d.py +50 -0
- erlab-3.5.1/tests/test_constants.py +11 -0
- erlab-3.5.1/tests/utils/test_array.py +130 -0
- erlab-3.5.1/tests/utils/test_formatting.py +104 -0
erlab-3.5.1/.codecov.yml
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
name: Bug report
|
|
2
|
+
description: Create a report to help us improve.
|
|
3
|
+
labels: [bug]
|
|
4
|
+
assignees: [kmnhan]
|
|
5
|
+
body:
|
|
6
|
+
- type: textarea
|
|
7
|
+
id: what-happened
|
|
8
|
+
attributes:
|
|
9
|
+
label: Description
|
|
10
|
+
description: |
|
|
11
|
+
Thanks for reporting a bug! Please describe what you were trying to get done.
|
|
12
|
+
Tell us what happened, what went wrong.
|
|
13
|
+
validations:
|
|
14
|
+
required: true
|
|
15
|
+
|
|
16
|
+
- type: textarea
|
|
17
|
+
id: what-did-you-expect-to-happen
|
|
18
|
+
attributes:
|
|
19
|
+
label: Expected behavior
|
|
20
|
+
description: |
|
|
21
|
+
A clear and concise description of what you expected to happen.
|
|
22
|
+
validations:
|
|
23
|
+
required: false
|
|
24
|
+
|
|
25
|
+
- type: textarea
|
|
26
|
+
id: sample-code
|
|
27
|
+
attributes:
|
|
28
|
+
label: Minimal Complete Verifiable Example
|
|
29
|
+
description: |
|
|
30
|
+
Minimal, self-contained copy-pastable example that demonstrates the issue.
|
|
31
|
+
This will be automatically formatted into code, so no need for markdown backticks.
|
|
32
|
+
render: Python
|
|
33
|
+
|
|
34
|
+
- type: checkboxes
|
|
35
|
+
id: mvce-checkboxes
|
|
36
|
+
attributes:
|
|
37
|
+
label: MVCE confirmation
|
|
38
|
+
description: |
|
|
39
|
+
Please confirm that the bug report is in an excellent state, so we can understand & fix it quickly & efficiently. For more details, check out:
|
|
40
|
+
|
|
41
|
+
- [Minimal Complete Verifiable Examples](https://stackoverflow.com/help/mcve)
|
|
42
|
+
- [Craft Minimal Bug Reports](https://matthewrocklin.com/minimal-bug-reports)
|
|
43
|
+
|
|
44
|
+
options:
|
|
45
|
+
- label: Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue.
|
|
46
|
+
- label: Complete example — the example is self-contained, including all data and the text of any traceback.
|
|
47
|
+
- label: Verifiable example — the example copy & pastes into an IPython prompt, returning the result.
|
|
48
|
+
- label: New issue — a search of GitHub Issues suggests this is not a duplicate.
|
|
49
|
+
- label: Recent environment — the issue occurs with the latest version of erlab and its dependencies.
|
|
50
|
+
|
|
51
|
+
- type: textarea
|
|
52
|
+
id: additional-context
|
|
53
|
+
attributes:
|
|
54
|
+
label: Additional context
|
|
55
|
+
description: |
|
|
56
|
+
Add any other context about the problem here, including screenshots or a list of packages and versions installed if relevant.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: Feature Request
|
|
2
|
+
description: Suggest an idea for this project.
|
|
3
|
+
labels: [enhancement]
|
|
4
|
+
assignees: [kmnhan]
|
|
5
|
+
body:
|
|
6
|
+
- type: textarea
|
|
7
|
+
id: description
|
|
8
|
+
attributes:
|
|
9
|
+
label: Description
|
|
10
|
+
description: |
|
|
11
|
+
Is your feature request related to a problem?
|
|
12
|
+
Please provide a clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
13
|
+
validations:
|
|
14
|
+
required: true
|
|
15
|
+
- type: textarea
|
|
16
|
+
id: solution
|
|
17
|
+
attributes:
|
|
18
|
+
label: Possible solution
|
|
19
|
+
description: |
|
|
20
|
+
A clear and concise description of what you want to happen.
|
|
21
|
+
- type: textarea
|
|
22
|
+
id: alternatives
|
|
23
|
+
attributes:
|
|
24
|
+
label: Alternatives
|
|
25
|
+
description: |
|
|
26
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
|
27
|
+
validations:
|
|
28
|
+
required: false
|
|
29
|
+
- type: textarea
|
|
30
|
+
id: additional-context
|
|
31
|
+
attributes:
|
|
32
|
+
label: Additional context
|
|
33
|
+
description: |
|
|
34
|
+
Add any other context or screenshots about the feature request here.
|
|
35
|
+
validations:
|
|
36
|
+
required: false
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["main"]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
schedule:
|
|
9
|
+
# Every friday at 22:00 UTC (Every saturday at 07:00 KST/JST)
|
|
10
|
+
- cron: "0 22 * * FRI"
|
|
11
|
+
concurrency:
|
|
12
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
13
|
+
cancel-in-progress: true
|
|
14
|
+
env:
|
|
15
|
+
FORCE_COLOR: 1
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
test:
|
|
19
|
+
name: Test Python ${{ matrix.python-version }} [${{ matrix.qt-api }}]
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
env:
|
|
22
|
+
DISPLAY: ":99.0"
|
|
23
|
+
strategy:
|
|
24
|
+
fail-fast: false
|
|
25
|
+
matrix:
|
|
26
|
+
python-version: ["3.11", "3.12"]
|
|
27
|
+
qt-api: ["pyqt6", "pyside6"]
|
|
28
|
+
steps:
|
|
29
|
+
- uses: actions/checkout@v4
|
|
30
|
+
with:
|
|
31
|
+
fetch-depth: 0
|
|
32
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
33
|
+
uses: actions/setup-python@v5
|
|
34
|
+
with:
|
|
35
|
+
python-version: ${{ matrix.python-version }}
|
|
36
|
+
|
|
37
|
+
- uses: tlambert03/setup-qt-libs@v1
|
|
38
|
+
- name: Setup for Qt testing
|
|
39
|
+
run: |
|
|
40
|
+
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1920x1200x24 -ac +extension GLX
|
|
41
|
+
|
|
42
|
+
- name: Install pytest and dependencies
|
|
43
|
+
run: |
|
|
44
|
+
python -m pip install --upgrade pip
|
|
45
|
+
python -m pip install -v .[viz,io,perf,misc,dev] ${{ matrix.qt-api }}
|
|
46
|
+
python -m pip list
|
|
47
|
+
export QT_API=${{ matrix.qt-api }}
|
|
48
|
+
|
|
49
|
+
- name: Test with pytest
|
|
50
|
+
if: matrix.python-version != '3.12' || matrix.qt-api != 'pyside6'
|
|
51
|
+
run: |
|
|
52
|
+
python -u -m pytest -v
|
|
53
|
+
|
|
54
|
+
- name: Test with pytest with coverage
|
|
55
|
+
if: matrix.python-version == '3.12' && matrix.qt-api == 'pyside6'
|
|
56
|
+
run: |
|
|
57
|
+
python -u -m pytest -v --cov erlab --junitxml=junit.xml
|
|
58
|
+
|
|
59
|
+
- name: Upload coverage to Codecov
|
|
60
|
+
if: matrix.python-version == '3.12' && matrix.qt-api == 'pyside6'
|
|
61
|
+
uses: codecov/codecov-action@v5
|
|
62
|
+
with:
|
|
63
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
64
|
+
|
|
65
|
+
- name: Upload test results to Codecov
|
|
66
|
+
if: ${{ matrix.python-version == '3.12' && matrix.qt-api == 'pyside6' && !cancelled() }}
|
|
67
|
+
uses: codecov/test-results-action@v1
|
|
68
|
+
with:
|
|
69
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
70
|
+
|
|
71
|
+
mypy:
|
|
72
|
+
name: Static type checking
|
|
73
|
+
runs-on: ubuntu-latest
|
|
74
|
+
steps:
|
|
75
|
+
- uses: actions/checkout@v4
|
|
76
|
+
- uses: actions/setup-python@v5
|
|
77
|
+
with:
|
|
78
|
+
python-version: "3.12"
|
|
79
|
+
|
|
80
|
+
- name: Install mypy and dependencies
|
|
81
|
+
run: |
|
|
82
|
+
python -m pip install --upgrade pip
|
|
83
|
+
python -m pip install .[viz,io,perf,misc,dev] mypy[reports,faster-cache] pyqt6
|
|
84
|
+
python -m pip list
|
|
85
|
+
|
|
86
|
+
- name: Run mypy
|
|
87
|
+
run: mypy --install-types --non-interactive --html-report mypy-report .
|
|
88
|
+
|
|
89
|
+
- name: Upload mypy results
|
|
90
|
+
uses: actions/upload-artifact@v4
|
|
91
|
+
if: always()
|
|
92
|
+
with:
|
|
93
|
+
name: mypy-report
|
|
94
|
+
path: mypy-report/
|
|
95
|
+
if-no-files-found: error
|
|
96
|
+
|
|
97
|
+
changelog:
|
|
98
|
+
name: Update changelog
|
|
99
|
+
runs-on: ubuntu-latest
|
|
100
|
+
if: github.event_name == 'push' && github.repository == 'kmnhan/erlabpy'
|
|
101
|
+
steps:
|
|
102
|
+
- uses: actions/checkout@v4
|
|
103
|
+
with:
|
|
104
|
+
fetch-depth: 0
|
|
105
|
+
|
|
106
|
+
- uses: actions/setup-python@v5
|
|
107
|
+
with:
|
|
108
|
+
python-version: "3.12"
|
|
109
|
+
|
|
110
|
+
- name: Install dependencies
|
|
111
|
+
run: |
|
|
112
|
+
python -m pip install --upgrade pip
|
|
113
|
+
python -m pip install commitizen cz-changeup
|
|
114
|
+
|
|
115
|
+
- name: Generate changelog
|
|
116
|
+
run: |
|
|
117
|
+
cz changelog
|
|
118
|
+
|
|
119
|
+
- name: Commit and push changes
|
|
120
|
+
run: |
|
|
121
|
+
git config user.name "github-actions[bot]"
|
|
122
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
123
|
+
git add .
|
|
124
|
+
if ! git diff-index --quiet HEAD; then
|
|
125
|
+
git commit -m "chore: update changelog"
|
|
126
|
+
git push
|
|
127
|
+
else
|
|
128
|
+
echo "nothing to commit, working tree clean"
|
|
129
|
+
fi
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
env:
|
|
6
|
+
FORCE_COLOR: 1
|
|
7
|
+
concurrency:
|
|
8
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
9
|
+
cancel-in-progress: true
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
release:
|
|
13
|
+
name: Release
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
concurrency:
|
|
16
|
+
group: release
|
|
17
|
+
if: |
|
|
18
|
+
github.event_name == 'workflow_dispatch' &&
|
|
19
|
+
github.repository == 'kmnhan/erlabpy'
|
|
20
|
+
environment:
|
|
21
|
+
name: pypi
|
|
22
|
+
url: https://pypi.org/p/erlab
|
|
23
|
+
permissions:
|
|
24
|
+
id-token: write
|
|
25
|
+
contents: write
|
|
26
|
+
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v4
|
|
29
|
+
with:
|
|
30
|
+
fetch-depth: 0
|
|
31
|
+
|
|
32
|
+
- name: Run commitizen
|
|
33
|
+
id: cz
|
|
34
|
+
uses: commitizen-tools/commitizen-action@master
|
|
35
|
+
with:
|
|
36
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
37
|
+
changelog_increment_filename: body.md
|
|
38
|
+
extra_requirements: "cz-changeup"
|
|
39
|
+
|
|
40
|
+
- name: Build package distributions
|
|
41
|
+
id: build
|
|
42
|
+
if: env.REVISION != env.PREVIOUS_REVISION
|
|
43
|
+
run: |
|
|
44
|
+
python -m venv venv
|
|
45
|
+
source venv/bin/activate
|
|
46
|
+
python -m pip install --upgrade build
|
|
47
|
+
python -m build
|
|
48
|
+
|
|
49
|
+
- name: Publish package distributions to PyPI
|
|
50
|
+
id: pypi-publish
|
|
51
|
+
if: env.REVISION != env.PREVIOUS_REVISION
|
|
52
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
53
|
+
with:
|
|
54
|
+
verbose: true
|
|
55
|
+
|
|
56
|
+
- name: Publish package distributions to GitHub Releases
|
|
57
|
+
id: github-release
|
|
58
|
+
if: env.REVISION != env.PREVIOUS_REVISION
|
|
59
|
+
uses: softprops/action-gh-release@v2
|
|
60
|
+
with:
|
|
61
|
+
body_path: "body.md"
|
|
62
|
+
tag_name: v${{ steps.cz.outputs.version }}
|
|
63
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
64
|
+
files: dist/*
|
erlab-3.5.1/.gitignore
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# macOS
|
|
2
|
+
.DS_Store
|
|
3
|
+
|
|
4
|
+
# Byte-compiled / optimized / DLL files
|
|
5
|
+
__pycache__/
|
|
6
|
+
*.py[cod]
|
|
7
|
+
*$py.class
|
|
8
|
+
|
|
9
|
+
# C extensions
|
|
10
|
+
*.so
|
|
11
|
+
|
|
12
|
+
# Distribution / packaging
|
|
13
|
+
.Python
|
|
14
|
+
build/
|
|
15
|
+
develop-eggs/
|
|
16
|
+
dist/
|
|
17
|
+
downloads/
|
|
18
|
+
eggs/
|
|
19
|
+
.eggs/
|
|
20
|
+
lib/
|
|
21
|
+
lib64/
|
|
22
|
+
parts/
|
|
23
|
+
sdist/
|
|
24
|
+
var/
|
|
25
|
+
wheels/
|
|
26
|
+
share/python-wheels/
|
|
27
|
+
*.egg-info/
|
|
28
|
+
.installed.cfg
|
|
29
|
+
*.egg
|
|
30
|
+
MANIFEST
|
|
31
|
+
|
|
32
|
+
# PyInstaller
|
|
33
|
+
# Usually these files are written by a python script from a template
|
|
34
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
35
|
+
*.manifest
|
|
36
|
+
*.spec
|
|
37
|
+
|
|
38
|
+
# Installer logs
|
|
39
|
+
pip-log.txt
|
|
40
|
+
pip-delete-this-directory.txt
|
|
41
|
+
|
|
42
|
+
# Unit test / coverage reports
|
|
43
|
+
htmlcov/
|
|
44
|
+
.tox/
|
|
45
|
+
.nox/
|
|
46
|
+
.coverage
|
|
47
|
+
.coverage.*
|
|
48
|
+
.cache
|
|
49
|
+
nosetests.xml
|
|
50
|
+
coverage.xml
|
|
51
|
+
*.cover
|
|
52
|
+
*.py,cover
|
|
53
|
+
.hypothesis/
|
|
54
|
+
.pytest_cache/
|
|
55
|
+
cover/
|
|
56
|
+
*.prof
|
|
57
|
+
*.pstats
|
|
58
|
+
*.pstats.png
|
|
59
|
+
*.austin
|
|
60
|
+
|
|
61
|
+
# Translations
|
|
62
|
+
*.mo
|
|
63
|
+
*.pot
|
|
64
|
+
|
|
65
|
+
# Django stuff:
|
|
66
|
+
*.log
|
|
67
|
+
local_settings.py
|
|
68
|
+
db.sqlite3
|
|
69
|
+
db.sqlite3-journal
|
|
70
|
+
|
|
71
|
+
# Flask stuff:
|
|
72
|
+
instance/
|
|
73
|
+
.webassets-cache
|
|
74
|
+
|
|
75
|
+
# Scrapy stuff:
|
|
76
|
+
.scrapy
|
|
77
|
+
|
|
78
|
+
# Sphinx documentation
|
|
79
|
+
docs/_build/
|
|
80
|
+
docs/source/generated
|
|
81
|
+
|
|
82
|
+
# PyBuilder
|
|
83
|
+
.pybuilder/
|
|
84
|
+
target/
|
|
85
|
+
|
|
86
|
+
# Jupyter Notebook
|
|
87
|
+
.ipynb_checkpoints
|
|
88
|
+
|
|
89
|
+
# IPython
|
|
90
|
+
profile_default/
|
|
91
|
+
ipython_config.py
|
|
92
|
+
|
|
93
|
+
# pyenv
|
|
94
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
95
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
96
|
+
# .python-version
|
|
97
|
+
|
|
98
|
+
# pipenv
|
|
99
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
100
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
101
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
102
|
+
# install all needed dependencies.
|
|
103
|
+
#Pipfile.lock
|
|
104
|
+
|
|
105
|
+
# poetry
|
|
106
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
107
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
108
|
+
# commonly ignored for libraries.
|
|
109
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
110
|
+
#poetry.lock
|
|
111
|
+
|
|
112
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
113
|
+
__pypackages__/
|
|
114
|
+
|
|
115
|
+
# Celery stuff
|
|
116
|
+
celerybeat-schedule
|
|
117
|
+
celerybeat.pid
|
|
118
|
+
|
|
119
|
+
# SageMath parsed files
|
|
120
|
+
*.sage.py
|
|
121
|
+
|
|
122
|
+
# Environments
|
|
123
|
+
.env
|
|
124
|
+
.venv
|
|
125
|
+
env/
|
|
126
|
+
venv/
|
|
127
|
+
ENV/
|
|
128
|
+
env.bak/
|
|
129
|
+
venv.bak/
|
|
130
|
+
|
|
131
|
+
# Spyder project settings
|
|
132
|
+
.spyderproject
|
|
133
|
+
.spyproject
|
|
134
|
+
|
|
135
|
+
# Rope project settings
|
|
136
|
+
.ropeproject
|
|
137
|
+
|
|
138
|
+
# mkdocs documentation
|
|
139
|
+
/site
|
|
140
|
+
|
|
141
|
+
# mypy
|
|
142
|
+
.mypy_cache/
|
|
143
|
+
mypy-report/
|
|
144
|
+
.dmypy.json
|
|
145
|
+
dmypy.json
|
|
146
|
+
|
|
147
|
+
# Pyre type checker
|
|
148
|
+
.pyre/
|
|
149
|
+
|
|
150
|
+
# pytype static type analyzer
|
|
151
|
+
.pytype/
|
|
152
|
+
|
|
153
|
+
# Cython debug symbols
|
|
154
|
+
cython_debug/
|
|
155
|
+
|
|
156
|
+
# PyCharm
|
|
157
|
+
# JetBrains specific template is maintainted in a separate JetBrains.gitignore that can
|
|
158
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
159
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
160
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
161
|
+
#.idea/
|
|
162
|
+
|
|
163
|
+
# VS Code
|
|
164
|
+
.vscode/*
|
|
165
|
+
|
|
166
|
+
# Misc. files
|
|
167
|
+
erlab.accessors.rst
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
ci:
|
|
2
|
+
autoupdate_commit_msg: "ci(pre-commit): pre-commit autoupdate"
|
|
3
|
+
autofix_commit_msg: "style: pre-commit auto fixes [...]"
|
|
4
|
+
autoupdate_schedule: monthly
|
|
5
|
+
|
|
6
|
+
default_install_hook_types: [pre-commit, commit-msg]
|
|
7
|
+
|
|
8
|
+
repos:
|
|
9
|
+
# Meta hooks
|
|
10
|
+
- repo: meta
|
|
11
|
+
hooks:
|
|
12
|
+
- id: check-hooks-apply
|
|
13
|
+
- id: check-useless-excludes
|
|
14
|
+
|
|
15
|
+
# Security & credential scanning/alerting
|
|
16
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
17
|
+
rev: v5.0.0
|
|
18
|
+
hooks:
|
|
19
|
+
- id: check-ast
|
|
20
|
+
- id: check-builtin-literals
|
|
21
|
+
- id: check-case-conflict
|
|
22
|
+
- id: check-merge-conflict
|
|
23
|
+
- id: check-toml
|
|
24
|
+
- id: check-vcs-permalinks
|
|
25
|
+
- id: check-yaml
|
|
26
|
+
- id: debug-statements
|
|
27
|
+
- id: detect-private-key
|
|
28
|
+
- id: end-of-file-fixer
|
|
29
|
+
- id: mixed-line-ending
|
|
30
|
+
- id: trailing-whitespace
|
|
31
|
+
|
|
32
|
+
# Pygrep hooks
|
|
33
|
+
- repo: https://github.com/pre-commit/pygrep-hooks
|
|
34
|
+
rev: v1.10.0
|
|
35
|
+
hooks:
|
|
36
|
+
- id: rst-backticks
|
|
37
|
+
- id: rst-directive-colons
|
|
38
|
+
- id: rst-inline-touching-normal
|
|
39
|
+
- id: text-unicode-replacement-char
|
|
40
|
+
- id: python-use-type-annotations
|
|
41
|
+
|
|
42
|
+
# Lint and format with ruff
|
|
43
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
44
|
+
# Ruff version.
|
|
45
|
+
rev: v0.8.6
|
|
46
|
+
hooks:
|
|
47
|
+
# Run the linter.
|
|
48
|
+
- id: ruff
|
|
49
|
+
args: [--fix, --show-fixes]
|
|
50
|
+
# Run the formatter.
|
|
51
|
+
- id: ruff-format
|
|
52
|
+
|
|
53
|
+
# Commitizen
|
|
54
|
+
- repo: https://github.com/commitizen-tools/commitizen
|
|
55
|
+
rev: v4.1.0
|
|
56
|
+
hooks:
|
|
57
|
+
- id: commitizen
|
|
58
|
+
additional_dependencies: [cz-changeup]
|
|
59
|
+
- id: commitizen-branch
|
|
60
|
+
additional_dependencies: [cz-changeup]
|
|
61
|
+
stages: [pre-push]
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Read the Docs configuration file for Sphinx projects
|
|
2
|
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
3
|
+
|
|
4
|
+
# Required
|
|
5
|
+
version: 2
|
|
6
|
+
|
|
7
|
+
# Set the OS, Python version and other tools you might need
|
|
8
|
+
build:
|
|
9
|
+
os: ubuntu-24.04
|
|
10
|
+
tools:
|
|
11
|
+
python: "3.11"
|
|
12
|
+
|
|
13
|
+
# Build documentation in the "docs/" directory with Sphinx
|
|
14
|
+
sphinx:
|
|
15
|
+
configuration: docs/source/conf.py
|
|
16
|
+
fail_on_warning: true
|
|
17
|
+
|
|
18
|
+
# Optionally build your docs in additional formats such as PDF and ePub
|
|
19
|
+
formats:
|
|
20
|
+
- pdf
|
|
21
|
+
|
|
22
|
+
# Optional but recommended, declare the Python requirements required
|
|
23
|
+
# to build your documentation
|
|
24
|
+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
|
|
25
|
+
python:
|
|
26
|
+
install:
|
|
27
|
+
- requirements: docs/requirements.txt
|