apsbits 1.0.0__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.
- apsbits-1.0.0/.github/ISSUE_TEMPLATE/bug_report.md +30 -0
- apsbits-1.0.0/.github/ISSUE_TEMPLATE/config.yml +1 -0
- apsbits-1.0.0/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- apsbits-1.0.0/.github/ISSUE_TEMPLATE/other.md +10 -0
- apsbits-1.0.0/.github/ISSUE_TEMPLATE/question-issue-template.md +10 -0
- apsbits-1.0.0/.github/PULL_REQUEST_TEMPLATE.md +16 -0
- apsbits-1.0.0/.github/dependabot.yml +12 -0
- apsbits-1.0.0/.github/workflows/code.yml +164 -0
- apsbits-1.0.0/.github/workflows/docs.yml +72 -0
- apsbits-1.0.0/.github/workflows/pypi.yml +58 -0
- apsbits-1.0.0/.gitignore +177 -0
- apsbits-1.0.0/.pre-commit-config.yaml +32 -0
- apsbits-1.0.0/LICENSE +48 -0
- apsbits-1.0.0/PKG-INFO +195 -0
- apsbits-1.0.0/README.md +82 -0
- apsbits-1.0.0/apsbits.egg-info/PKG-INFO +195 -0
- apsbits-1.0.0/apsbits.egg-info/SOURCES.txt +91 -0
- apsbits-1.0.0/apsbits.egg-info/dependency_links.txt +1 -0
- apsbits-1.0.0/apsbits.egg-info/entry_points.txt +2 -0
- apsbits-1.0.0/apsbits.egg-info/requires.txt +44 -0
- apsbits-1.0.0/apsbits.egg-info/top_level.txt +1 -0
- apsbits-1.0.0/docs/Makefile +20 -0
- apsbits-1.0.0/docs/make.bat +35 -0
- apsbits-1.0.0/docs/resources/create-repository-name.webp +0 -0
- apsbits-1.0.0/docs/resources/create-repository-owner.webp +0 -0
- apsbits-1.0.0/docs/resources/use-this-template-button.webp +0 -0
- apsbits-1.0.0/docs/source/_static/.gitkeep +0 -0
- apsbits-1.0.0/docs/source/api/callbacks.rst +16 -0
- apsbits-1.0.0/docs/source/api/configs.rst +44 -0
- apsbits-1.0.0/docs/source/api/core.rst +19 -0
- apsbits-1.0.0/docs/source/api/devices.rst +309 -0
- apsbits-1.0.0/docs/source/api/index.rst +42 -0
- apsbits-1.0.0/docs/source/api/plans.rst +15 -0
- apsbits-1.0.0/docs/source/api/startup.rst +19 -0
- apsbits-1.0.0/docs/source/api/utils.rst +28 -0
- apsbits-1.0.0/docs/source/conf.py +87 -0
- apsbits-1.0.0/docs/source/console.rst +62 -0
- apsbits-1.0.0/docs/source/demo.ipynb +232 -0
- apsbits-1.0.0/docs/source/guides/dm.md +85 -0
- apsbits-1.0.0/docs/source/guides/index.rst +13 -0
- apsbits-1.0.0/docs/source/guides/template_sync.rst +133 -0
- apsbits-1.0.0/docs/source/index.rst +71 -0
- apsbits-1.0.0/docs/source/install.rst +70 -0
- apsbits-1.0.0/docs/source/license.rst +6 -0
- apsbits-1.0.0/docs/source/logging_config.rst +76 -0
- apsbits-1.0.0/docs/source/notebook.rst +63 -0
- apsbits-1.0.0/docs/source/qserver.rst +94 -0
- apsbits-1.0.0/docs/source/script.rst +49 -0
- apsbits-1.0.0/docs/source/sessions.rst +15 -0
- apsbits-1.0.0/docs/template_creation.md +31 -0
- apsbits-1.0.0/pyproject.toml +235 -0
- apsbits-1.0.0/setup.cfg +4 -0
- apsbits-1.0.0/src/apsbits/__init__.py +18 -0
- apsbits-1.0.0/src/apsbits/_version.py +21 -0
- apsbits-1.0.0/src/apsbits/core/__init__.py +11 -0
- apsbits-1.0.0/src/apsbits/core/best_effort_init.py +51 -0
- apsbits-1.0.0/src/apsbits/core/catalog_init.py +36 -0
- apsbits-1.0.0/src/apsbits/core/run_engine_init.py +118 -0
- apsbits-1.0.0/src/apsbits/demo_instrument/README.md +1 -0
- apsbits-1.0.0/src/apsbits/demo_instrument/__init__.py +22 -0
- apsbits-1.0.0/src/apsbits/demo_instrument/callbacks/__init__.py +1 -0
- apsbits-1.0.0/src/apsbits/demo_instrument/callbacks/nexus_data_file_writer.py +58 -0
- apsbits-1.0.0/src/apsbits/demo_instrument/callbacks/spec_data_file_writer.py +97 -0
- apsbits-1.0.0/src/apsbits/demo_instrument/configs/__init__.py +1 -0
- apsbits-1.0.0/src/apsbits/demo_instrument/configs/devices.yml +52 -0
- apsbits-1.0.0/src/apsbits/demo_instrument/configs/devices_aps_only.yml +6 -0
- apsbits-1.0.0/src/apsbits/demo_instrument/configs/iconfig.yml +82 -0
- apsbits-1.0.0/src/apsbits/demo_instrument/configs/logging.yml +41 -0
- apsbits-1.0.0/src/apsbits/demo_instrument/devices/__init__.py +1 -0
- apsbits-1.0.0/src/apsbits/demo_instrument/plans/__init__.py +8 -0
- apsbits-1.0.0/src/apsbits/demo_instrument/plans/dm_plans.py +111 -0
- apsbits-1.0.0/src/apsbits/demo_instrument/plans/sim_plans.py +69 -0
- apsbits-1.0.0/src/apsbits/demo_instrument/startup.py +76 -0
- apsbits-1.0.0/src/apsbits/demo_qserver/qs-config.yml +51 -0
- apsbits-1.0.0/src/apsbits/demo_qserver/qs_host.sh +231 -0
- apsbits-1.0.0/src/apsbits/demo_qserver/user_group_permissions.yaml +46 -0
- apsbits-1.0.0/src/apsbits/tests/__init__.py +1 -0
- apsbits-1.0.0/src/apsbits/tests/conftest.py +39 -0
- apsbits-1.0.0/src/apsbits/tests/test_config.py +113 -0
- apsbits-1.0.0/src/apsbits/tests/test_device_factories.py +44 -0
- apsbits-1.0.0/src/apsbits/tests/test_general.py +98 -0
- apsbits-1.0.0/src/apsbits/tests/test_stored_dict.py +139 -0
- apsbits-1.0.0/src/apsbits/utils/__init__.py +1 -0
- apsbits-1.0.0/src/apsbits/utils/aps_functions.py +67 -0
- apsbits-1.0.0/src/apsbits/utils/config_loaders.py +169 -0
- apsbits-1.0.0/src/apsbits/utils/controls_setup.py +107 -0
- apsbits-1.0.0/src/apsbits/utils/create_new_instrument.py +129 -0
- apsbits-1.0.0/src/apsbits/utils/helper_functions.py +123 -0
- apsbits-1.0.0/src/apsbits/utils/logging_setup.py +211 -0
- apsbits-1.0.0/src/apsbits/utils/make_devices.py +162 -0
- apsbits-1.0.0/src/apsbits/utils/metadata.py +96 -0
- apsbits-1.0.0/src/apsbits/utils/sim_creator.py +202 -0
- apsbits-1.0.0/src/apsbits/utils/stored_dict.py +174 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: ''
|
|
5
|
+
labels: 'bug'
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Describe the bug**
|
|
11
|
+
A clear and concise description of what the bug is.
|
|
12
|
+
|
|
13
|
+
**To Reproduce**
|
|
14
|
+
Steps to reproduce the behavior:
|
|
15
|
+
1. Code with explanation
|
|
16
|
+
2. How to run code
|
|
17
|
+
3. The error
|
|
18
|
+
|
|
19
|
+
**Expected behavior**
|
|
20
|
+
A clear and concise description of what you expected to happen.
|
|
21
|
+
|
|
22
|
+
**Screenshots**
|
|
23
|
+
If applicable, add screenshots to help explain your problem.
|
|
24
|
+
|
|
25
|
+
**Environment (please complete the following information):**
|
|
26
|
+
- OS: [e.g. Linux]
|
|
27
|
+
- Package versions implicated in the error (torch, mdlearn versions, etc)
|
|
28
|
+
|
|
29
|
+
**Additional context**
|
|
30
|
+
Add any other context about the problem here.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
blank_issues_enabled: false
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an idea for this project
|
|
4
|
+
title: ''
|
|
5
|
+
labels: 'enhancement'
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Is your feature request related to a problem? Please describe.**
|
|
11
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
12
|
+
|
|
13
|
+
**Describe the solution you'd like**
|
|
14
|
+
A clear and concise description of what you want to happen.
|
|
15
|
+
|
|
16
|
+
**Describe alternatives you've considered**
|
|
17
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
|
18
|
+
|
|
19
|
+
**Additional context**
|
|
20
|
+
Add any other context or screenshots about the feature request here.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Description
|
|
2
|
+
|
|
3
|
+
Please include a summary of the change and (optionally) which issue is fixed. Please also include
|
|
4
|
+
relevant motivation and context.
|
|
5
|
+
|
|
6
|
+
Fixes # (issue)
|
|
7
|
+
|
|
8
|
+
## Type of change
|
|
9
|
+
|
|
10
|
+
Choose which options apply, and delete the ones which do not apply.
|
|
11
|
+
|
|
12
|
+
- Bug fix (non-breaking change that fixes an issue)
|
|
13
|
+
- New feature (non-breaking change that adds functionality)
|
|
14
|
+
- Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
|
15
|
+
- Documentation update
|
|
16
|
+
- Code maintenance/cleanup
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Set update schedule for GitHub Actions
|
|
2
|
+
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot
|
|
3
|
+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
|
4
|
+
|
|
5
|
+
version: 2
|
|
6
|
+
updates:
|
|
7
|
+
|
|
8
|
+
- package-ecosystem: "github-actions"
|
|
9
|
+
directory: "/"
|
|
10
|
+
schedule:
|
|
11
|
+
# Check for updates to GitHub Actions every week
|
|
12
|
+
interval: "weekly"
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
name: Unit Tests & Code Coverage
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
# Triggers the workflow on push or pull request events but only for the main branch
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
pull_request:
|
|
9
|
+
branches:
|
|
10
|
+
- main
|
|
11
|
+
workflow_dispatch: # allow manual triggering
|
|
12
|
+
|
|
13
|
+
defaults:
|
|
14
|
+
run:
|
|
15
|
+
shell: bash -l {0}
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
lint:
|
|
19
|
+
name: Code style
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v4
|
|
24
|
+
|
|
25
|
+
- uses: actions/setup-python@v5
|
|
26
|
+
with:
|
|
27
|
+
python-version: "3.11"
|
|
28
|
+
|
|
29
|
+
- name: Upgrade pip & test with pre-commit
|
|
30
|
+
run: |
|
|
31
|
+
set -vxeuo pipefail
|
|
32
|
+
python -m pip install --upgrade pip
|
|
33
|
+
python -m pip install pre-commit
|
|
34
|
+
pre-commit run --all-files
|
|
35
|
+
|
|
36
|
+
test-matrix:
|
|
37
|
+
name: Python ${{ matrix.python-version }} # - Redis ${{ matrix.redis-version }}
|
|
38
|
+
runs-on: ubuntu-latest
|
|
39
|
+
needs: lint
|
|
40
|
+
strategy:
|
|
41
|
+
matrix:
|
|
42
|
+
python-version:
|
|
43
|
+
- "3.11"
|
|
44
|
+
- "3.12"
|
|
45
|
+
# - "3.13" waiting for upstream packages
|
|
46
|
+
# redis-version:
|
|
47
|
+
# # - "6"
|
|
48
|
+
# - "7"
|
|
49
|
+
max-parallel: 5
|
|
50
|
+
env:
|
|
51
|
+
DISPLAY: ":99.0"
|
|
52
|
+
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/checkout@v4
|
|
55
|
+
|
|
56
|
+
- name: Install OS libraries to test Linux PyQt apps
|
|
57
|
+
run: |
|
|
58
|
+
sudo apt update -y
|
|
59
|
+
sudo apt install -y \
|
|
60
|
+
libxcb-icccm4 \
|
|
61
|
+
libxcb-image0 \
|
|
62
|
+
libxcb-keysyms1 \
|
|
63
|
+
libxcb-randr0 \
|
|
64
|
+
libxcb-render-util0 \
|
|
65
|
+
libxcb-xinerama0 \
|
|
66
|
+
libxcb-xfixes0 \
|
|
67
|
+
libxkbcommon-x11-0 \
|
|
68
|
+
screen \
|
|
69
|
+
x11-utils \
|
|
70
|
+
xvfb
|
|
71
|
+
|
|
72
|
+
# FIXME: conflicts if redis is running on host (local runners)
|
|
73
|
+
# - name: Start Redis
|
|
74
|
+
# uses: supercharge/redis-github-action@1.7.0
|
|
75
|
+
# with:
|
|
76
|
+
# redis-version: ${{ matrix.redis-version }}
|
|
77
|
+
# redis-remove-container: true # false by default
|
|
78
|
+
|
|
79
|
+
- name: Create environment Python ${{ matrix.python-version }} # - Redis ${{ matrix.redis-version }}
|
|
80
|
+
# needed for Unpack step
|
|
81
|
+
uses: mamba-org/setup-micromamba@v2
|
|
82
|
+
with:
|
|
83
|
+
cache-environment: true
|
|
84
|
+
cache-environment-key: env-key-${{ matrix.python-version }}
|
|
85
|
+
condarc: |
|
|
86
|
+
channels:
|
|
87
|
+
- conda-forge
|
|
88
|
+
- nodefaults
|
|
89
|
+
channel-priority: flexible
|
|
90
|
+
# environment-file: environment.yml
|
|
91
|
+
environment-name: anaconda-test-env-py-${{ matrix.python-version }} # -${{ matrix.redis-version }}
|
|
92
|
+
create-args: >-
|
|
93
|
+
coveralls
|
|
94
|
+
pytest
|
|
95
|
+
pytest-cov
|
|
96
|
+
pytest-qt
|
|
97
|
+
pytest-xvfb
|
|
98
|
+
python=${{ matrix.python-version }}
|
|
99
|
+
setuptools-scm
|
|
100
|
+
pyqt>5.15
|
|
101
|
+
pyepics
|
|
102
|
+
|
|
103
|
+
- name: Install this package with pip
|
|
104
|
+
shell: bash -l {0}
|
|
105
|
+
run: |
|
|
106
|
+
set -vxeuo pipefail
|
|
107
|
+
pip install -e .
|
|
108
|
+
|
|
109
|
+
- name: Run tests with pytest & coverage
|
|
110
|
+
shell: bash -l {0}
|
|
111
|
+
run: |
|
|
112
|
+
set -vxeuo pipefail
|
|
113
|
+
coverage run --concurrency=thread --parallel-mode -m pytest -vvv --exitfirst .
|
|
114
|
+
coverage combine
|
|
115
|
+
coverage report --precision 3
|
|
116
|
+
|
|
117
|
+
- name: Upload coverage data to coveralls.io
|
|
118
|
+
shell: bash -l {0}
|
|
119
|
+
run: |
|
|
120
|
+
set -vxeuo pipefail
|
|
121
|
+
micromamba list coveralls
|
|
122
|
+
which coveralls
|
|
123
|
+
coveralls debug
|
|
124
|
+
if [ "${GITHUB_TOKEN}" != "" ]; then
|
|
125
|
+
# only upload from GitHub runner
|
|
126
|
+
coveralls --service=github
|
|
127
|
+
else
|
|
128
|
+
echo "No credentials for upload to coveralls."
|
|
129
|
+
fi
|
|
130
|
+
env:
|
|
131
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
132
|
+
COVERALLS_FLAG_NAME: ${{ matrix.python-version }} # -${{ matrix.redis-version }}
|
|
133
|
+
COVERALLS_PARALLEL: true
|
|
134
|
+
|
|
135
|
+
- name: IPython Startup Test
|
|
136
|
+
shell: bash -l {0}
|
|
137
|
+
run: |
|
|
138
|
+
set -vxeuo pipefail
|
|
139
|
+
ipython -c "from apsbits.demo_instrument.startup import *; RE(make_devices())"
|
|
140
|
+
|
|
141
|
+
# https://coveralls-python.readthedocs.io/en/latest/usage/configuration.html#github-actions-support
|
|
142
|
+
coveralls:
|
|
143
|
+
name: Report unit test coverage to coveralls
|
|
144
|
+
needs: test-matrix
|
|
145
|
+
runs-on: ubuntu-latest
|
|
146
|
+
container: python:3-slim
|
|
147
|
+
|
|
148
|
+
steps:
|
|
149
|
+
- name: Gather coverage and report to Coveralls
|
|
150
|
+
run: |
|
|
151
|
+
set -vxeuo pipefail
|
|
152
|
+
echo "Finally!"
|
|
153
|
+
pip3 install --upgrade coveralls
|
|
154
|
+
# debug mode: output prepared json and reported files list to stdout
|
|
155
|
+
# https://coveralls-python.readthedocs.io/en/latest/troubleshooting.html
|
|
156
|
+
coveralls debug
|
|
157
|
+
if [ "${GITHUB_TOKEN}" != "" ]; then
|
|
158
|
+
# only upload from GitHub runner
|
|
159
|
+
coveralls --service=github --finish
|
|
160
|
+
else
|
|
161
|
+
echo "No credentials for upload to coveralls."
|
|
162
|
+
fi
|
|
163
|
+
env:
|
|
164
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
name: Publish Sphinx docs to GitHub Pages
|
|
2
|
+
# see: https://github.com/marketplace/actions/sphinx-to-github-pages
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
# Build the docs on pushes to main branch, PRs to main branch, and new tags.
|
|
6
|
+
# Publish only on demand.
|
|
7
|
+
push:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
tags:
|
|
11
|
+
- '*' # all tags
|
|
12
|
+
pull_request:
|
|
13
|
+
branches:
|
|
14
|
+
- main
|
|
15
|
+
workflow_dispatch: # allow manual triggering
|
|
16
|
+
inputs:
|
|
17
|
+
deploy:
|
|
18
|
+
description: 'Deploy documentation'
|
|
19
|
+
type: boolean
|
|
20
|
+
required: true
|
|
21
|
+
default: false
|
|
22
|
+
|
|
23
|
+
defaults:
|
|
24
|
+
run:
|
|
25
|
+
shell: bash -l {0}
|
|
26
|
+
|
|
27
|
+
jobs:
|
|
28
|
+
|
|
29
|
+
pages:
|
|
30
|
+
name: Publish documentation
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
|
|
33
|
+
steps:
|
|
34
|
+
|
|
35
|
+
- name: Deploy Information
|
|
36
|
+
if: ${{ github.event.inputs.deploy }}
|
|
37
|
+
run: |
|
|
38
|
+
echo "The docs will be published from this workflow run."
|
|
39
|
+
|
|
40
|
+
- name: Install pandoc
|
|
41
|
+
run: |
|
|
42
|
+
set -vxeuo pipefail
|
|
43
|
+
sudo apt-get update
|
|
44
|
+
sudo apt-get -y install pandoc
|
|
45
|
+
|
|
46
|
+
- name: Set time zone
|
|
47
|
+
run: echo "TZ=America/Chicago" >> "$GITHUB_ENV"
|
|
48
|
+
|
|
49
|
+
- name: Checkout
|
|
50
|
+
uses: actions/checkout@v4
|
|
51
|
+
with:
|
|
52
|
+
fetch-depth: 0 # required for push to dest repo
|
|
53
|
+
|
|
54
|
+
- uses: actions/setup-python@v5
|
|
55
|
+
with:
|
|
56
|
+
python-version: "3.11"
|
|
57
|
+
|
|
58
|
+
- name: Install our package
|
|
59
|
+
run: pip install -e .[doc]
|
|
60
|
+
|
|
61
|
+
- name: Sphinx
|
|
62
|
+
id: deployment
|
|
63
|
+
run: make -C docs html
|
|
64
|
+
|
|
65
|
+
- name: Publish (push gh-pages branch) only on demand
|
|
66
|
+
uses: peaceiris/actions-gh-pages@v4
|
|
67
|
+
if: ${{ github.event.inputs.deploy }}
|
|
68
|
+
with:
|
|
69
|
+
publish_branch: gh-pages
|
|
70
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
71
|
+
publish_dir: docs/build/html
|
|
72
|
+
force_orphan: true
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
# Triggers the workflow on push events but only for the main branch
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
tags:
|
|
9
|
+
- "*" # all tags
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
id-token: write
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
build-n-publish:
|
|
17
|
+
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
- name: Set up Python
|
|
23
|
+
uses: actions/setup-python@v5
|
|
24
|
+
with:
|
|
25
|
+
python-version: "3.11"
|
|
26
|
+
|
|
27
|
+
- name: Install pypa/build
|
|
28
|
+
run: >-
|
|
29
|
+
python -m
|
|
30
|
+
pip install
|
|
31
|
+
build
|
|
32
|
+
--user
|
|
33
|
+
- name: Build a binary wheel and a source tarball
|
|
34
|
+
run: >-
|
|
35
|
+
python -m
|
|
36
|
+
build
|
|
37
|
+
--sdist
|
|
38
|
+
--wheel
|
|
39
|
+
--outdir dist/
|
|
40
|
+
.
|
|
41
|
+
|
|
42
|
+
- name: Install twine
|
|
43
|
+
run: >-
|
|
44
|
+
python -m
|
|
45
|
+
pip install
|
|
46
|
+
twine
|
|
47
|
+
|
|
48
|
+
- name: Check package metadata
|
|
49
|
+
run: >-
|
|
50
|
+
twine check dist/*
|
|
51
|
+
|
|
52
|
+
- name: Publish distribution 📦 to PyPI
|
|
53
|
+
if: startsWith(github.ref, 'refs/tags')
|
|
54
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
55
|
+
with:
|
|
56
|
+
user: __token__
|
|
57
|
+
# password: ${{ secrets.PYPI_API_TOKEN }}
|
|
58
|
+
verbose: true
|
apsbits-1.0.0/.gitignore
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
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
|
+
*.py,cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# poetry
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
102
|
+
#poetry.lock
|
|
103
|
+
|
|
104
|
+
# pdm
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
106
|
+
#pdm.lock
|
|
107
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
108
|
+
# in version control.
|
|
109
|
+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
|
110
|
+
.pdm.toml
|
|
111
|
+
.pdm-python
|
|
112
|
+
.pdm-build/
|
|
113
|
+
|
|
114
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
115
|
+
__pypackages__/
|
|
116
|
+
|
|
117
|
+
# Celery stuff
|
|
118
|
+
celerybeat-schedule
|
|
119
|
+
celerybeat.pid
|
|
120
|
+
|
|
121
|
+
# SageMath parsed files
|
|
122
|
+
*.sage.py
|
|
123
|
+
|
|
124
|
+
# Environments
|
|
125
|
+
.env
|
|
126
|
+
.venv
|
|
127
|
+
env/
|
|
128
|
+
venv/
|
|
129
|
+
ENV/
|
|
130
|
+
env.bak/
|
|
131
|
+
venv.bak/
|
|
132
|
+
|
|
133
|
+
# Spyder project settings
|
|
134
|
+
.spyderproject
|
|
135
|
+
.spyproject
|
|
136
|
+
|
|
137
|
+
# Rope project settings
|
|
138
|
+
.ropeproject
|
|
139
|
+
|
|
140
|
+
# mkdocs documentation
|
|
141
|
+
/site
|
|
142
|
+
|
|
143
|
+
# mypy
|
|
144
|
+
.mypy_cache/
|
|
145
|
+
.dmypy.json
|
|
146
|
+
dmypy.json
|
|
147
|
+
|
|
148
|
+
# Pyre type checker
|
|
149
|
+
.pyre/
|
|
150
|
+
|
|
151
|
+
# pytype static type analyzer
|
|
152
|
+
.pytype/
|
|
153
|
+
|
|
154
|
+
# Cython debug symbols
|
|
155
|
+
cython_debug/
|
|
156
|
+
|
|
157
|
+
# PyCharm
|
|
158
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
159
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
160
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
161
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
162
|
+
#.idea/
|
|
163
|
+
|
|
164
|
+
# setuptools_scm
|
|
165
|
+
_version.py
|
|
166
|
+
|
|
167
|
+
# Developer content
|
|
168
|
+
dev_*
|
|
169
|
+
|
|
170
|
+
qserver/existing_plans_and_devices.yaml
|
|
171
|
+
.vscode/
|
|
172
|
+
.logs/
|
|
173
|
+
*.dat
|
|
174
|
+
*.hdf
|
|
175
|
+
|
|
176
|
+
# Local Run Engine metadata dictionary
|
|
177
|
+
.re_md_dict.yml
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# hint: pre-commit run --all-files
|
|
2
|
+
|
|
3
|
+
repos:
|
|
4
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
5
|
+
rev: v5.0.0
|
|
6
|
+
hooks:
|
|
7
|
+
# exclude_types: [jupyter]
|
|
8
|
+
- id: check-yaml
|
|
9
|
+
- id: check-toml
|
|
10
|
+
- id: check-ast
|
|
11
|
+
# - id: check-docstring-first # let variables have docstrings
|
|
12
|
+
- id: check-merge-conflict
|
|
13
|
+
- id: check-added-large-files
|
|
14
|
+
- id: mixed-line-ending
|
|
15
|
+
- id: end-of-file-fixer
|
|
16
|
+
- id: trailing-whitespace
|
|
17
|
+
- id: check-case-conflict
|
|
18
|
+
# - id: check-json
|
|
19
|
+
# - id: check-symlinks
|
|
20
|
+
- id: check-executables-have-shebangs
|
|
21
|
+
# Don't strip output from jupyter notebooks ATM.
|
|
22
|
+
# - repo: https://github.com/kynan/nbstripout
|
|
23
|
+
# rev: 0.7.1
|
|
24
|
+
# hooks:
|
|
25
|
+
# - id: nbstripout
|
|
26
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
27
|
+
rev: v0.4.8
|
|
28
|
+
hooks:
|
|
29
|
+
- id: ruff # replaces Flake8, isort, pydocstyle, pyupgrade
|
|
30
|
+
args:
|
|
31
|
+
- --fix
|
|
32
|
+
- id: ruff-format # replaces Black
|
apsbits-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
Copyright (c) 2023-2025, UChicago Argonne, LLC
|
|
2
|
+
|
|
3
|
+
All Rights Reserved
|
|
4
|
+
|
|
5
|
+
BITS
|
|
6
|
+
|
|
7
|
+
BCDA, Advanced Photon Source, Argonne National Laboratory
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
OPEN SOURCE LICENSE
|
|
11
|
+
|
|
12
|
+
Redistribution and use in source and binary forms, with or without
|
|
13
|
+
modification, are permitted provided that the following conditions are met:
|
|
14
|
+
|
|
15
|
+
1. Redistributions of source code must retain the above copyright notice,
|
|
16
|
+
this list of conditions and the following disclaimer. Software changes,
|
|
17
|
+
modifications, or derivative works, should be noted with comments and
|
|
18
|
+
the author and organization's name.
|
|
19
|
+
|
|
20
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
21
|
+
this list of conditions and the following disclaimer in the documentation
|
|
22
|
+
and/or other materials provided with the distribution.
|
|
23
|
+
|
|
24
|
+
3. Neither the names of UChicago Argonne, LLC or the Department of Energy
|
|
25
|
+
nor the names of its contributors may be used to endorse or promote
|
|
26
|
+
products derived from this software without specific prior written
|
|
27
|
+
permission.
|
|
28
|
+
|
|
29
|
+
4. The software and the end-user documentation included with the
|
|
30
|
+
redistribution, if any, must include the following acknowledgment:
|
|
31
|
+
|
|
32
|
+
"This product includes software produced by UChicago Argonne, LLC
|
|
33
|
+
under Contract No. DE-AC02-06CH11357 with the Department of Energy."
|
|
34
|
+
|
|
35
|
+
****************************************************************************
|
|
36
|
+
|
|
37
|
+
DISCLAIMER
|
|
38
|
+
|
|
39
|
+
THE SOFTWARE IS SUPPLIED "AS IS" WITHOUT WARRANTY OF ANY KIND.
|
|
40
|
+
|
|
41
|
+
Neither the United States GOVERNMENT, nor the United States Department
|
|
42
|
+
of Energy, NOR uchicago argonne, LLC, nor any of their employees, makes
|
|
43
|
+
any warranty, express or implied, or assumes any legal liability or
|
|
44
|
+
responsibility for the accuracy, completeness, or usefulness of any
|
|
45
|
+
information, data, apparatus, product, or process disclosed, or
|
|
46
|
+
represents that its use would not infringe privately owned rights.
|
|
47
|
+
|
|
48
|
+
****************************************************************************
|