Skip to content

Commit c1397be

Browse files
committed
Update releaser config
1 parent ec2fc86 commit c1397be

File tree

13 files changed

+830
-633
lines changed

13 files changed

+830
-633
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,12 @@ jobs:
4444
id: yarn-cache
4545
with:
4646
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
47-
key: yarn-${{ hashFiles('frontend/yarn.lock') }}
47+
key: yarn-${{ hashFiles('./yarn.lock') }}
4848
restore-keys: |
4949
yarn-
5050
5151
- name: Lint the application
5252
shell: bash -l {0}
53-
working-directory: frontend
5453
run: |
5554
set -eux
5655
yarn install
@@ -181,7 +180,7 @@ jobs:
181180
182181
- name: Install UI test dependencies
183182
shell: bash -l {0}
184-
working-directory: frontend/ui-tests
183+
working-directory: ui-tests
185184
env:
186185
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
187186
run: yarn install
@@ -191,16 +190,16 @@ jobs:
191190
with:
192191
path: |
193192
${{ github.workspace }}/pw-browsers
194-
key: ${{ runner.os }}-${{ hashFiles('frontend/ui-tests/yarn.lock') }}
193+
key: ${{ runner.os }}-${{ hashFiles('ui-tests/yarn.lock') }}
195194

196195
- name: Install browser
197196
shell: bash -l {0}
198197
run: npx playwright install chromium
199-
working-directory: frontend/ui-tests
198+
working-directory: ui-tests
200199

201200
- name: Execute integration tests
202201
shell: bash -l {0}
203-
working-directory: frontend/ui-tests
202+
working-directory: ui-tests
204203
run: |
205204
npx playwright test
206205
@@ -210,5 +209,5 @@ jobs:
210209
with:
211210
name: tljh-playwright-tests
212211
path: |
213-
frontend/ui-tests/test-results
214-
frontend/ui-tests/playwright-report
212+
ui-tests/test-results
213+
ui-tests/playwright-report

.gitignore

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@ MANIFEST
2020
# Local TLJH config file
2121
config.yaml
2222

23+
# Frontend assets
2324
.yarn
2425
node_modules
25-
frontend/dist
26-
frontend/lib
27-
frontend/ui-tests/playwright-report
28-
frontend/ui-tests/test-results
29-
**/js/react/
26+
dist/
27+
ui-tests/playwright-report
28+
ui-tests/test-results
29+
**/js
30+
lib/
31+
32+
# Hatch version
33+
_version.py

CHANGELOG.md

Lines changed: 35 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -17,42 +17,43 @@ You can find below the list of changes since the creation of the plugin.
1717

1818
## What's Changed
1919

20-
* Add installation instructions to the README by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/1
21-
* Fix manifest by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/2
22-
* Add optional name to the environment by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/7
23-
* Show more information on the spawner options page by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/10
24-
* Add minimal documentation to the README by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/11
25-
* Update README instructions to install the plugin by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/12
26-
* Expose list_images by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/13
27-
* Show human readable value for mem and cpu limits by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/16
28-
* Rename from PlasmaBio to Plasma by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/17
29-
* Add a simple CI workflow by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/18
30-
* Replace the service by extra hub handlers by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/19
31-
* Add tests by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/21
32-
* Show the build logs in a dialog by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/22
33-
* Lowercase the autogenerated name from the repo by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/23
34-
* Package the tests by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/25
35-
* Async start method in the default spawner by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/28
36-
* Hide 'Cancel' button from logs window by @pierrepo in https://github.com/plasmabio/tljh-repo2docker/pull/33
37-
* Update instead of overwrite extra_host_config by @TimoRoth in https://github.com/plasmabio/tljh-repo2docker/pull/34
38-
* Await rendered template if neccesary by @TimoRoth in https://github.com/plasmabio/tljh-repo2docker/pull/40
39-
* Pin dependencies by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/41
40-
* Add support for GIT_CREDENTIAL_ENV to build private repos by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/42
41-
* Update repo2docker image by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/49
42-
* Pin to `jupyterhub~=1.5` for development, update `dockerspawner`, default ref to `HEAD` by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/50
43-
* Update Python versions on CI by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/51
44-
* Use --label to set labels by @TimoRoth in https://github.com/plasmabio/tljh-repo2docker/pull/48
45-
* Expose custom build-args as advanced option in the UI by @TimoRoth in https://github.com/plasmabio/tljh-repo2docker/pull/52
46-
* Update test binder repo to the new URL by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/53
47-
* Rename test repo to `tljh-repo2docker-test-binder` by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/54
48-
* Pin `notebook<7` and `sqlalchemy<2` for now by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/62
49-
* Resolve 'Show Logs' issue by adding _xsrf token by @yamaton in https://github.com/plasmabio/tljh-repo2docker/pull/61
20+
- Add installation instructions to the README by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/1
21+
- Fix manifest by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/2
22+
- Add optional name to the environment by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/7
23+
- Show more information on the spawner options page by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/10
24+
- Add minimal documentation to the README by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/11
25+
- Update README instructions to install the plugin by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/12
26+
- Expose list_images by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/13
27+
- Show human readable value for mem and cpu limits by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/16
28+
- Rename from PlasmaBio to Plasma by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/17
29+
- Add a simple CI workflow by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/18
30+
- Replace the service by extra hub handlers by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/19
31+
- Add tests by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/21
32+
- Show the build logs in a dialog by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/22
33+
- Lowercase the autogenerated name from the repo by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/23
34+
- Package the tests by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/25
35+
- Async start method in the default spawner by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/28
36+
- Hide 'Cancel' button from logs window by @pierrepo in https://github.com/plasmabio/tljh-repo2docker/pull/33
37+
- Update instead of overwrite extra_host_config by @TimoRoth in https://github.com/plasmabio/tljh-repo2docker/pull/34
38+
- Await rendered template if neccesary by @TimoRoth in https://github.com/plasmabio/tljh-repo2docker/pull/40
39+
- Pin dependencies by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/41
40+
- Add support for GIT_CREDENTIAL_ENV to build private repos by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/42
41+
- Update repo2docker image by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/49
42+
- Pin to `jupyterhub~=1.5` for development, update `dockerspawner`, default ref to `HEAD` by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/50
43+
- Update Python versions on CI by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/51
44+
- Use --label to set labels by @TimoRoth in https://github.com/plasmabio/tljh-repo2docker/pull/48
45+
- Expose custom build-args as advanced option in the UI by @TimoRoth in https://github.com/plasmabio/tljh-repo2docker/pull/52
46+
- Update test binder repo to the new URL by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/53
47+
- Rename test repo to `tljh-repo2docker-test-binder` by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/54
48+
- Pin `notebook<7` and `sqlalchemy<2` for now by @jtpio in https://github.com/plasmabio/tljh-repo2docker/pull/62
49+
- Resolve 'Show Logs' issue by adding \_xsrf token by @yamaton in https://github.com/plasmabio/tljh-repo2docker/pull/61
5050

