edge-containers-cli 4.4.4__tar.gz → 5.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.
Files changed (116) hide show
  1. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/.copier-answers.yml +3 -1
  2. edge_containers_cli-5.0.0/.devcontainer/devcontainer.json +73 -0
  3. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/.github/CONTRIBUTING.md +1 -1
  4. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/.github/ISSUE_TEMPLATE/bug_report.md +1 -1
  5. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/.github/dependabot.yml +4 -0
  6. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/.github/workflows/_container.yml +5 -1
  7. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/.github/workflows/_dist.yml +6 -5
  8. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/.github/workflows/_release.yml +1 -1
  9. edge_containers_cli-5.0.0/.github/workflows/_test.yml +44 -0
  10. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/.github/workflows/_tox.yml +3 -3
  11. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/.github/workflows/ci.yml +11 -17
  12. edge_containers_cli-5.0.0/.gitleaks.toml +19 -0
  13. edge_containers_cli-5.0.0/.pre-commit-config.yaml +40 -0
  14. edge_containers_cli-5.0.0/.python-version +1 -0
  15. edge_containers_cli-5.0.0/Dockerfile +43 -0
  16. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/PKG-INFO +4 -14
  17. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/pyproject.toml +61 -24
  18. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/src/edge_containers_cli/__main__.py +1 -2
  19. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/src/edge_containers_cli/_version.py +16 -3
  20. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/src/edge_containers_cli/cmds/argo_commands.py +60 -17
  21. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/src/edge_containers_cli/cmds/demo_commands.py +3 -3
  22. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/src/edge_containers_cli/cmds/helm.py +2 -3
  23. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/src/edge_containers_cli/cmds/monitor.py +48 -13
  24. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/src/edge_containers_cli/definitions.py +2 -1
  25. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/src/edge_containers_cli.egg-info/PKG-INFO +4 -14
  26. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/src/edge_containers_cli.egg-info/SOURCES.txt +3 -2
  27. edge_containers_cli-5.0.0/src/edge_containers_cli.egg-info/requires.txt +8 -0
  28. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/tests/data/argocd.yaml +55 -10
  29. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/tests/data/bl01t-deployment/apps/values.yaml +1 -1
  30. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/tests/data/bl01t-services/services/bl01t-ea-test-01/templates/configmap.yaml +1 -1
  31. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/tests/data/bl01t-services/services/dls-aravis/templates/configmap.yaml +1 -1
  32. edge_containers_cli-5.0.0/uv.lock +1234 -0
  33. edge_containers_cli-4.4.4/.devcontainer/devcontainer.json +0 -46
  34. edge_containers_cli-4.4.4/.github/actions/install_requirements/action.yml +0 -34
  35. edge_containers_cli-4.4.4/.github/workflows/_check.yml +0 -27
  36. edge_containers_cli-4.4.4/.github/workflows/_test.yml +0 -62
  37. edge_containers_cli-4.4.4/.pre-commit-config.yaml +0 -25
  38. edge_containers_cli-4.4.4/Dockerfile +0 -17
  39. edge_containers_cli-4.4.4/src/edge_containers_cli.egg-info/requires.txt +0 -19
  40. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/.dockerignore +0 -0
  41. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/.github/ISSUE_TEMPLATE/issue.md +0 -0
  42. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +0 -0
  43. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/.github/pages/index.html +0 -0
  44. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/.github/pages/make_switcher.py +0 -0
  45. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/.github/workflows/_pypi.yml +0 -0
  46. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/.gitignore +0 -0
  47. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/.vscode/extensions.json +0 -0
  48. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/.vscode/launch.json +0 -0
  49. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/.vscode/settings.json +0 -0
  50. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/.vscode/tasks.json +0 -0
  51. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/LICENSE +0 -0
  52. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/README.md +0 -0
  53. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/docs/conf.py +0 -0
  54. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/docs/developer/explanations/decisions/0001-record-architecture-decisions.rst +0 -0
  55. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/docs/developer/explanations/decisions/0002-switched-to-pip-skeleton.rst +0 -0
  56. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/docs/developer/explanations/decisions.rst +0 -0
  57. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/docs/developer/how-to/build-docs.rst +0 -0
  58. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/docs/developer/how-to/contribute.rst +0 -0
  59. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/docs/developer/how-to/lint.rst +0 -0
  60. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/docs/developer/how-to/make-release.rst +0 -0
  61. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/docs/developer/how-to/pin-requirements.rst +0 -0
  62. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/docs/developer/how-to/run-tests.rst +0 -0
  63. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/docs/developer/how-to/static-analysis.rst +0 -0
  64. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/docs/developer/how-to/test-container.rst +0 -0
  65. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/docs/developer/how-to/update-tools.rst +0 -0
  66. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/docs/developer/index.rst +0 -0
  67. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/docs/developer/reference/standards.rst +0 -0
  68. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/docs/developer/tutorials/dev-install.rst +0 -0
  69. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/docs/genindex.rst +0 -0
  70. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/docs/images/dls-favicon.ico +0 -0
  71. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/docs/images/dls-logo.svg +0 -0
  72. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/docs/images/ec-logs.png +0 -0
  73. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/docs/images/ec-web.png +0 -0
  74. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/docs/index.rst +0 -0
  75. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/docs/user/explanations/docs-structure.rst +0 -0
  76. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/docs/user/how-to/run-container.rst +0 -0
  77. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/docs/user/index.rst +0 -0
  78. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/docs/user/reference/api.rst +0 -0
  79. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/docs/user/tutorials/installation.rst +0 -0
  80. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/setup.cfg +0 -0
  81. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/src/edge_containers_cli/__init__.py +0 -0
  82. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/src/edge_containers_cli/autocomplete.py +0 -0
  83. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/src/edge_containers_cli/backend.py +0 -0
  84. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/src/edge_containers_cli/cli.py +0 -0
  85. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/src/edge_containers_cli/cmds/__init__.py +0 -0
  86. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/src/edge_containers_cli/cmds/commands.py +0 -0
  87. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/src/edge_containers_cli/cmds/k8s_commands.py +0 -0
  88. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/src/edge_containers_cli/cmds/monitor.tcss +0 -0
  89. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/src/edge_containers_cli/git.py +0 -0
  90. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/src/edge_containers_cli/globals.py +0 -0
  91. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/src/edge_containers_cli/logging.py +0 -0
  92. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/src/edge_containers_cli/shell.py +0 -0
  93. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/src/edge_containers_cli/utils.py +0 -0
  94. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/src/edge_containers_cli.egg-info/dependency_links.txt +0 -0
  95. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/src/edge_containers_cli.egg-info/entry_points.txt +0 -0
  96. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/src/edge_containers_cli.egg-info/top_level.txt +0 -0
  97. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/tests/__init__.py +0 -0
  98. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/tests/conftest.py +0 -0
  99. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/tests/data/bl01t-services/services/bl01t-ea-test-01/Chart.yaml +0 -0
  100. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/tests/data/bl01t-services/services/bl01t-ea-test-01/config/ioc.db +0 -0
  101. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/tests/data/bl01t-services/services/bl01t-ea-test-01/config/ioc.yaml +0 -0
  102. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/tests/data/bl01t-services/services/bl01t-ea-test-01/values.yaml +0 -0
  103. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/tests/data/bl01t-services/services/bl01t-ea-test-02/Chart.yaml +0 -0
  104. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/tests/data/bl01t-services/services/bl01t-ea-test-02/values.yaml +0 -0
  105. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/tests/data/bl01t-services/services/dls-aravis/Chart.yaml +0 -0
  106. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/tests/data/bl01t-services/services/dls-aravis/config/ioc.yaml +0 -0
  107. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/tests/data/bl01t-services/services/dls-aravis/values.yaml +0 -0
  108. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/tests/data/bl01t-services/services/values.yaml +0 -0
  109. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/tests/data/cli.yaml +0 -0
  110. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/tests/data/k8s.yaml +0 -0
  111. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/tests/data/yaml.yaml +0 -0
  112. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/tests/test_argocd.py +0 -0
  113. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/tests/test_cli.py +0 -0
  114. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/tests/test_demo.py +0 -0
  115. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/tests/test_k8s.py +0 -0
  116. {edge_containers_cli-4.4.4 → edge_containers_cli-5.0.0}/tests/test_unit.py +0 -0
