-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from blink1073/moar-tests
- Loading branch information
Showing
13 changed files
with
466 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Enforce PR label | ||
|
||
on: | ||
pull_request: | ||
types: [labeled, unlabeled, opened, edited, synchronize] | ||
jobs: | ||
enforce-label: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
steps: | ||
- name: enforce-triage-label | ||
uses: jupyterlab/maintainer-tools/.github/actions/enforce-label@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Changelog | ||
|
||
<!-- <START NEW CHANGELOG ENTRY> --> | ||
<!-- <END NEW CHANGELOG ENTRY> --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,25 @@ | ||
from hatchling.builders.hooks.plugin.interface import BuildHookInterface | ||
|
||
from .utils import ensure_targets, get_build_func | ||
from .utils import ensure_targets, get_build_func, normalize_kwargs | ||
|
||
|
||
class JupyterBuildHook(BuildHookInterface): | ||
PLUGIN_NAME = "jupyter_builder" | ||
PLUGIN_NAME = "jupyter-builder" | ||
|
||
def initialize(self, version, build_data): | ||
# Get the configuration options. | ||
build_function = self.config.get("build_function") | ||
build_kwargs = self.config.get("build_kwargs", {}) | ||
ensured_targets = self.config.get("ensured_targets", []) | ||
build_function = self.config.get("build-function") | ||
build_kwargs = self.config.get("build-kwargs", {}) | ||
ensured_targets = self.config.get("ensured-targets", []) | ||
|
||
if not build_function: | ||
return | ||
|
||
# Get build function, call it, and then ensure targets. | ||
# Get build function and call it with normalized parameter names. | ||
build_func = get_build_func(build_function) | ||
build_kwargs = normalize_kwargs(build_kwargs) | ||
build_func(self.target_name, version, **build_kwargs) | ||
ensure_targets(ensured_targets) | ||
|
||
# Ensure targets in distributable dists. | ||
if version == "standard": | ||
ensure_targets(ensured_targets) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from hatch_jupyter_builder.hooks import hatch_register_build_hook | ||
|
||
hatch_register_build_hook() |
Oops, something went wrong.