Skip to content

Commit

Permalink
Merge pull request #1518 from manics/build-traitlets
Browse files Browse the repository at this point in the history
Use Traitlets for passing parameters to `Build` classes
  • Loading branch information
minrk authored Aug 15, 2022
2 parents 4ce6dc1 + b49edf6 commit c4af713
Show file tree
Hide file tree
Showing 7 changed files with 440 additions and 363 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
# jobs or have "template" jobs, so we use `if` conditions on steps
tests:
runs-on: ubuntu-20.04
timeout-minutes: 10
strategy:
# keep running so we can see if tests with other k3s/k8s/helm versions pass
fail-fast: false
Expand Down Expand Up @@ -278,6 +279,7 @@ jobs:

test-local:
runs-on: ubuntu-20.04
timeout-minutes: 5
steps:
- uses: actions/checkout@v3

Expand Down
6 changes: 4 additions & 2 deletions binderhub/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
from traitlets.config import Application

from .base import AboutHandler, Custom404, VersionHandler
from .build import Build
from .build import Build, BuildExecutor
from .builder import BuildHandler
from .config import ConfigHandler
from .events import EventLog
Expand Down Expand Up @@ -270,10 +270,11 @@ def _valid_badge_base_url(self, proposal):

build_class = Type(
Build,
klass=BuildExecutor,
help="""
The class used to build repo2docker images.
Must inherit from binderhub.build.Build
Must inherit from binderhub.build.BuildExecutor
""",
config=True,
)
Expand Down Expand Up @@ -818,6 +819,7 @@ def initialize(self, *args, **kwargs):
"build_class": self.build_class,
"registry": registry,
"traitlets_config": self.config,
"traitlets_parent": self,
"google_analytics_code": self.google_analytics_code,
"google_analytics_domain": self.google_analytics_domain,
"about_message": self.about_message,
Expand Down
Loading

0 comments on commit c4af713

Please sign in to comment.