5151
## New Contributors
52-
* @jtpio made their first contribution in https://github.com/plasmabio/tljh-repo2docker/pull/1
53-
* @pierrepo made their first contribution in https://github.com/plasmabio/tljh-repo2docker/pull/33
54-
* @TimoRoth made their first contribution in https://github.com/plasmabio/tljh-repo2docker/pull/34
55-
* @yamaton made their first contribution in https://github.com/plasmabio/tljh-repo2docker/pull/61
52+
53+
- @jtpio made their first contribution in https://github.com/plasmabio/tljh-repo2docker/pull/1
54+
- @pierrepo made their first contribution in https://github.com/plasmabio/tljh-repo2docker/pull/33
55+
- @TimoRoth made their first contribution in https://github.com/plasmabio/tljh-repo2docker/pull/34
56+
- @yamaton made their first contribution in https://github.com/plasmabio/tljh-repo2docker/pull/61
5657

5758
**Full Changelog**: https://github.com/plasmabio/tljh-repo2docker/commits/v1
5859

CONTRIBUTING.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ source bin/activate
2626

2727
## Install the development requirements
2828

29-
3029
```bash
3130
python -m pip install -r dev-requirements.txt
3231

@@ -63,4 +62,4 @@ To run the tests:
6362

6463
```bash
6564
python -m pytest --cov
66-
```
65+
```

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,19 @@ for more info on installing TLJH plugins.
3939

4040
### List the environments
4141

42-
The *Environments* page shows the list of built environments, as well as the ones currently being built:
42+
The _Environments_ page shows the list of built environments, as well as the ones currently being built:
4343

