py-aisim 5.0.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.
- py_aisim-5.0.1/.github/workflows/workflow.yml +136 -0
- py_aisim-5.0.1/.gitignore +121 -0
- py_aisim-5.0.1/.pre-commit-config.yaml +7 -0
- py_aisim-5.0.1/.readthedocs.yml +16 -0
- py_aisim-5.0.1/LICENSE +674 -0
- py_aisim-5.0.1/PKG-INFO +784 -0
- py_aisim-5.0.1/README.md +79 -0
- py_aisim-5.0.1/aisim/__init__.py +45 -0
- py_aisim-5.0.1/aisim/atoms.py +362 -0
- py_aisim-5.0.1/aisim/beam.py +329 -0
- py_aisim-5.0.1/aisim/convert.py +159 -0
- py_aisim-5.0.1/aisim/det.py +130 -0
- py_aisim-5.0.1/aisim/dist.py +104 -0
- py_aisim-5.0.1/aisim/prop.py +283 -0
- py_aisim-5.0.1/aisim/zern.py +304 -0
- py_aisim-5.0.1/docs/CONTRIBUTING.rst +48 -0
- py_aisim-5.0.1/docs/Makefile +20 -0
- py_aisim-5.0.1/docs/aisim.rst +54 -0
- py_aisim-5.0.1/docs/conf.py +64 -0
- py_aisim-5.0.1/docs/coverage.svg +21 -0
- py_aisim-5.0.1/docs/dev.rst +5 -0
- py_aisim-5.0.1/docs/examples/basic-usage.ipynb +213 -0
- py_aisim-5.0.1/docs/examples/box-pulse.ipynb +291 -0
- py_aisim-5.0.1/docs/examples/data/experimental_data.json +29 -0
- py_aisim-5.0.1/docs/examples/data/wavefront.txt +36 -0
- py_aisim-5.0.1/docs/examples/multiport-ai.ipynb +300 -0
- py_aisim-5.0.1/docs/examples/multiport_ai.jpeg +0 -0
- py_aisim-5.0.1/docs/examples/rabi-oscillations.ipynb +362 -0
- py_aisim-5.0.1/docs/examples/rabi-oscillations.png +0 -0
- py_aisim-5.0.1/docs/examples/wavefront-aberrations.ipynb +335 -0
- py_aisim-5.0.1/docs/index.rst +31 -0
- py_aisim-5.0.1/docs/install.rst +16 -0
- py_aisim-5.0.1/docs/make.bat +35 -0
- py_aisim-5.0.1/docs/usage.rst +107 -0
- py_aisim-5.0.1/py_aisim.egg-info/PKG-INFO +784 -0
- py_aisim-5.0.1/py_aisim.egg-info/SOURCES.txt +48 -0
- py_aisim-5.0.1/py_aisim.egg-info/dependency_links.txt +1 -0
- py_aisim-5.0.1/py_aisim.egg-info/requires.txt +15 -0
- py_aisim-5.0.1/py_aisim.egg-info/scm_file_list.json +45 -0
- py_aisim-5.0.1/py_aisim.egg-info/scm_version.json +8 -0
- py_aisim-5.0.1/py_aisim.egg-info/top_level.txt +1 -0
- py_aisim-5.0.1/pyproject.toml +45 -0
- py_aisim-5.0.1/setup.cfg +4 -0
- py_aisim-5.0.1/tests/atoms_test.py +112 -0
- py_aisim-5.0.1/tests/beam_test.py +72 -0
- py_aisim-5.0.1/tests/convert_test.py +37 -0
- py_aisim-5.0.1/tests/det_test.py +42 -0
- py_aisim-5.0.1/tests/prop_test.py +158 -0
- py_aisim-5.0.1/tests/wf_test.py +70 -0
- py_aisim-5.0.1/tests/zern_test.py +106 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
|
|
2
|
+
name: tests # also sets the name of the tests badge, so do not change for now
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
release:
|
|
7
|
+
types: [published]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
15
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v7
|
|
18
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
19
|
+
uses: actions/setup-python@v7
|
|
20
|
+
with:
|
|
21
|
+
python-version: ${{ matrix.python-version }}
|
|
22
|
+
cache: pip
|
|
23
|
+
- name: Install dependencies
|
|
24
|
+
run: |
|
|
25
|
+
python -m pip install --upgrade pip
|
|
26
|
+
pip install . pytest
|
|
27
|
+
- name: Run pytest
|
|
28
|
+
run: pytest .
|
|
29
|
+
|
|
30
|
+
coverage:
|
|
31
|
+
needs:
|
|
32
|
+
- test
|
|
33
|
+
runs-on: ubuntu-latest
|
|
34
|
+
|
|
35
|
+
steps:
|
|
36
|
+
- uses: actions/checkout@v7
|
|
37
|
+
with:
|
|
38
|
+
fetch-depth: 0
|
|
39
|
+
- name: Set up Python
|
|
40
|
+
uses: actions/setup-python@v7
|
|
41
|
+
with:
|
|
42
|
+
python-version: 3.13
|
|
43
|
+
cache: pip
|
|
44
|
+
- name: Install dependencies
|
|
45
|
+
run: |
|
|
46
|
+
python -m pip install --upgrade pip
|
|
47
|
+
pip install . pytest pytest-cov "genbadge[coverage]"
|
|
48
|
+
- name: Create coverage report
|
|
49
|
+
run: |
|
|
50
|
+
coverage run -m pytest .
|
|
51
|
+
coverage report -m
|
|
52
|
+
- name: Create coverage badge
|
|
53
|
+
run: |
|
|
54
|
+
coverage xml
|
|
55
|
+
genbadge coverage --local -i coverage.xml -o docs/coverage.svg
|
|
56
|
+
- name: Verify Changed files
|
|
57
|
+
uses: tj-actions/verify-changed-files@v20
|
|
58
|
+
id: verify-changed-files
|
|
59
|
+
with:
|
|
60
|
+
files: docs/coverage.svg
|
|
61
|
+
- name: Commit files
|
|
62
|
+
if: steps.verify-changed-files.outputs.files_changed == 'true'
|
|
63
|
+
run: |
|
|
64
|
+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
|
65
|
+
git config --local user.name "github-actions[bot]"
|
|
66
|
+
git add docs/coverage.svg
|
|
67
|
+
git commit -m "Updated coverage.svg"
|
|
68
|
+
- name: Push changes
|
|
69
|
+
if: steps.verify-changed-files.outputs.files_changed == 'true'
|
|
70
|
+
uses: ad-m/github-push-action@master
|
|
71
|
+
with:
|
|
72
|
+
github_token: ${{ secrets.github_token }}
|
|
73
|
+
branch: ${{ github.ref }}
|
|
74
|
+
|
|
75
|
+
build:
|
|
76
|
+
name: Build distribution
|
|
77
|
+
needs:
|
|
78
|
+
- test
|
|
79
|
+
runs-on: ubuntu-latest
|
|
80
|
+
steps:
|
|
81
|
+
- uses: actions/checkout@v7
|
|
82
|
+
with:
|
|
83
|
+
fetch-depth: 0 # setuptools_scm needs the tags to determine the version
|
|
84
|
+
- name: Install uv
|
|
85
|
+
uses: astral-sh/setup-uv@v10.3.1
|
|
86
|
+
- name: Build binary wheel and a source tarball
|
|
87
|
+
run: uv build
|
|
88
|
+
- name: Store the distribution packages
|
|
89
|
+
uses: actions/upload-artifact@v7
|
|
90
|
+
with:
|
|
91
|
+
name: python-package-distributions
|
|
92
|
+
path: dist/
|
|
93
|
+
|
|
94
|
+
publish-to-testpypi:
|
|
95
|
+
name: Publish to TestPyPI
|
|
96
|
+
if: github.event_name == 'release'
|
|
97
|
+
needs:
|
|
98
|
+
- build
|
|
99
|
+
runs-on: ubuntu-latest
|
|
100
|
+
|
|
101
|
+
environment:
|
|
102
|
+
name: testpypi
|
|
103
|
+
url: https://test.pypi.org/p/py-aisim
|
|
104
|
+
|
|
105
|
+
permissions:
|
|
106
|
+
id-token: write # IMPORTANT: mandatory for trusted publishing
|
|
107
|
+
|
|
108
|
+
steps:
|
|
109
|
+
- name: Download all the dists
|
|
110
|
+
uses: actions/download-artifact@v8
|
|
111
|
+
with:
|
|
112
|
+
name: python-package-distributions
|
|
113
|
+
path: dist/
|
|
114
|
+
- name: Publish distribution to TestPyPI
|
|
115
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
116
|
+
with:
|
|
117
|
+
repository-url: https://test.pypi.org/legacy/
|
|
118
|
+
|
|
119
|
+
publish-to-pypi:
|
|
120
|
+
name: Publish to PyPI
|
|
121
|
+
if: github.event_name == 'release' && !github.event.release.prerelease
|
|
122
|
+
needs: build
|
|
123
|
+
runs-on: ubuntu-latest
|
|
124
|
+
environment:
|
|
125
|
+
name: pypi
|
|
126
|
+
url: https://pypi.org/project/py-aisim
|
|
127
|
+
permissions:
|
|
128
|
+
id-token: write # IMPORTANT: mandatory for trusted publishing
|
|
129
|
+
steps:
|
|
130
|
+
- name: Download distributions
|
|
131
|
+
uses: actions/download-artifact@v8
|
|
132
|
+
with:
|
|
133
|
+
name: python-package-distributions
|
|
134
|
+
path: dist/
|
|
135
|
+
- name: Publish to PyPI
|
|
136
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
.hypothesis/
|
|
50
|
+
.pytest_cache/
|
|
51
|
+
|
|
52
|
+
# Translations
|
|
53
|
+
*.mo
|
|
54
|
+
*.pot
|
|
55
|
+
|
|
56
|
+
# Django stuff:
|
|
57
|
+
*.log
|
|
58
|
+
local_settings.py
|
|
59
|
+
db.sqlite3
|
|
60
|
+
|
|
61
|
+
# Flask stuff:
|
|
62
|
+
instance/
|
|
63
|
+
.webassets-cache
|
|
64
|
+
|
|
65
|
+
# Scrapy stuff:
|
|
66
|
+
.scrapy
|
|
67
|
+
|
|
68
|
+
# Sphinx documentation
|
|
69
|
+
docs/_build/
|
|
70
|
+
|
|
71
|
+
# PyBuilder
|
|
72
|
+
target/
|
|
73
|
+
|
|
74
|
+
# Jupyter Notebook
|
|
75
|
+
.ipynb_checkpoints
|
|
76
|
+
|
|
77
|
+
# IPython
|
|
78
|
+
profile_default/
|
|
79
|
+
ipython_config.py
|
|
80
|
+
|
|
81
|
+
# pyenv
|
|
82
|
+
.python-version
|
|
83
|
+
|
|
84
|
+
# celery beat schedule file
|
|
85
|
+
celerybeat-schedule
|
|
86
|
+
|
|
87
|
+
# SageMath parsed files
|
|
88
|
+
*.sage.py
|
|
89
|
+
|
|
90
|
+
# Environments
|
|
91
|
+
.env
|
|
92
|
+
.venv
|
|
93
|
+
env/
|
|
94
|
+
venv/
|
|
95
|
+
ENV/
|
|
96
|
+
env.bak/
|
|
97
|
+
venv.bak/
|
|
98
|
+
|
|
99
|
+
# Spyder project settings
|
|
100
|
+
.spyderproject
|
|
101
|
+
.spyproject
|
|
102
|
+
|
|
103
|
+
# Rope project settings
|
|
104
|
+
.ropeproject
|
|
105
|
+
|
|
106
|
+
# mkdocs documentation
|
|
107
|
+
/site
|
|
108
|
+
|
|
109
|
+
# mypy
|
|
110
|
+
.mypy_cache/
|
|
111
|
+
.dmypy.json
|
|
112
|
+
dmypy.json
|
|
113
|
+
|
|
114
|
+
# Pyre type checker
|
|
115
|
+
.pyre/
|
|
116
|
+
|
|
117
|
+
# OS specific files
|
|
118
|
+
.DS_Store
|
|
119
|
+
|
|
120
|
+
# Visual Studio Code
|
|
121
|
+
.vscode/
|