Skip to content

Commit

Permalink
Merge branch 'master' into enhancement/refactor-case-cost-model
Browse files Browse the repository at this point in the history
  • Loading branch information
metroid-samus authored Dec 17, 2024
2 parents de05a87 + 1150a71 commit 94490cc
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/publish-image-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Test image build

on: pull_request

jobs:
build_image:
name: Build Docker image
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Build without push
uses: docker/build-push-action@v1
with:
push: false
2 changes: 1 addition & 1 deletion requirements-base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ python-dateutil==2.9.0.post0
# pandas
python-jose==3.3.0
# via -r requirements-base.in
python-multipart==0.0.19
python-multipart==0.0.20
# via -r requirements-base.in
python-slugify==8.0.4
# via -r requirements-base.in
Expand Down
10 changes: 4 additions & 6 deletions src/dispatch/common/utils/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,18 @@

logger = logging.getLogger(__name__)


# Plugin endpoints should determine authentication # TODO allow them to specify (kglisson)
def install_plugin_events(api):
"""Adds plugin endpoints to the event router."""
for plugin in plugins.all():
if plugin.events:
api.include_router(plugin.events, prefix="/{organization}/events", tags=["events"])


def install_plugins():
"""
Installs plugins associated with dispatch
:return:
"""
# Retrieve entry points for 'dispatch.plugins'
dispatch_plugins = entry_points().get("dispatch.plugins", [])
"""Installs plugins associated with dispatch"""
dispatch_plugins = entry_points().select(group="dispatch.plugins")

for ep in dispatch_plugins:
logger.info(f"Attempting to load plugin: {ep.name}")
Expand Down

0 comments on commit 94490cc

Please sign in to comment.