4444
![environments](https://user-images.githubusercontent.com/591645/80962805-056df500-8e0e-11ea-81ab-6efc1c97432d.png)
4545

4646
### Add a new environment
4747

48-
Just like on [Binder](https://mybinder.org), new environments can be added by clicking on the *Add New* button and providing a URL to the repository. Optional names, memory, and CPU limits can also be set for the environment:
48+
Just like on [Binder](https://mybinder.org), new environments can be added by clicking on the _Add New_ button and providing a URL to the repository. Optional names, memory, and CPU limits can also be set for the environment:
4949

5050
![add-new](https://user-images.githubusercontent.com/591645/80963115-9fce3880-8e0e-11ea-890b-c9b928f7edb1.png)
5151

5252
### Follow the build logs
5353

54-
Clicking on the *Logs* button will open a new dialog with the build logs:
54+
Clicking on the _Logs_ button will open a new dialog with the build logs:
5555

5656
![logs](https://user-images.githubusercontent.com/591645/82306574-86f18580-99bf-11ea-984b-4749ddde15e7.png)
5757

package.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,16 @@
33
"version": "1.0.1",
44
"description": "tljh_repo2docker frontend package",
55
"license": "BSD-3-Clause",
6+
"homepage": "https://github.com/plasmabio/tljh-repo2docker",
7+
"bugs": {
8+
"url": "https://github.com/plasmabio/tljh-repo2docker/issues"
9+
},
10+
"repository": {
11+
"type": "git",
12+
"url": "https://github.com/plasmabio/tljh-repo2docker.git"
13+
},
614
"scripts": {
15+
"watch": "cross-env NODE_ENV=development webpack watch --config webpack.config.js",
716
"build": "cross-env NODE_ENV=development webpack --config webpack.config.js",
817
"build:prod": "cross-env NODE_ENV=production webpack --config webpack.config.js",
918
"eslint": "eslint --fix --ext .js,.jsx,.ts,.tsx src/",
@@ -12,7 +21,7 @@
1221
"prettier": "prettier --write \"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}\"",
1322
"lint": "yarn prettier && yarn eslint",
1423
"lint:check": "yarn prettier:check && yarn eslint:check",
15-
"clean": "rimraf ./lib ./tljh_repo2docker/static/js/react"
24+
"clean": "rimraf ./lib ./tljh_repo2docker/static/js"
1625
},
1726
"devDependencies": {
1827
"@types/react": "^18.2.0",
@@ -134,4 +143,4 @@
134143
}
135144
]
136145
}
137-
}
146+
}

pyproject.toml

Lines changed: 42 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,65 @@
11
[build-system]
2-
requires = ["hatchling>=1.5.0,<2"]
32
build-backend = "hatchling.build"
3+
requires = ["hatchling>=1.5.0,<2", "hatch-nodejs-version>=0.3.2"]
44

55
[project]
6-
name = "tljh-repo2docker"
7-
dynamic = ["version"]
8-
readme = "README.md"
9-
license = { file = "LICENSE" }
106
dependencies = [
11-
"aiodocker~=0.19",
12-
"dockerspawner~=12.1",
13-
"jupyter_client>=6.1,<8"
7+
"aiodocker~=0.19",
8+
"dockerspawner~=12.1",
9+
"jupyter_client>=6.1,<8",
1410
]
11+
dynamic = ["version"]
12+
license = {file = "LICENSE"}
13+
name = "tljh-repo2docker"
14+
readme = "README.md"
1515

1616
[project.entry-points.tljh]
1717
tljh_repo2docker = "tljh_repo2docker"
1818

1919
[tool.hatch.version]
20-
path = "tljh_repo2docker/__version__.py"
20+
source = "nodejs"
2121

2222
[tool.hatch.build.targets.sdist]
23-
include = ["/tljh_repo2docker"]
2423
artifacts = ["tljh_repo2docker/static"]
2524
exclude = [".github"]
2625

26+
[tool.hatch.build.targets.wheel]
27+
artifacts = ["tljh_repo2docker/static"]
28+
29+
[tool.hatch.build.hooks.version]
30+
path = "tljh_repo2docker/_version.py"
31+
32+
[tool.hatch.build.hooks.jupyter-builder]
33+
build-function = "hatch_jupyter_builder.npm_builder"
34+
dependencies = ["hatch-jupyter-builder>=0.5"]
35+
ensured-targets = [
36+
"tljh_repo2docker/static/js/servers.js",
37+
"tljh_repo2docker/static/js/environments.js",
38+
]
39+
skip-if-exists = [
40+
"tljh_repo2docker/static/js/servers.js",
41+
"tljh_repo2docker/static/js/environments.js",
42+
]
43+
44+
[tool.hatch.build.hooks.jupyter-builder.build-kwargs]
45+
build_cmd = "build:prod"
46+
npm = ["yarn"]
47+
48+
[tool.hatch.build.hooks.jupyter-builder.editable-build-kwargs]
49+
build_cmd = "build"
50+
build_dir = "tljh_repo2docker/static/js"
51+
npm = ["yarn"]
52+
source_dir = "src"
53+
2754
[tool.jupyter-releaser.options]
2855
version_cmd = "hatch version"
2956

3057
[tool.jupyter-releaser.hooks]
58+
before-build-npm = [
59+
"yarn install",
60+
"yarn build:prod",
61+
]
62+
before-build-python = ["yarn clean"]
3163
before-bump-version = ["python -m pip install hatch"]
3264

3365
[tool.check-wheel-contents]

tljh_repo2docker/__version__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

tljh_repo2docker/templates/images.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
<script id="tljh-page-data" type="application/json">
44
{"images": {{ images | tojson }}, "default_mem_limit": "{{default_mem_limit}}", "default_cpu_limit":"{{default_cpu_limit}}", "machine_profiles": {{ machine_profiles | tojson }}}
55
</script>
6-
<script src="{{ base_url }}environments-static/js/react/environments.js"></script>
6+
<script src="{{ base_url }}environments-static/js/environments.js"></script>
77
</div>
88
{% endblock %}

tljh_repo2docker/templates/servers.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
"images": {{ images | tojson }}, "allow_named_servers": {{allow_named_servers | tojson}}, "named_server_limit_per_user": {{named_server_limit_per_user}}, "server_data": {{ server_data| tojson }}, "default_server_data": {{ default_server_data| tojson }}
66
}
77
</script>
8-
<script src="{{ base_url }}environments-static/js/react/servers.js"></script>
8+
<script src="{{ base_url }}environments-static/js/servers.js"></script>
99
</div>
1010
{% endblock %}

0 commit comments

Comments
 (0)