@@ -1,15 +1,17 @@
1
1
  # Changes here will be overwritten by Copier
2
- _commit: 2.6.0
2
+ _commit: 5.0.0a3
3
3
  _src_path: gh:DiamondLightSource/python-copier-template
4
4
  author_email: giles.knap@gmail.com
5
5
  author_name: Giles Knap
6
6
  description: CLI for deploying and managing epics containers IOCs and services
7
7
  distribution_name: edge-containers-cli
8
8
  docker: true
9
+ docker_debug: false
9
10
  docs_type: README
10
11
  git_platform: github.com
11
12
  github_org: epics-containers
12
13
  package_name: edge_containers_cli
13
14
  pypi: true
14
15
  repo_name: edge-containers-cli
16
+ strict_typing: false
15
17
  type_checker: pyright
@@ -0,0 +1,73 @@
1
+ // For format details, see https://containers.dev/implementors/json_reference/
2
+ {
3
+ "name": "Python 3 Developer Container",
4
+ "build": {
5
+ "dockerfile": "../Dockerfile",
6
+ "target": "developer"
7
+ },
8
+ "remoteEnv": {
9
+ // Allow X11 apps to run inside the container
10
+ "DISPLAY": "${localEnv:DISPLAY}",
11
+ // Do the equivalent of "activate" the venv so we don't have to "uv run" everything
12
+ "VIRTUAL_ENV": "/workspaces/${localWorkspaceFolderBasename}/.venv",
13
+ "PATH": "/workspaces/${localWorkspaceFolderBasename}/.venv/bin:${containerEnv:PATH}"
14
+ },
15
+ "customizations": {
16
+ "vscode": {
17
+ // Set *default* container specific settings.json values on container create.
18
+ "settings": {
19
+ // Use the container's python by default
20
+ "python.defaultInterpreterPath": "/workspaces/${localWorkspaceFolderBasename}/.venv/bin/python",
21
+ // Don't activate the venv as it is already in the PATH
22
+ "python.terminal.activateEnvInCurrentTerminal": false,
23
+ "python.terminal.activateEnvironment": false,
24
+ // Workaround to prevent garbled python REPL in the terminal
25
+ // https://github.com/microsoft/vscode-python/issues/25505
26
+ "python.terminal.shellIntegration.enabled": false
27
+ },
28
+ // Add the IDs of extensions you want installed when the container is created.
29
+ "extensions": [
30
+ "ms-python.python",
31
+ "github.vscode-github-actions",
32
+ "tamasfe.even-better-toml",
33
+ "redhat.vscode-yaml",
34
+ "ryanluker.vscode-coverage-gutters",
35
+ "charliermarsh.ruff",
36
+ "ms-azuretools.vscode-docker"
37
+ ]
38
+ }
39
+ },
40
+ // Create the config folder for the bash-config feature and uv cache
41
+ // NOTE: The uv cache can get large, DLS users should read
42
+ // https://dev-guide.diamond.ac.uk/linux-user-environment/how-tos/disk-quota-troubleshooting
43
+ "initializeCommand": "mkdir -p ${localEnv:HOME}/.config/terminal-config ${localEnv:HOME}/.cache/uv",
44
+ "runArgs": [
45
+ // Allow the container to access the host X11 display and EPICS CA
46
+ "--net=host",
47
+ // Make sure SELinux does not disable with access to host filesystems like tmp
48
+ "--security-opt=label=disable"
49
+ ],
50
+ "mounts": [
51
+ // Mount in the user terminal config folder so it can be edited
52
+ {
53
+ "source": "${localEnv:HOME}/.config/terminal-config",
54
+ "target": "/user-terminal-config",
55
+ "type": "bind"
56
+ },
57
+ // Keep a persistent cross container cache for uv
58
+ {
59
+ "source": "${localEnv:HOME}/.cache/uv",
60
+ "target": "/root/.cache/uv",
61
+ "type": "bind"
62
+ },
63
+ // Use a volume mount for the uv venv so it is local to the container
64
+ {
65
+ "target": "/workspaces/${localWorkspaceFolderBasename}/.venv",
66
+ "type": "volume"
67
+ }
68
+ ],
69
+ // Mount the parent as /workspaces so we can pip install peers as editable
70
+ "workspaceMount": "source=${localWorkspaceFolder}/..,target=/workspaces,type=bind",
71
+ // After the container is created, install the python project in editable form
72
+ "postCreateCommand": "uv sync && uv run pre-commit install --install-hooks"
73
+ }
@@ -24,4 +24,4 @@ It is recommended that developers use a [vscode devcontainer](https://code.visua
24
24
 
25
25
  This project was created using the [Diamond Light Source Copier Template](https://github.com/DiamondLightSource/python-copier-template) for Python projects.
26
26
 
27
- For more information on common tasks like setting up a developer environment, running the tests, and setting a pre-commit hook, see the template's [How-to guides](https://diamondlightsource.github.io/python-copier-template/2.6.0/how-to.html).
27
+ For more information on common tasks like setting up a developer environment, running the tests, and setting a pre-commit hook, see the template's [How-to guides](https://diamondlightsource.github.io/python-copier-template/5.0.0a3/how-to.html).
@@ -7,7 +7,7 @@ assignees: ''
7
7
 
8
8
  ---
9
9
 
10
- Describe the bug, including a clear and concise description of the expected behavior, the actual behavior and the context in which you encountered it (ideally include details of your environment).
10
+ Describe the bug, including a clear and concise description of the expected behaviour, the actual behavior and the context in which you encountered it (ideally include details of your environment).
11
11
 
12
12
  ## Steps To Reproduce
13
13
  Steps to reproduce the behavior:
@@ -13,6 +13,8 @@ updates:
13
13
  actions:
14
14
  patterns:
15
15
  - "*"
16
+ commit-message:
17
+ prefix: "chore"
16
18
 
17
19
  - package-ecosystem: "pip"
18
20
  directory: "/"
@@ -22,3 +24,5 @@ updates:
22
24
  dev-dependencies:
23
25
  patterns:
24
26
  - "*"
27
+ commit-message:
28
+ prefix: "chore"
@@ -1,5 +1,9 @@
1
1
  on:
2
2
  workflow_call:
3
+ inputs:
4
+ publish:
5
+ type: boolean
6
+ description: If true, pushes image to container registry
3
7
 
4
8
  jobs:
5
9
  build:
@@ -47,7 +51,7 @@ jobs:
47
51
  type=raw,value=latest
48
52
 
49
53
  - name: Push cached image to container registry
50
- if: github.ref_type == 'tag'
54
+ if: inputs.publish && github.ref_type == 'tag'
51
55
  uses: docker/build-push-action@v6
52
56
  env:
53
57
  DOCKER_BUILD_RECORD_UPLOAD: false
@@ -12,10 +12,13 @@ jobs:
12
12
  # Need this to get version number from last tag
13
13
  fetch-depth: 0
14
14
 
15
+ - name: Install uv
16
+ uses: astral-sh/setup-uv@v6
17
+
15
18
  - name: Build sdist and wheel
16
19
  run: >
17
20
  export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) &&
18
- pipx run build
21
+ uvx --from build pyproject-build
19
22
 
20
23
  - name: Upload sdist and wheel as artifacts
21
24
  uses: actions/upload-artifact@v4
@@ -24,12 +27,10 @@ jobs:
24
27
  path: dist
25
28
 
26
29
  - name: Check for packaging errors
27
- run: pipx run twine check --strict dist/*
30
+ run: uvx twine check --strict dist/*
28
31
 
29
32
  - name: Install produced wheel
30
- uses: ./.github/actions/install_requirements
31
- with:
32
- pip-install: dist/*.whl
33
+ run: python -m pip install dist/*.whl
33
34
 
34
35
  - name: Test module --version works using the installed wheel
35
36
  # If more than one module in src/ replace with module name to test
@@ -23,7 +23,7 @@ jobs:
23
23
  - name: Create GitHub Release
24
24
  # We pin to the SHA, not the tag, for security reasons.
25
25
  # https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
26
- uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1
26
+ uses: softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631 # v2.2.2
27
27
  with:
28
28
  prerelease: ${{ contains(github.ref_name, 'a') || contains(github.ref_name, 'b') || contains(github.ref_name, 'rc') }}
29
29
  files: "*"
@@ -0,0 +1,44 @@
1
+ on:
2
+ workflow_call:
3
+ inputs:
4
+ python-version:
5
+ type: string
6
+ description: The version of python to install, default is from .python-version file
7
+ default: ""
8
+ runs-on:
9
+ type: string
10
+ description: The runner to run this job on
11
+ required: true
12
+ secrets:
13
+ CODECOV_TOKEN:
14
+ required: true
15
+
16
+ env:
17
+ # https://github.com/pytest-dev/pytest/issues/2042
18
+ PY_IGNORE_IMPORTMISMATCH: "1"
19
+ UV_PYTHON: ${{ inputs.python-version }}
20
+
21
+ jobs:
22
+ run:
23
+ runs-on: ${{ inputs.runs-on }}
24
+
25
+ steps:
26
+ - name: Checkout
27
+ uses: actions/checkout@v4
28
+ with:
29
+ # Need this to get version number from last tag
30
+ fetch-depth: 0
31
+
32
+ - name: Install uv
33
+ uses: astral-sh/setup-uv@v5
34
+
35
+ - name: Run tests
36
+ run: uv run --locked tox -e tests
37
+
38
+ - name: Upload coverage to Codecov
39
+ uses: codecov/codecov-action@v5
40
+ with:
41
+ name: ${{ inputs.python-version }}/${{ inputs.runs-on }}
42
+ files: cov.xml
43
+ env:
44
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
@@ -15,8 +15,8 @@ jobs:
15
15
  - name: Checkout
16
16
  uses: actions/checkout@v4
17
17
 
18
- - name: Install python packages
19
- uses: ./.github/actions/install_requirements
18
+ - name: Install uv
19
+ uses: astral-sh/setup-uv@v5
20
20
 
21
21
  - name: Run tox
22
- run: tox -e ${{ inputs.tox }}
22
+ run: uv run --locked tox -e ${{ inputs.tox }}
@@ -2,30 +2,24 @@ name: CI
2
2
 
3
3
  on:
4
4
  push:
5
+ branches:
6
+ - main
7
+ tags:
8
+ - '*'
5
9
  pull_request:
6
10
 
7
11
  jobs:
8
- check:
9
- uses: ./.github/workflows/_check.yml
10
12
 
11
13
  lint:
12
- needs: check
13
- if: needs.check.outputs.branch-pr == ''
14
14
  uses: ./.github/workflows/_tox.yml
15
15
  with:
16
16
  tox: pre-commit,type-checking
17
17
 
18
18
  test:
19
- needs: check
20
- if: needs.check.outputs.branch-pr == ''
21
19
  strategy:
22
20
  matrix:
23
21
  runs-on: ["ubuntu-latest"] # can add windows-latest, macos-latest
24
- python-version: ["3.10", "3.11", "3.12"]
25
- include:
26
- # Include one that runs in the dev environment
27
- - runs-on: "ubuntu-latest"
28
- python-version: "dev"
22
+ python-version: ["3.11", "3.12", "3.13"]
29
23
  fail-fast: false
30
24
  uses: ./.github/workflows/_test.yml
31
25
  with:
@@ -35,28 +29,28 @@ jobs:
35
29
  CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
36
30
 
37
31
  container:
38
- needs: check
39
- if: needs.check.outputs.branch-pr == ''
32
+ needs: test
33
+ if: always()
40
34
  uses: ./.github/workflows/_container.yml
35
+ with:
36
+ publish: ${{ needs.test.result == 'success' }}
41
37
  permissions:
42
38
  contents: read
43
39
  packages: write
44
40
 
45
41
  dist:
46
- needs: check
47
- if: needs.check.outputs.branch-pr == ''
48
42
  uses: ./.github/workflows/_dist.yml
49
43
 
50
44
  pypi:
45
+ needs: [dist, test]
51
46
  if: github.ref_type == 'tag'
52
- needs: dist
53
47
  uses: ./.github/workflows/_pypi.yml
54
48
  permissions:
55
49
  id-token: write
56
50
 
57
51
  release:
52
+ needs: [dist, test]
58
53
  if: github.ref_type == 'tag'
59
- needs: [dist]
60
54
  uses: ./.github/workflows/_release.yml
61
55
  permissions:
62
56
  contents: write
@@ -0,0 +1,19 @@
1
+ # This allow-list is limited to YAML/YML files to cut down SealedSecrets false positives.
2
+ # All gitleaks default rules still apply everywhere (useDefault = true).
3
+ # To broaden this allow-list to all files, comment out the 'paths' line below.
4
+
5
+ [extend]
6
+ useDefault = true
7
+
8
+ [[rules]]
9
+ id = "generic-api-key"
10
+
11
+ # Pattern-only allowlist for long Ag… tokens in YAML
12
+ [[rules.allowlists]]
13
+ condition = "AND"
14
+ regexes = [
15
+ # Boundary-safe Ag… token without lookarounds (RE2-safe)
16
+ '''(?:^|[^A-Za-z0-9+/=])(Ag[A-Za-z0-9+/]{500,}={0,2})(?:[^A-Za-z0-9+/=]|$)'''
17
+ ]
18
+ # Limit to YAML only for now. Comment this out if you want it to apply everywhere.
19
+ paths = ['''(?i).*\.ya?ml$''']
@@ -0,0 +1,40 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v5.0.0
4
+ hooks:
5
+ - id: check-added-large-files
6
+ args: ["--maxkb=1000"] # uv.lock is more than 500kB
7
+ - id: check-yaml
8
+ # omit helm templates which are not valid yaml
9
+ exclude: ^.*configmap.yaml$
10
+ - id: check-merge-conflict
11
+ - id: end-of-file-fixer
12
+
13
+ - repo: local
14
+ hooks:
15
+ - id: ruff
16
+ name: lint with ruff
17
+ language: system
18
+ entry: ruff check --force-exclude --fix
19
+ types: [python]
20
+ require_serial: true
21
+
22
+ - id: ruff-format
23
+ name: format with ruff
24
+ language: system
25
+ entry: ruff format --force-exclude
26
+ types: [python]
27
+ require_serial: true
28
+ exclude: tests/data/bl01t
29
+
30
+ - id: uv-sync
31
+ name: update uv.lock and venv
32
+ pass_filenames: false
33
+ language: system
34
+ entry: uv sync
35
+ files: ^(uv\.lock|pyproject\.toml)$
36
+
37
+ - repo: https://github.com/gitleaks/gitleaks
38
+ rev: v8.28.0
39
+ hooks:
40
+ - id: gitleaks
@@ -0,0 +1 @@
1
+ 3.11
@@ -0,0 +1,43 @@
1
+ # The devcontainer should use the developer target and run as root with podman
2
+ # or docker with user namespaces.
3
+ FROM ghcr.io/diamondlightsource/ubuntu-devcontainer:noble AS developer
4
+
5
+ # Add any system dependencies for the developer/build environment here
6
+ RUN apt-get update -y && apt-get install -y --no-install-recommends \
7
+ graphviz \
8
+ && apt-get dist-clean
9
+
10
+ # The build stage installs the context into the venv
11
+ FROM developer AS build
12
+
13
+ # Change the working directory to the `app` directory
14
+ # and copy in the project
15
+ WORKDIR /app
16
+ COPY . /app
17
+ RUN chmod o+wrX .
18
+
19
+ # Tell uv sync to install python in a known location so we can copy it out later
20
+ ENV UV_PYTHON_INSTALL_DIR=/python
21
+
22
+ # Sync the project without its dev dependencies
23
+ RUN --mount=type=cache,target=/root/.cache/uv \
24
+ uv sync --locked --no-editable --no-dev
25
+
26
+
27
+ # The runtime stage copies the built venv into a runtime container
28
+ FROM ubuntu:noble AS runtime
29
+
30
+ # Add apt-get system dependecies for runtime here if needed
31
+ # RUN apt-get update -y && apt-get install -y --no-install-recommends \
32
+ # some-library \
33
+ # && apt-get dist-clean
34
+
35
+ # Copy the python installation from the build stage
36
+ COPY --from=build /python /python
37
+
38
+ # Copy the environment, but not the source code
39
+ COPY --from=build /app/.venv /app/.venv
40
+ ENV PATH=/app/.venv/bin:$PATH
41
+
42
+ ENTRYPOINT ["ec"]
43
+ CMD ["--version"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: edge-containers-cli
3
- Version: 4.4.4
3
+ Version: 5.0.0
4
4
  Summary: CLI for deploying and managing epics containers IOCs and services
5
5
  Author-email: Giles Knap <giles.knap@gmail.com>
6
6
  License: Apache License
@@ -208,10 +208,10 @@ License: Apache License
208
208
  Project-URL: GitHub, https://github.com/epics-containers/edge-containers-cli
209
209
  Classifier: Development Status :: 3 - Alpha
210
210
  Classifier: License :: OSI Approved :: Apache Software License
211
- Classifier: Programming Language :: Python :: 3.10
212
211
  Classifier: Programming Language :: Python :: 3.11
213
212
  Classifier: Programming Language :: Python :: 3.12
214
- Requires-Python: >=3.10
213
+ Classifier: Programming Language :: Python :: 3.13
214
+ Requires-Python: >=3.11
215
215
  Description-Content-Type: text/markdown
216
216
  License-File: LICENSE
217
217
  Requires-Dist: natsort
@@ -221,17 +221,7 @@ Requires-Dist: ruamel.yaml
221
221
  Requires-Dist: jinja2
222
222
  Requires-Dist: polars-lts-cpu
223
223
  Requires-Dist: textual
224
- Provides-Extra: dev
225
- Requires-Dist: copier; extra == "dev"
226
- Requires-Dist: pipdeptree; extra == "dev"
227
- Requires-Dist: pre-commit; extra == "dev"
228
- Requires-Dist: pyright; extra == "dev"
229
- Requires-Dist: pytest; extra == "dev"
230
- Requires-Dist: pytest-cov; extra == "dev"
231
- Requires-Dist: pytest-mock; extra == "dev"
232
- Requires-Dist: ruff; extra == "dev"
233
- Requires-Dist: tox-direct; extra == "dev"
234
- Requires-Dist: types-mock; extra == "dev"
224
+ Requires-Dist: urllib3<2.4.0
235
225
  Dynamic: license-file
236
226
 
237
227
  [![CI](https://github.com/epics-containers/edge-containers-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/epics-containers/edge-containers-cli/actions/workflows/ci.yml)
@@ -7,9 +7,9 @@ name = "edge-containers-cli"
7
7
  classifiers = [
8
8
  "Development Status :: 3 - Alpha",
9
9
  "License :: OSI Approved :: Apache Software License",
10
- "Programming Language :: Python :: 3.10",
11
10
  "Programming Language :: Python :: 3.11",
12
11
  "Programming Language :: Python :: 3.12",
12
+ "Programming Language :: Python :: 3.13",
13
13
  ]
14
14
  description = "CLI for deploying and managing epics containers IOCs and services"
15
15
 
@@ -21,24 +21,26 @@ dependencies = [
21
21
  "jinja2",
22
22
  "polars-lts-cpu",
23
23
  "textual",
24
+ # urllib>=2.4.0 fails to validate DLS Kubernetes certificates
25
+ # https://github.com/kubernetes-client/python/issues/2394
26
+ "urllib3<2.4.0",
24
27
  ]
25
28
 
26
29
  dynamic = ["version"]
27
30
  license.file = "LICENSE"
28
31
  readme = "README.md"
29
- requires-python = ">=3.10"
32
+ requires-python = ">=3.11"
30
33
 
31
- [project.optional-dependencies]
34
+ [dependency-groups]
32
35
  dev = [
33
36
  "copier",
34
- "pipdeptree",
35
37
  "pre-commit",
36
38
  "pyright",
37
39
  "pytest",
38
40
  "pytest-cov",
39
41
  "pytest-mock",
40
42
  "ruff",
41
- "tox-direct",
43
+ "tox-uv",
42
44
  "types-mock",
43
45
  ]
44
46
 
@@ -52,13 +54,12 @@ GitHub = "https://github.com/epics-containers/edge-containers-cli"
52
54
  email = "giles.knap@gmail.com"
53
55
  name = "Giles Knap"
54
56
 
55
-
56
57
  [tool.setuptools_scm]
57
58
  version_file = "src/edge_containers_cli/_version.py"
58
59
 
59
60
  [tool.pyright]
60
61
  typeCheckingMode = "standard"
61
- reportMissingImports = false # Ignore missing stubs in imported modules
62
+ reportMissingImports = false # Ignore missing stubs in imported modules
62
63
 
63
64
  [tool.pytest.ini_options]
64
65
  # Run pytest with all our checkers, and don't spam us with massive tracebacks on error
@@ -75,6 +76,7 @@ filterwarnings = [
75
76
  testpaths = "src tests"
76
77
 
77
78
  [tool.coverage.run]
79
+ patch = ["subprocess"]
78
80
  data_file = "/tmp/edge_containers_cli.coverage"
79
81
  omit = ["src/edge_containers_cli/cmds/monitor.py"]
80
82
 
@@ -88,23 +90,55 @@ omit = ["src/edge_containers_cli/cmds/monitor.py"]
88
90
  # tox must currently be configured via an embedded ini string
89
91
  # See: https://github.com/tox-dev/tox/issues/999
90
92
  [tool.tox]
91
- legacy_tox_ini = """
92
- [tox]
93
- skipsdist=True
94
-
95
- [testenv:{pre-commit,type-checking,tests}]
96
- # Don't create a virtualenv for the command, requires tox-direct plugin
97
- direct = True
98
- passenv = *
99
- allowlist_externals =
100
- pytest
101
- pre-commit
102
- pyright
103
- commands =
104
- pre-commit: pre-commit run --all-files --show-diff-on-failure {posargs}
105
- type-checking: pyright src tests {posargs}
106
- tests: pytest --cov=edge_containers_cli --cov-report term --cov-report xml:cov.xml {posargs}
107
- """
93
+ skipsdist = true
94
+ # envs to runs automatically with tox -p
95
+ env_list = ["pre-commit", "type-checking", "tests"]
96
+
97
+ [tool.tox.env_run_base]
98
+ # Pass all environment variables to the test environments
99
+ passenv = ["*"]
100
+
101
+ [tool.tox.env.pre-commit]
102
+ description = "Run pre-commit on all files"
103
+ commands = [
104
+ [
105
+ "pre-commit",
106
+ "run",
107
+ "--all-files",
108
+ "--show-diff-on-failure",
109
+ { replace = "posargs", default = [
110
+ ], extend = true },
111
+ ],
112
+ ]
113
+
114
+ [tool.tox.env.type-checking]
115
+ description = "Run pyright"
116
+ commands = [
117
+ [
118
+ "pyright",
119
+ "--pythonpath",
120
+ ".venv/bin/python",
121
+ "src",
122
+ "tests",
123
+ { replace = "posargs", default = [
124
+ ], extend = true },
125
+ ],
126
+ ]
127
+
128
+ [tool.tox.env.tests]
129
+ description = "Run tests with coverage"
130
+ commands = [
131
+ [
132
+ "pytest",
133
+ "--cov=edge_containers_cli",
134
+ "--cov-report",
135
+ "term",
136
+ "--cov-report",
137
+ "xml:cov.xml",
138
+ { replace = "posargs", default = [
139
+ ], extend = true },
140
+ ],
141
+ ]
108
142
 
109
143
  [tool.ruff]
110
144
  src = ["src", "tests"]
@@ -114,12 +148,15 @@ lint.ignore = [
114
148
  "E501", # Line too long, should be fixed by black.
115
149
  "B008", # Do not perform function calls in argument defaults.
116
150
  "UP007", # Do not complain about Optional[] (TODO: remove once typer is patched)
151
+ "N803", # Argument name should be lowercase
152
+ "N802", # Function name should be lowercase
117
153
  ]
118
154
  lint.select = [
119
155
  "B", # flake8-bugbear - https://docs.astral.sh/ruff/rules/#flake8-bugbear-b
120
156
  "C4", # flake8-comprehensions - https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4
121
157
  "E", # pycodestyle errors - https://docs.astral.sh/ruff/rules/#error-e
122
158
  "F", # pyflakes rules - https://docs.astral.sh/ruff/rules/#pyflakes-f
159
+ "N", # pep8-naming - https://docs.astral.sh/ruff/rules/#pep8-naming-n
123
160
  "W", # pycodestyle warnings - https://docs.astral.sh/ruff/rules/#warning-w
124
161
  "I", # isort - https://docs.astral.sh/ruff/rules/#isort-i
125
162
  "UP", # pyupgrade - https://docs.astral.sh/ruff/rules/#pyupgrade-up
@@ -1,6 +1,5 @@
1
1
  import os
2
2
  import sys
3
- from typing import Optional
4
3
 
5
4
  import typer
6
5
 
@@ -36,7 +35,7 @@ def backend_callback(ctx: typer.Context, backend: ECBackends):
36
35
  @cli.callback()
37
36
  def _main(
38
37
  ctx: typer.Context,
39
- version: Optional[bool] = typer.Option(
38
+ version: bool | None = typer.Option(
40
39
  None,
41
40
  "--version",
42
41
  callback=version_callback,
@@ -1,7 +1,14 @@
1
1
  # file generated by setuptools-scm
2
2
  # don't change, don't track in version control
3
3
 
4
- __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
4
+ __all__ = [
5
+ "__version__",
6
+ "__version_tuple__",
7
+ "version",
8
+ "version_tuple",
9
+ "__commit_id__",
10
+ "commit_id",
11
+ ]
5
12
 
6
13
  TYPE_CHECKING = False
7
14
  if TYPE_CHECKING:
@@ -9,13 +16,19 @@ if TYPE_CHECKING:
9
16
  from typing import Union
10
17
 
11
18
  VERSION_TUPLE = Tuple[Union[int, str], ...]
19
+ COMMIT_ID = Union[str, None]
12
20
  else:
13
21
  VERSION_TUPLE = object
22
+ COMMIT_ID = object
14
23
 
15
24
  version: str
16
25
  __version__: str
17
26
  __version_tuple__: VERSION_TUPLE
18
27
  version_tuple: VERSION_TUPLE
28
+ commit_id: COMMIT_ID
29
+ __commit_id__: COMMIT_ID
19
30
 
20
- __version__ = version = '4.4.4'
21
- __version_tuple__ = version_tuple = (4, 4, 4)
31
+ __version__ = version = '5.0.0'
32
+ __version_tuple__ = version_tuple = (5, 0, 0)
33
+
34
+ __commit_id__ = commit_id = 'g7454dd976'