Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add event type filtering to listener command #337

Closed
wants to merge 33 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
c6bc748
Add event type filtering to listener command
callumforrester Nov 15, 2023
b5de00f
Fix formatting
callumforrester Nov 28, 2023
eea2794
Extract handler methods to ABC (#342)
joeshannon Dec 13, 2023
6b45d7e
Add try except to messaging connection (#345)
abbiemery Jan 9, 2024
2f10be1
Adapt to Black 24 (#358)
joeshannon Feb 2, 2024
99762fd
Run BlueskyContext and Worker in subprocess (#343)
joeshannon Feb 5, 2024
37ce1e5
Remove reference to deleted devcontainer documentation (#373)
callumforrester Feb 7, 2024
9e214d6
Remove parameter caching inside task class (#370)
callumforrester Feb 7, 2024
b7521d4
Enable getting Stomp authentication credentials from the environment …
DiamondJoseph Feb 27, 2024
3ed23e7
Revamp architecture diagram and add logo (#344)
callumforrester Feb 27, 2024
0920886
Add documentation for writing blueapi compliant plans (#377)
DiamondJoseph Mar 6, 2024
e438a63
remove RunPlan class that wraps Task (#382)
stan-dot Mar 7, 2024
4c2c423
233 pending tasks are not cleared (#386)
stan-dot Mar 14, 2024
c4c0b48
Update run-container.rst (#349)
stan-dot Mar 14, 2024
d5d3f92
Adopt python-copier-template (#384)
joeshannon Mar 15, 2024
1bd3438
Convert README and CONTRIBUTING to markdown (#394)
joeshannon Mar 15, 2024
b424917
Enable ruff pyupgrade ruleset (#395)
joeshannon Mar 15, 2024
a1139d0
Replace skeleton with copier in add-plans-and-devices.rst (#396)
joeshannon Mar 15, 2024
440b4be
Update catalog-info.yaml (#400)
keithralphs Mar 25, 2024
e6b679c
delete config (#408)
stan-dot Apr 4, 2024
2891931
Add logo to README and concept image (#414)
joeshannon Apr 9, 2024
7e07c34
Pin dodal to previous version (#420)
joeshannon Apr 12, 2024
62bd9a5
Drop Support for Python3.9 (#418)
callumforrester Apr 12, 2024
bde195d
Convert ADR 0001 to markdown (#415)
joeshannon Apr 12, 2024
87d7fe1
Renumber adrs (#417)
joeshannon Apr 12, 2024
fc08129
Update pyproject.toml to new stomp name (#424)
DominicOram Apr 19, 2024
2ba5ee5
Allow context to deal with new style unions and add tests (#436)
DominicOram Apr 26, 2024
871d775
Remove message bus dependency (#433)
ZohebShaikh Apr 26, 2024
cd4b109
Fix Coverage Settings (#438)
callumforrester Apr 26, 2024
390aa77
Remove DirectoryProvider and pre-processor handling to Dodal (#376)
DiamondJoseph Apr 29, 2024
87dd614
Install git in runtime container (#446)
joeshannon May 1, 2024
ffc184c
Auto restart deployment on config change (#450)
joeshannon May 2, 2024
5b5bd34
Add event type filtering to listener command
callumforrester Nov 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Changes here will be overwritten by Copier
_commit: 2.0.1
_src_path: gh:DiamondLightSource/python-copier-template
author_email: [email protected]
author_name: Callum Forrester
component_owner: user:vid18871
description: Lightweight bluesky-as-a-service wrapper application. Also usable as
a library.
distribution_name: blueapi
docker: true
docs_type: sphinx
git_platform: github.com
github_org: DiamondLightSource
package_name: blueapi
pypi: true
repo_name: blueapi
type_checker: mypy
41 changes: 0 additions & 41 deletions .devcontainer/Dockerfile

This file was deleted.

54 changes: 23 additions & 31 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,45 @@
{
"name": "Python 3 Developer Container",
"build": {
"dockerfile": "Dockerfile",
"target": "build",
// Only upgrade pip, we will install the project below
"args": {
"PIP_OPTIONS": "--upgrade pip"
}
"dockerfile": "../Dockerfile",
"target": "developer"
},
"remoteEnv": {
// Allow X11 apps to run inside the container
"DISPLAY": "${localEnv:DISPLAY}"
},
// Add the URLs of features you want added when the container is built.
"features": {
"ghcr.io/devcontainers/features/common-utils:1": {
"username": "none",
"upgradePackages": false
}
},
// Set *default* container specific settings.json values on container create.
"settings": {
"python.defaultInterpreterPath": "/venv/bin/python"
},
"customizations": {
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"python.defaultInterpreterPath": "/venv/bin/python"
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.python",
"github.vscode-github-actions",
"tamasfe.even-better-toml",
"redhat.vscode-yaml",
"ryanluker.vscode-coverage-gutters"
"ryanluker.vscode-coverage-gutters",
"charliermarsh.ruff",
"ms-azuretools.vscode-docker"
]
}
},
// Make sure the files we are mapping into the container exist on the host
"initializeCommand": "bash -c 'for i in $HOME/.inputrc; do [ -f $i ] || touch $i; done'",
"features": {
// Some default things like git config
"ghcr.io/devcontainers/features/common-utils:2": {
"upgradePackages": false
}
},
"runArgs": [
// Allow the container to access the host X11 display and EPICS CA
"--net=host",
"--security-opt=label=type:container_runtime_t"
],
"mounts": [
"source=${localEnv:HOME}/.ssh,target=/root/.ssh,type=bind",
"source=${localEnv:HOME}/.inputrc,target=/root/.inputrc,type=bind",
// map in home directory - not strictly necessary but useful
"source=${localEnv:HOME},target=${localEnv:HOME},type=bind,consistency=cached"
// Make sure SELinux does not disable with access to host filesystems like tmp
"--security-opt=label=disable"
],
// make the workspace folder the same inside and outside of the container
"workspaceMount": "source=${localWorkspaceFolder},target=${localWorkspaceFolder},type=bind",
"workspaceFolder": "${localWorkspaceFolder}",
// Mount the parent as /workspaces so we can pip install peers as editable
"workspaceMount": "source=${localWorkspaceFolder}/..,target=/workspaces,type=bind",
// After the container is created, install the python project in editable form
"postCreateCommand": "pip install -e .[dev]"
"postCreateCommand": "pip install $([ -f dev-requirements.txt ] && echo '-c dev-requirements.txt') -e '.[dev]' && pre-commit install"
}
27 changes: 27 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Contribute to the project

Contributions and issues are most welcome! All issues and pull requests are
handled through [GitHub](https://github.com/DiamondLightSource/blueapi/issues). Also, please check for any existing issues before
filing a new one. If you have a great idea but it involves big changes, please
file a ticket before making a pull request! We want to make sure you don't spend
your time coding something that might not fit the scope of the project.

## Issue or Discussion?

Github also offers [discussions](https://github.com/DiamondLightSource/blueapi/discussions) as a place to ask questions and share ideas. If
your issue is open ended and it is not obvious when it can be "closed", please
raise it as a discussion instead.

## Code Coverage

While 100% code coverage does not make a library bug-free, it significantly
reduces the number of easily caught bugs! Please make sure coverage remains the
same or is improved by a pull request!

## Developer Information

It is recommended that developers use a [vscode devcontainer](https://code.visualstudio.com/docs/devcontainers/containers). This repository contains configuration to set up a containerized development environment that suits its own needs.

This project was created using the [Diamond Light Source Copier Template](https://github.com/DiamondLightSource/python-copier-template) for Python projects.

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.0.1/how-to.html).
35 changes: 0 additions & 35 deletions .github/CONTRIBUTING.rst

This file was deleted.

65 changes: 21 additions & 44 deletions .github/actions/install_requirements/action.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,34 @@
name: Install requirements
description: Run pip install with requirements and upload resulting requirements
description: Install a version of python then call pip install and report what was installed
inputs:
requirements_file:
description: Name of requirements file to use and upload
required: true
install_options:
python-version:
description: Python version to install, default is from Dockerfile
default: "dev"
pip-install:
description: Parameters to pass to pip install
required: true
python_version:
description: Python version to install
default: "3.9"
default: "$([ -f dev-requirements.txt ] && echo '-c dev-requirements.txt') -e .[dev]"

runs:
using: composite

steps:
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python_version }}

- name: Pip install
run: |
touch ${{ inputs.requirements_file }}
# -c uses requirements.txt as constraints, see 'Validate requirements file'
pip install -c ${{ inputs.requirements_file }} ${{ inputs.install_options }}
shell: bash

- name: Create lockfile
- name: Get version of python
run: |
mkdir -p lockfiles
pip freeze --exclude-editable --exclude ophyd-async --exclude dls-dodal --exclude dls-bluesky-core --exclude bluesky > lockfiles/${{ inputs.requirements_file }}
# delete the self referencing line and make sure it isn't blank
sed -i '/file:/d' lockfiles/${{ inputs.requirements_file }}
PYTHON_VERSION="${{ inputs.python-version }}"
if [ $PYTHON_VERSION == "dev" ]; then
PYTHON_VERSION=$(sed -n "s/ARG PYTHON_VERSION=//p" Dockerfile)
fi
echo "PYTHON_VERSION=$PYTHON_VERSION" >> "$GITHUB_ENV"
shell: bash

- name: Upload lockfiles
uses: actions/upload-artifact@v3
- name: Setup python
uses: actions/setup-python@v5
with:
name: lockfiles
path: lockfiles
python-version: ${{ env.PYTHON_VERSION }}

# This eliminates the class of problems where the requirements being given no
# longer match what the packages themselves dictate. E.g. In the rare instance
# where I install some-package which used to depend on vulnerable-dependency
# but now uses good-dependency (despite being nominally the same version)
# pip will install both if given a requirements file with -r
- name: If requirements file exists, check it matches pip installed packages
run: |
if [ -s ${{ inputs.requirements_file }} ]; then
if ! diff -u ${{ inputs.requirements_file }} lockfiles/${{ inputs.requirements_file }}; then
echo "Error: ${{ inputs.requirements_file }} need the above changes to be exhaustive"
exit 1
fi
fi
- name: Install packages
run: pip install ${{ inputs.pip-install }}
shell: bash

- name: Report what was installed
run: pip freeze
shell: bash
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,16 @@ updates:
directory: "/"
schedule:
interval: "weekly"
groups:
actions:
patterns:
- "*"

- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
groups:
dev-dependencies:
patterns:
- "*"
8 changes: 4 additions & 4 deletions .github/pages/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<html>

<head>
<title>Redirecting to main branch</title>
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; url=./main/index.html">
<link rel="canonical" href="main/index.html">
<title>Redirecting to main branch</title>
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; url=./main/index.html">
<link rel="canonical" href="main/index.html">
</head>

</html>
Loading
Loading