builder2ibek 0.2.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.
- builder2ibek-0.2.0/.devcontainer/Dockerfile +31 -0
- builder2ibek-0.2.0/.devcontainer/devcontainer.json +68 -0
- builder2ibek-0.2.0/.devcontainer/local_build.sh +18 -0
- builder2ibek-0.2.0/.gitattributes +1 -0
- builder2ibek-0.2.0/.github/actions/install_requirements/action.yml +57 -0
- builder2ibek-0.2.0/.github/pages/index.html +11 -0
- builder2ibek-0.2.0/.github/workflows/code.yml +152 -0
- builder2ibek-0.2.0/.github/workflows/docs.yml +65 -0
- builder2ibek-0.2.0/.gitignore +67 -0
- builder2ibek-0.2.0/.gitremotes +1 -0
- builder2ibek-0.2.0/.pre-commit-config.yaml +23 -0
- builder2ibek-0.2.0/.vscode/extensions.json +7 -0
- builder2ibek-0.2.0/.vscode/launch.json +73 -0
- builder2ibek-0.2.0/.vscode/settings.json +15 -0
- builder2ibek-0.2.0/.vscode/tasks.json +16 -0
- builder2ibek-0.2.0/CHANGELOG.rst +17 -0
- builder2ibek-0.2.0/CONTRIBUTING.rst +159 -0
- builder2ibek-0.2.0/LICENSE +201 -0
- builder2ibek-0.2.0/PKG-INFO +274 -0
- builder2ibek-0.2.0/README.rst +40 -0
- builder2ibek-0.2.0/docs/_static/theme_overrides.css +34 -0
- builder2ibek-0.2.0/docs/conf.py +126 -0
- builder2ibek-0.2.0/docs/explanations/todo.rst +4 -0
- builder2ibek-0.2.0/docs/explanations.rst +11 -0
- builder2ibek-0.2.0/docs/how-to/todo.rst +4 -0
- builder2ibek-0.2.0/docs/how-to.rst +11 -0
- builder2ibek-0.2.0/docs/images/builder2ibek-favicon.ico +0 -0
- builder2ibek-0.2.0/docs/images/builder2ibek-logo.svg +177 -0
- builder2ibek-0.2.0/docs/index.rst +48 -0
- builder2ibek-0.2.0/docs/reference/api.rst +17 -0
- builder2ibek-0.2.0/docs/reference/contributing.rst +1 -0
- builder2ibek-0.2.0/docs/reference.rst +18 -0
- builder2ibek-0.2.0/docs/tutorials/installation.rst +47 -0
- builder2ibek-0.2.0/docs/tutorials.rst +11 -0
- builder2ibek-0.2.0/pyproject.toml +120 -0
- builder2ibek-0.2.0/setup.cfg +4 -0
- builder2ibek-0.2.0/src/builder2ibek/__init__.py +14 -0
- builder2ibek-0.2.0/src/builder2ibek/__main__.py +96 -0
- builder2ibek-0.2.0/src/builder2ibek/_version.py +4 -0
- builder2ibek-0.2.0/src/builder2ibek/builder.py +58 -0
- builder2ibek-0.2.0/src/builder2ibek/convert.py +101 -0
- builder2ibek-0.2.0/src/builder2ibek/converters/ADAravis.py +14 -0
- builder2ibek-0.2.0/src/builder2ibek/converters/ADZMQ.py +12 -0
- builder2ibek-0.2.0/src/builder2ibek/converters/BL20J.py +18 -0
- builder2ibek-0.2.0/src/builder2ibek/converters/BL46P-BUILDER.py +26 -0
- builder2ibek-0.2.0/src/builder2ibek/converters/README.md +14 -0
- builder2ibek-0.2.0/src/builder2ibek/converters/__init__.py +0 -0
- builder2ibek-0.2.0/src/builder2ibek/converters/adUtil.py +30 -0
- builder2ibek-0.2.0/src/builder2ibek/converters/autosave.py +12 -0
- builder2ibek-0.2.0/src/builder2ibek/converters/deviocstats.py +33 -0
- builder2ibek-0.2.0/src/builder2ibek/converters/epics_base.py +28 -0
- builder2ibek-0.2.0/src/builder2ibek/converters/ffmpegServer.py +12 -0
- builder2ibek-0.2.0/src/builder2ibek/converters/gdaPlugins.yaml +70 -0
- builder2ibek-0.2.0/src/builder2ibek/converters/pmac.py +77 -0
- builder2ibek-0.2.0/src/builder2ibek/converters/pvlogging.py +12 -0
- builder2ibek-0.2.0/src/builder2ibek/converters/records.py +14 -0
- builder2ibek-0.2.0/src/builder2ibek/moduleinfos.py +39 -0
- builder2ibek-0.2.0/src/builder2ibek/types.py +60 -0
- builder2ibek-0.2.0/src/builder2ibek.egg-info/PKG-INFO +274 -0
- builder2ibek-0.2.0/src/builder2ibek.egg-info/SOURCES.txt +67 -0
- builder2ibek-0.2.0/src/builder2ibek.egg-info/dependency_links.txt +1 -0
- builder2ibek-0.2.0/src/builder2ibek.egg-info/entry_points.txt +2 -0
- builder2ibek-0.2.0/src/builder2ibek.egg-info/requires.txt +19 -0
- builder2ibek-0.2.0/src/builder2ibek.egg-info/top_level.txt +1 -0
- builder2ibek-0.2.0/tests/__init__.py +0 -0
- builder2ibek-0.2.0/tests/conftest.py +21 -0
- builder2ibek-0.2.0/tests/samples/BL45P-MO-IOC-01.xml +36 -0
- builder2ibek-0.2.0/tests/samples/bl45p-mo-ioc-01.yaml +298 -0
- builder2ibek-0.2.0/tests/test_cli.py +40 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# ideas from https://www.docker.com/blog/containerized-python-development-part-1/
|
|
2
|
+
|
|
3
|
+
# This file is for use as a .vscode devcontainer as well as a runtime
|
|
4
|
+
# container. The devcontainer should be rootful and use podman or docker
|
|
5
|
+
# with user namespaces.
|
|
6
|
+
|
|
7
|
+
ARG BASE="mcr.microsoft.com/vscode/devcontainers/python:0-3.10-bullseye"
|
|
8
|
+
FROM ${BASE} as base
|
|
9
|
+
|
|
10
|
+
# use root to pin where the packages will install
|
|
11
|
+
USER root
|
|
12
|
+
ENV PATH=/root/.local/bin:$PATH
|
|
13
|
+
|
|
14
|
+
FROM base as developer
|
|
15
|
+
|
|
16
|
+
WORKDIR /workspace
|
|
17
|
+
COPY . .
|
|
18
|
+
|
|
19
|
+
# install runtime from DIST if there is one
|
|
20
|
+
RUN mkdir -p /root/.local && \
|
|
21
|
+
if [ -d dist ] ; then \
|
|
22
|
+
touch requirements.txt && \
|
|
23
|
+
pip install --user -r requirements.txt dist/*.whl ; \
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
FROM base as runtime
|
|
27
|
+
|
|
28
|
+
COPY --from=developer /root/.local /root/.local
|
|
29
|
+
|
|
30
|
+
ENTRYPOINT ["builder2ibek"]
|
|
31
|
+
CMD ["--version"]
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
|
|
2
|
+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.231.6/containers/python-3
|
|
3
|
+
{
|
|
4
|
+
"name": "Python 3",
|
|
5
|
+
"build": {
|
|
6
|
+
"dockerfile": "Dockerfile",
|
|
7
|
+
"target": "developer",
|
|
8
|
+
"context": "..",
|
|
9
|
+
"args": {}
|
|
10
|
+
},
|
|
11
|
+
"remoteEnv": {
|
|
12
|
+
"DISPLAY": "${localEnv:DISPLAY}"
|
|
13
|
+
},
|
|
14
|
+
// Set *default* container specific settings.json values on container create.
|
|
15
|
+
"settings": {
|
|
16
|
+
"python.defaultInterpreterPath": "/usr/local/bin/python",
|
|
17
|
+
"python.linting.enabled": true,
|
|
18
|
+
"python.linting.pylintEnabled": true,
|
|
19
|
+
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
|
|
20
|
+
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
|
|
21
|
+
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
|
|
22
|
+
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
|
|
23
|
+
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
|
|
24
|
+
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
|
|
25
|
+
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
|
|
26
|
+
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
|
|
27
|
+
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
|
|
28
|
+
},
|
|
29
|
+
// Add the IDs of extensions you want installed when the container is created.
|
|
30
|
+
"extensions": [
|
|
31
|
+
"ms-python.python",
|
|
32
|
+
"ms-python.vscode-pylance",
|
|
33
|
+
"streetsidesoftware.code-spell-checker",
|
|
34
|
+
"ryanluker.vscode-coverage-gutters",
|
|
35
|
+
"mhutchie.git-graph",
|
|
36
|
+
"eamodio.gitlens",
|
|
37
|
+
"gruntfuggly.todo-tree",
|
|
38
|
+
"redhat.vscode-yaml",
|
|
39
|
+
"nsd.vscode-epics",
|
|
40
|
+
"alefragnani.bookmarks"
|
|
41
|
+
],
|
|
42
|
+
"features": {
|
|
43
|
+
//"docker-from-docker": "20.10",
|
|
44
|
+
"git": "os-provided"
|
|
45
|
+
},
|
|
46
|
+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
|
47
|
+
// "forwardPorts": [],
|
|
48
|
+
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
|
49
|
+
// "remoteUser": "vscode",
|
|
50
|
+
// Make sure the files we are mapping into the container exist on the host
|
|
51
|
+
"initializeCommand": "bash -c 'for i in $HOME/.inputrc $HOME/.bashrc_dev; do [ -f $i ] || touch $i; done'",
|
|
52
|
+
"runArgs": [
|
|
53
|
+
"--privileged",
|
|
54
|
+
"--net=host",
|
|
55
|
+
"-v=${localEnv:HOME}/.ssh:/root/.ssh",
|
|
56
|
+
"-v=${localEnv:HOME}/.bashrc_dev:/root/.bashrc",
|
|
57
|
+
"-v=${localEnv:HOME}/.inputrc:/root/.inputrc"
|
|
58
|
+
],
|
|
59
|
+
"mounts": [
|
|
60
|
+
// map in home directory - not strictly necessary but may be useful
|
|
61
|
+
"source=${localEnv:HOME},target=${localEnv:HOME},type=bind,consistency=cached"
|
|
62
|
+
],
|
|
63
|
+
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind",
|
|
64
|
+
"workspaceFolder": "/workspace",
|
|
65
|
+
// After the container is created, install the python project in editable form
|
|
66
|
+
// This installs into the system python of the container
|
|
67
|
+
"postCreateCommand": "pip install $([ -f requirements_dev.txt ] && echo -r requirements_dev.txt ) -e .[dev]"
|
|
68
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# locally build a runtime container for testing
|
|
2
|
+
|
|
3
|
+
# first make sure a wheel is built
|
|
4
|
+
(
|
|
5
|
+
cd ..
|
|
6
|
+
pip install build
|
|
7
|
+
rm -r dist
|
|
8
|
+
python -m build --wheel
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
# make the container name the same as the root folder name of this clone
|
|
12
|
+
container_name=$(cd ..; basename $(realpath .))
|
|
13
|
+
echo building $container_name ...
|
|
14
|
+
|
|
15
|
+
# run the build with required build-args for a runtime build
|
|
16
|
+
ln -s ../dist .
|
|
17
|
+
podman build --build-arg BASE=python:3.10-slim --build-arg ENTRYPOINT=$container_name -t $container_name .. --file ./Dockerfile
|
|
18
|
+
unlink dist
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
src/*/_version_git.py export-subst
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: Install requirements
|
|
2
|
+
description: Run pip install with requirements and upload resulting requirements
|
|
3
|
+
inputs:
|
|
4
|
+
requirements_file:
|
|
5
|
+
description: Name of requirements file to use and upload
|
|
6
|
+
required: true
|
|
7
|
+
install_options:
|
|
8
|
+
description: Parameters to pass to pip install
|
|
9
|
+
required: true
|
|
10
|
+
python_version:
|
|
11
|
+
description: Python version to install
|
|
12
|
+
default: "3.10"
|
|
13
|
+
|
|
14
|
+
runs:
|
|
15
|
+
using: composite
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- name: Setup python
|
|
19
|
+
uses: actions/setup-python@v4
|
|
20
|
+
with:
|
|
21
|
+
python-version: ${{ inputs.python_version }}
|
|
22
|
+
|
|
23
|
+
- name: Pip install
|
|
24
|
+
run: |
|
|
25
|
+
touch ${{ inputs.requirements_file }}
|
|
26
|
+
# -c uses requirements.txt as constraints, see 'Validate requirements file'
|
|
27
|
+
pip install -c ${{ inputs.requirements_file }} ${{ inputs.install_options }}
|
|
28
|
+
shell: bash
|
|
29
|
+
|
|
30
|
+
- name: Create lockfile
|
|
31
|
+
run: |
|
|
32
|
+
mkdir -p lockfiles
|
|
33
|
+
pip freeze --exclude-editable > lockfiles/${{ inputs.requirements_file }}
|
|
34
|
+
# delete the self referencing line and make sure it isn't blank
|
|
35
|
+
sed -i'' -e '/file:/d' lockfiles/${{ inputs.requirements_file }}
|
|
36
|
+
shell: bash
|
|
37
|
+
|
|
38
|
+
- name: Upload lockfiles
|
|
39
|
+
uses: actions/upload-artifact@v3
|
|
40
|
+
with:
|
|
41
|
+
name: lockfiles
|
|
42
|
+
path: lockfiles
|
|
43
|
+
|
|
44
|
+
# This eliminates the class of problems where the requirements being given no
|
|
45
|
+
# longer match what the packages themselves dictate. E.g. In the rare instance
|
|
46
|
+
# where I install some-package which used to depend on vulnerable-dependency
|
|
47
|
+
# but now uses good-dependency (despite being nominally the same version)
|
|
48
|
+
# pip will install both if given a requirements file with -r
|
|
49
|
+
- name: If requirements file exists, check it matches pip installed packages
|
|
50
|
+
run: |
|
|
51
|
+
if [ -s ${{ inputs.requirements_file }} ]; then
|
|
52
|
+
if ! diff -u ${{ inputs.requirements_file }} lockfiles/${{ inputs.requirements_file }}; then
|
|
53
|
+
echo "Error: ${{ inputs.requirements_file }} need the above changes to be exhaustive"
|
|
54
|
+
exit 1
|
|
55
|
+
fi
|
|
56
|
+
fi
|
|
57
|
+
shell: bash
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
name: Code CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
env:
|
|
7
|
+
# The target python version, which must match the Dockerfile version
|
|
8
|
+
CONTAINER_PYTHON: "3.10"
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
lint:
|
|
12
|
+
# pull requests are a duplicate of a branch push if within the same repo.
|
|
13
|
+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Checkout
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Install python packages
|
|
21
|
+
uses: ./.github/actions/install_requirements
|
|
22
|
+
with:
|
|
23
|
+
requirements_file: requirements-dev-3.x.txt
|
|
24
|
+
install_options: -e .[dev]
|
|
25
|
+
|
|
26
|
+
- name: Lint
|
|
27
|
+
run: tox -e pre-commit,mypy
|
|
28
|
+
|
|
29
|
+
test:
|
|
30
|
+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
|
|
31
|
+
strategy:
|
|
32
|
+
fail-fast: false
|
|
33
|
+
matrix:
|
|
34
|
+
os: ["ubuntu-latest"] # can add windows-latest, macos-latest
|
|
35
|
+
python: ["3.10", "3.11"]
|
|
36
|
+
install: ["-e .[dev]"]
|
|
37
|
+
# Make one version be non-editable to test both paths of version code
|
|
38
|
+
include:
|
|
39
|
+
- os: "ubuntu-latest"
|
|
40
|
+
python: "3.10"
|
|
41
|
+
install: ".[dev]"
|
|
42
|
+
|
|
43
|
+
runs-on: ${{ matrix.os }}
|
|
44
|
+
env:
|
|
45
|
+
# https://github.com/pytest-dev/pytest/issues/2042
|
|
46
|
+
PY_IGNORE_IMPORTMISMATCH: "1"
|
|
47
|
+
# enable QT tests with no X Display
|
|
48
|
+
QT_QPA_PLATFORM: "offscreen"
|
|
49
|
+
|
|
50
|
+
steps:
|
|
51
|
+
- name: Checkout
|
|
52
|
+
uses: actions/checkout@v4
|
|
53
|
+
with:
|
|
54
|
+
# Need this to get version number from last tag
|
|
55
|
+
fetch-depth: 0
|
|
56
|
+
submodules: recursive
|
|
57
|
+
|
|
58
|
+
- name: Install python packages
|
|
59
|
+
uses: ./.github/actions/install_requirements
|
|
60
|
+
with:
|
|
61
|
+
python_version: ${{ matrix.python }}
|
|
62
|
+
requirements_file: requirements-test-${{ matrix.os }}-${{ matrix.python }}.txt
|
|
63
|
+
install_options: ${{ matrix.install }}
|
|
64
|
+
|
|
65
|
+
- name: List dependency tree
|
|
66
|
+
run: pipdeptree
|
|
67
|
+
|
|
68
|
+
- name: Run tests
|
|
69
|
+
run: tox -e pytest
|
|
70
|
+
|
|
71
|
+
- name: Upload coverage to Codecov
|
|
72
|
+
uses: codecov/codecov-action@v3
|
|
73
|
+
with:
|
|
74
|
+
name: ${{ matrix.python }}/${{ matrix.os }}
|
|
75
|
+
files: cov.xml
|
|
76
|
+
|
|
77
|
+
dist:
|
|
78
|
+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
|
|
79
|
+
runs-on: "ubuntu-latest"
|
|
80
|
+
|
|
81
|
+
steps:
|
|
82
|
+
- name: Checkout
|
|
83
|
+
uses: actions/checkout@v4
|
|
84
|
+
with:
|
|
85
|
+
# Need this to get version number from last tag
|
|
86
|
+
fetch-depth: 0
|
|
87
|
+
|
|
88
|
+
- name: Build sdist and wheel
|
|
89
|
+
run: |
|
|
90
|
+
export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) && \
|
|
91
|
+
pipx run build
|
|
92
|
+
|
|
93
|
+
- name: Upload sdist and wheel as artifacts
|
|
94
|
+
uses: actions/upload-artifact@v3
|
|
95
|
+
with:
|
|
96
|
+
name: dist
|
|
97
|
+
path: dist
|
|
98
|
+
|
|
99
|
+
- name: Check for packaging errors
|
|
100
|
+
run: pipx run twine check --strict dist/*
|
|
101
|
+
|
|
102
|
+
- name: Install python packages
|
|
103
|
+
uses: ./.github/actions/install_requirements
|
|
104
|
+
with:
|
|
105
|
+
python_version: ${{env.CONTAINER_PYTHON}}
|
|
106
|
+
requirements_file: requirements.txt
|
|
107
|
+
install_options: dist/*.whl
|
|
108
|
+
|
|
109
|
+
- name: Test module --version works using the installed wheel
|
|
110
|
+
# If more than one module in src/ replace with module name to test
|
|
111
|
+
run: python -m $(ls src | head -1) --version
|
|
112
|
+
|
|
113
|
+
release:
|
|
114
|
+
# upload to PyPI and make a release on every tag
|
|
115
|
+
needs: [lint, dist, test]
|
|
116
|
+
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
|
|
117
|
+
runs-on: ubuntu-latest
|
|
118
|
+
permissions:
|
|
119
|
+
# this permission is mandatory for trusted publishing To PyPI
|
|
120
|
+
id-token: write
|
|
121
|
+
contents: write
|
|
122
|
+
# Specify the GitHub Environment to publish to
|
|
123
|
+
environment: release
|
|
124
|
+
|
|
125
|
+
steps:
|
|
126
|
+
- name: Checkout
|
|
127
|
+
uses: actions/checkout@v4
|
|
128
|
+
|
|
129
|
+
- uses: actions/download-artifact@v3
|
|
130
|
+
|
|
131
|
+
- name: Fixup blank lockfiles
|
|
132
|
+
# Github release artifacts can't be blank
|
|
133
|
+
run: for f in lockfiles/*; do [ -s $f ] || echo '# No requirements' >> $f; done
|
|
134
|
+
|
|
135
|
+
- name: Github Release
|
|
136
|
+
# We pin to the SHA, not the tag, for security reasons.
|
|
137
|
+
# https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
|
|
138
|
+
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
|
|
139
|
+
with:
|
|
140
|
+
prerelease: ${{ contains(github.ref_name, 'a') || contains(github.ref_name, 'b') || contains(github.ref_name, 'rc') }}
|
|
141
|
+
# upload distribution files and lockfiles plus the support YAML schema
|
|
142
|
+
# note that the 'sample' has been checked to be current by the tests
|
|
143
|
+
files: |
|
|
144
|
+
dist/*
|
|
145
|
+
lockfiles/*
|
|
146
|
+
generate_release_notes: true
|
|
147
|
+
|
|
148
|
+
env:
|
|
149
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
150
|
+
|
|
151
|
+
- name: Publish to PyPI
|
|
152
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
name: Docs CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
# Add more branches here to publish docs from other branches
|
|
7
|
+
- main
|
|
8
|
+
- main
|
|
9
|
+
tags:
|
|
10
|
+
- "*"
|
|
11
|
+
pull_request:
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
docs:
|
|
15
|
+
strategy:
|
|
16
|
+
fail-fast: false
|
|
17
|
+
matrix:
|
|
18
|
+
os: ["ubuntu-latest"]
|
|
19
|
+
python: ["3.10"]
|
|
20
|
+
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
|
|
23
|
+
steps:
|
|
24
|
+
- name: Avoid git conflicts when tag and branch pushed at same time
|
|
25
|
+
if: startsWith(github.ref, 'refs/tags')
|
|
26
|
+
run: sleep 60
|
|
27
|
+
|
|
28
|
+
- name: Install python version
|
|
29
|
+
uses: actions/setup-python@v2
|
|
30
|
+
with:
|
|
31
|
+
python-version: ${{ matrix.python }}
|
|
32
|
+
|
|
33
|
+
- name: Install Packages
|
|
34
|
+
# Can delete this if you don't use graphviz in your docs
|
|
35
|
+
run: sudo apt-get install graphviz
|
|
36
|
+
|
|
37
|
+
- name: checkout
|
|
38
|
+
uses: actions/checkout@v2
|
|
39
|
+
with:
|
|
40
|
+
fetch-depth: 0
|
|
41
|
+
|
|
42
|
+
- name: Install dependencies
|
|
43
|
+
run: |
|
|
44
|
+
touch requirements_dev.txt
|
|
45
|
+
pip install -r requirements_dev.txt -e .[dev]
|
|
46
|
+
|
|
47
|
+
- name: Build docs
|
|
48
|
+
run: tox -e docs
|
|
49
|
+
|
|
50
|
+
- name: Move to versioned directory
|
|
51
|
+
# e.g. main or 0.1.2
|
|
52
|
+
run: mv build/html ".github/pages/${GITHUB_REF##*/}"
|
|
53
|
+
|
|
54
|
+
- name: Write versions.txt
|
|
55
|
+
run: sphinx_rtd_theme_github_versions .github/pages
|
|
56
|
+
|
|
57
|
+
- name: Publish Docs to gh-pages
|
|
58
|
+
if: github.event_name == 'push'
|
|
59
|
+
# We pin to the SHA, not the tag, for security reasons.
|
|
60
|
+
# https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
|
|
61
|
+
uses: peaceiris/actions-gh-pages@068dc23d9710f1ba62e86896f84735d869951305 # v3.8.0
|
|
62
|
+
with:
|
|
63
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
64
|
+
publish_dir: .github/pages
|
|
65
|
+
keep_files: true
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
|
|
5
|
+
# C extensions
|
|
6
|
+
*.so
|
|
7
|
+
|
|
8
|
+
# Distribution / packaging
|
|
9
|
+
.Python
|
|
10
|
+
env/
|
|
11
|
+
.venv
|
|
12
|
+
build/
|
|
13
|
+
develop-eggs/
|
|
14
|
+
dist/
|
|
15
|
+
downloads/
|
|
16
|
+
eggs/
|
|
17
|
+
.eggs/
|
|
18
|
+
lib/
|
|
19
|
+
lib64/
|
|
20
|
+
parts/
|
|
21
|
+
sdist/
|
|
22
|
+
var/
|
|
23
|
+
*.egg-info/
|
|
24
|
+
.installed.cfg
|
|
25
|
+
*.egg
|
|
26
|
+
**/_version.py
|
|
27
|
+
|
|
28
|
+
# PyInstaller
|
|
29
|
+
# Usually these files are written by a python script from a template
|
|
30
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
31
|
+
*.manifest
|
|
32
|
+
*.spec
|
|
33
|
+
|
|
34
|
+
# Installer logs
|
|
35
|
+
pip-log.txt
|
|
36
|
+
pip-delete-this-directory.txt
|
|
37
|
+
|
|
38
|
+
# Unit test / coverage reports
|
|
39
|
+
htmlcov/
|
|
40
|
+
.tox/
|
|
41
|
+
.coverage
|
|
42
|
+
.coverage.*
|
|
43
|
+
.cache
|
|
44
|
+
nosetests.xml
|
|
45
|
+
coverage.xml
|
|
46
|
+
cov.xml
|
|
47
|
+
.pytest_cache/
|
|
48
|
+
.mypy_cache/
|
|
49
|
+
|
|
50
|
+
# Translations
|
|
51
|
+
*.mo
|
|
52
|
+
*.pot
|
|
53
|
+
|
|
54
|
+
# Django stuff:
|
|
55
|
+
*.log
|
|
56
|
+
|
|
57
|
+
# Sphinx documentation
|
|
58
|
+
docs/_build/
|
|
59
|
+
|
|
60
|
+
# PyBuilder
|
|
61
|
+
target/
|
|
62
|
+
|
|
63
|
+
# DLS build dir and virtual environment
|
|
64
|
+
/prefix/
|
|
65
|
+
/venv/
|
|
66
|
+
/lightweight-venv/
|
|
67
|
+
/installed.files
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
github git@github.com:epics-containers/builder2ibek.git
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: v4.5.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: check-added-large-files
|
|
6
|
+
- id: check-yaml
|
|
7
|
+
- id: check-merge-conflict
|
|
8
|
+
|
|
9
|
+
- repo: local
|
|
10
|
+
hooks:
|
|
11
|
+
- id: black
|
|
12
|
+
name: Run black
|
|
13
|
+
stages: [commit]
|
|
14
|
+
language: system
|
|
15
|
+
entry: black --check --diff
|
|
16
|
+
types: [python]
|
|
17
|
+
|
|
18
|
+
- id: ruff
|
|
19
|
+
name: Run ruff
|
|
20
|
+
stages: [commit]
|
|
21
|
+
language: system
|
|
22
|
+
entry: ruff
|
|
23
|
+
types: [python]
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
// Use IntelliSense to learn about possible attributes.
|
|
3
|
+
// Hover to view descriptions of existing attributes.
|
|
4
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
+
"version": "0.2.0",
|
|
6
|
+
"configurations": [
|
|
7
|
+
{
|
|
8
|
+
"name": "Debug Unit Test",
|
|
9
|
+
"type": "python",
|
|
10
|
+
"request": "launch",
|
|
11
|
+
"justMyCode": false,
|
|
12
|
+
"program": "${file}",
|
|
13
|
+
"purpose": [
|
|
14
|
+
"debug-test"
|
|
15
|
+
],
|
|
16
|
+
"console": "integratedTerminal",
|
|
17
|
+
"env": {
|
|
18
|
+
// The default config in setup.cfg's "[tool:pytest]" adds coverage.
|
|
19
|
+
// Cannot have coverage and debugging at the same time.
|
|
20
|
+
// https://github.com/microsoft/vscode-python/issues/693
|
|
21
|
+
"PYTEST_ADDOPTS": "--no-cov"
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "Builder2ibek",
|
|
26
|
+
"type": "python",
|
|
27
|
+
"request": "launch",
|
|
28
|
+
"justMyCode": false,
|
|
29
|
+
"program": "/scratch/hgv27681/work/builder2ibek/src/builder2ibek/__main__.py",
|
|
30
|
+
"args": [
|
|
31
|
+
"file",
|
|
32
|
+
"/dls_sw/work/R3.14.12.7/support/BL20J-BUILDER/etc/makeIocs/BL20J-DI-IOC-01.xml",
|
|
33
|
+
"--yaml",
|
|
34
|
+
"/scratch/hgv27681/work/bl20j/iocs/bl20j-di-ioc-01.yaml"
|
|
35
|
+
],
|
|
36
|
+
"purpose": [
|
|
37
|
+
"debug-test"
|
|
38
|
+
],
|
|
39
|
+
"console": "integratedTerminal",
|
|
40
|
+
"env": {
|
|
41
|
+
// The default config in setup.cfg's "[tool:pytest]" adds coverage.
|
|
42
|
+
// Cannot have coverage and debugging at the same time.
|
|
43
|
+
// https://github.com/microsoft/vscode-python/issues/693
|
|
44
|
+
"PYTEST_ADDOPTS": "--no-cov"
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "Builder2ibek-P46",
|
|
49
|
+
"type": "python",
|
|
50
|
+
"request": "launch",
|
|
51
|
+
"justMyCode": false,
|
|
52
|
+
"program": "/scratch/hgv27681/work/builder2ibek/src/builder2ibek/__main__.py",
|
|
53
|
+
"args": [
|
|
54
|
+
"file",
|
|
55
|
+
"/scratch/wks59344/MXBridge/bl46p-builder/etc/makeIocs/BL46P-EA-IOC-01.xml",
|
|
56
|
+
"--yaml",
|
|
57
|
+
"/scratch/wks59344/MXBridge/bl46p/iocs/bl46p-ea-dcam-01/ioc.yaml",
|
|
58
|
+
"--schema",
|
|
59
|
+
"https://github.com/epics-containers/ioc-adaravis/releases/download/2023.11.4/ibek.ioc.schema.json"
|
|
60
|
+
],
|
|
61
|
+
"purpose": [
|
|
62
|
+
"debug-test"
|
|
63
|
+
],
|
|
64
|
+
"console": "integratedTerminal",
|
|
65
|
+
"env": {
|
|
66
|
+
// The default config in setup.cfg's "[tool:pytest]" adds coverage.
|
|
67
|
+
// Cannot have coverage and debugging at the same time.
|
|
68
|
+
// https://github.com/microsoft/vscode-python/issues/693
|
|
69
|
+
"PYTEST_ADDOPTS": "--no-cov"
|
|
70
|
+
},
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"python.testing.pytestEnabled": true,
|
|
3
|
+
"editor.formatOnSave": true,
|
|
4
|
+
"[python]": {
|
|
5
|
+
"editor.codeActionsOnSave": {
|
|
6
|
+
"source.fixAll.ruff": "never",
|
|
7
|
+
"source.organizeImports.ruff": "explicit",
|
|
8
|
+
"source.black": "explicit"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"cSpell.words": [
|
|
12
|
+
"moduleinfos",
|
|
13
|
+
"PARENTPORT"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
|
2
|
+
// for the documentation about the tasks.json format
|
|
3
|
+
{
|
|
4
|
+
"version": "2.0.0",
|
|
5
|
+
"tasks": [
|
|
6
|
+
{
|
|
7
|
+
"type": "shell",
|
|
8
|
+
"label": "Tests with coverage",
|
|
9
|
+
"command": "pipenv run tests",
|
|
10
|
+
"options": {
|
|
11
|
+
"cwd": "${workspaceRoot}"
|
|
12
|
+
},
|
|
13
|
+
"problemMatcher": [],
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Changelog
|
|
2
|
+
=========
|
|
3
|
+
|
|
4
|
+
All notable changes to this project will be documented in this file.
|
|
5
|
+
|
|
6
|
+
The format is based on `Keep a Changelog <https://keepachangelog.com/en/1.0.0/>`_,
|
|
7
|
+
and this project adheres to `Semantic Versioning <https://semver.org/spec/v2.0.0.html>`_.
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
Unreleased_
|
|
11
|
+
-----------
|
|
12
|
+
|
|
13
|
+
Nothing yet
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
.. _Unreleased: https://github.com/epics-containers/builder2ibek/compare/0.1...HEAD
|
|
17
|
+
.. _0.1: https://github.com/epics-containers/builder2ibek/releases/tag/0.1
|