Skip to content

Commit 61586f4

Browse files
authored
Merge branch 'main' into update_readme
2 parents ec115fd + bb960b8 commit 61586f4

31 files changed

+644
-234
lines changed

.github/workflows/prep-release.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
post_version_spec:
1313
description: "Post Version Specifier"
1414
required: false
15+
silent:
16+
description: "Set a placeholder in the changelog and don't publish the release."
17+
required: false
18+
type: boolean
1519
since:
1620
description: "Use PRs with activity since this date or git reference"
1721
required: false
@@ -22,15 +26,18 @@ on:
2226
jobs:
2327
prep_release:
2428
runs-on: ubuntu-latest
29+
permissions:
30+
contents: write
2531
steps:
2632
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
2733

2834
- name: Prep Release
2935
id: prep-release
3036
uses: jupyter-server/jupyter_releaser/.github/actions/prep-release@v2
3137
with:
32-
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
38+
token: ${{ secrets.GITHUB_TOKEN }}
3339
version_spec: ${{ github.event.inputs.version_spec }}
40+
silent: ${{ github.event.inputs.silent }}
3441
post_version_spec: ${{ github.event.inputs.post_version_spec }}
3542
target: ${{ github.event.inputs.target }}
3643
branch: ${{ github.event.inputs.branch }}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: "Publish Changelog"
2+
on:
3+
release:
4+
types: [published]
5+
6+
workflow_dispatch:
7+
inputs:
8+
branch:
9+
description: "The branch to target"
10+
required: false
11+
12+
jobs:
13+
publish_changelog:
14+
runs-on: ubuntu-latest
15+
environment: release
16+
steps:
17+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
18+
19+
- uses: actions/create-github-app-token@v1
20+
id: app-token
21+
with:
22+
app-id: ${{ vars.APP_ID }}
23+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
24+
25+
- name: Publish changelog
26+
id: publish-changelog
27+
uses: jupyter-server/jupyter_releaser/.github/actions/publish-changelog@v2
28+
with:
29+
token: ${{ steps.app-token.outputs.token }}
30+
branch: ${{ github.event.inputs.branch }}
31+
32+
- name: "** Next Step **"
33+
run: |
34+
echo "Merge the changelog update PR: ${{ steps.publish-changelog.outputs.pr_url }}"

.github/workflows/publish-release.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,34 @@ on:
1515
jobs:
1616
publish_release:
1717
runs-on: ubuntu-latest
18+
environment: release
19+
permissions:
20+
id-token: write
1821
steps:
1922
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
2023

24+
- uses: actions/create-github-app-token@v1
25+
id: app-token
26+
with:
27+
app-id: ${{ vars.APP_ID }}
28+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
29+
2130
- name: Populate Release
2231
id: populate-release
2332
uses: jupyter-server/jupyter_releaser/.github/actions/populate-release@v2
2433
with:
25-
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
26-
target: ${{ github.event.inputs.target }}
34+
token: ${{ steps.app-token.outputs.token }}
2735
branch: ${{ github.event.inputs.branch }}
2836
release_url: ${{ github.event.inputs.release_url }}
2937
steps_to_skip: ${{ github.event.inputs.steps_to_skip }}
3038

3139
- name: Finalize Release
3240
id: finalize-release
3341
env:
34-
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
35-
PYPI_TOKEN_MAP: ${{ secrets.PYPI_TOKEN_MAP }}
36-
TWINE_USERNAME: __token__
3742
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
38-
uses: jupyter-server/jupyter-releaser/.github/actions/finalize-release@v2
43+
uses: jupyter-server/jupyter_releaser/.github/actions/finalize-release@v2
3944
with:
40-
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
41-
target: ${{ github.event.inputs.target }}
45+
token: ${{ steps.app-token.outputs.token }}
4246
release_url: ${{ steps.populate-release.outputs.release_url }}
4347

4448
- name: "** Next Step **"

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ __pycache__/
88

99
# Distribution / packaging
1010
.Python
11+
.direnv
12+
.envrc
1113
env/
1214
build/
1315
develop-eggs/

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
repos:
22
- repo: https://github.com/asottile/reorder-python-imports
3-
rev: v3.10.0
3+
rev: v3.12.0
44
hooks:
55
- id: reorder-python-imports
66
language_version: python3
77
- repo: https://github.com/psf/black
8-
rev: 23.7.0
8+
rev: 24.2.0
99
hooks:
1010
- id: black
1111
- repo: https://github.com/PyCQA/flake8
12-
rev: "6.0.0"
12+
rev: "7.0.0"
1313
hooks:
1414
- id: flake8
1515
- repo: https://github.com/pre-commit/pre-commit-hooks
16-
rev: v4.4.0
16+
rev: v4.5.0
1717
hooks:
1818
- id: end-of-file-fixer
1919
- id: check-json

CHANGELOG.md

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,58 @@
22

33
<!-- <START NEW CHANGELOG ENTRY> -->
44

5+
## 1.1.0
6+
7+
([Full Changelog](https://github.com/jupyter-server/jupyter-resource-usage/compare/@jupyter-server/[email protected]))
8+
9+
### Enhancements made
10+
11+
- Add disk monitoring [#233](https://github.com/jupyter-server/jupyter-resource-usage/pull/233) ([@iandesj](https://github.com/iandesj))
12+
13+
### Bugs fixed
14+
15+
- Remove spurious close button on kernel usage panel [#228](https://github.com/jupyter-server/jupyter-resource-usage/pull/228) ([@krassowski](https://github.com/krassowski))
16+
17+
### Contributors to this release
18+
19+
([GitHub contributors page for this release](https://github.com/jupyter-server/jupyter-resource-usage/graphs/contributors?from=2024-03-12&to=2024-07-31&type=c))
20+
21+
[@iandesj](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter-resource-usage+involves%3Aiandesj+updated%3A2024-03-12..2024-07-31&type=Issues) | [@krassowski](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter-resource-usage+involves%3Akrassowski+updated%3A2024-03-12..2024-07-31&type=Issues) | [@welcome](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter-resource-usage+involves%3Awelcome+updated%3A2024-03-12..2024-07-31&type=Issues)
22+
23+
<!-- <END NEW CHANGELOG ENTRY> -->
24+
25+
## 1.0.2
26+
27+
([Full Changelog](https://github.com/jupyter-server/jupyter-resource-usage/compare/@jupyter-server/[email protected]))
28+
29+
### Maintenance and upkeep improvements
30+
31+
- Update Release Scripts [#230](https://github.com/jupyter-server/jupyter-resource-usage/pull/230) ([@blink1073](https://github.com/blink1073))
32+
33+
### Contributors to this release
34+
35+
([GitHub contributors page for this release](https://github.com/jupyter-server/jupyter-resource-usage/graphs/contributors?from=2023-08-29&to=2024-03-12&type=c))
36+
37+
[@blink1073](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter-resource-usage+involves%3Ablink1073+updated%3A2023-08-29..2024-03-12&type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter-resource-usage+involves%3Apre-commit-ci+updated%3A2023-08-29..2024-03-12&type=Issues)
38+
39+
## 1.0.1
40+
41+
([Full Changelog](https://github.com/jupyter-server/jupyter-resource-usage/compare/@jupyter-server/[email protected]))
42+
43+
### Enhancements made
44+
45+
- Adds custom config to show/hide host usage info [#210](https://github.com/jupyter-server/jupyter-resource-usage/pull/210) ([@pinksi](https://github.com/pinksi))
46+
47+
### Maintenance and upkeep improvements
48+
49+
- Add Notebook 7 to Binder [#208](https://github.com/jupyter-server/jupyter-resource-usage/pull/208) ([@jtpio](https://github.com/jtpio))
50+
51+
### Contributors to this release
52+
53+
([GitHub contributors page for this release](https://github.com/jupyter-server/jupyter-resource-usage/graphs/contributors?from=2023-07-28&to=2023-08-29&type=c))
54+
55+
[@jtpio](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter-resource-usage+involves%3Ajtpio+updated%3A2023-07-28..2023-08-29&type=Issues) | [@pinksi](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter-resource-usage+involves%3Apinksi+updated%3A2023-07-28..2023-08-29&type=Issues) | [@welcome](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter-resource-usage+involves%3Awelcome+updated%3A2023-07-28..2023-08-29&type=Issues) | [@yuvipanda](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter-resource-usage+involves%3Ayuvipanda+updated%3A2023-07-28..2023-08-29&type=Issues)
56+
557
## 1.0.0
658

759
([Full Changelog](https://github.com/jupyter-server/jupyter-resource-usage/compare/@jupyter-server/[email protected]))
@@ -36,8 +88,6 @@
3688

3789
[@dependabot](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter-resource-usage+involves%3Adependabot+updated%3A2023-02-20..2023-07-28&type=Issues) | [@jtpio](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter-resource-usage+involves%3Ajtpio+updated%3A2023-02-20..2023-07-28&type=Issues) | [@mahendrapaipuri](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter-resource-usage+involves%3Amahendrapaipuri+updated%3A2023-02-20..2023-07-28&type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter-resource-usage+involves%3Apre-commit-ci+updated%3A2023-02-20..2023-07-28&type=Issues) | [@SauravMaheshkar](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter-resource-usage+involves%3ASauravMaheshkar+updated%3A2023-02-20..2023-07-28&type=Issues) | [@welcome](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter-resource-usage+involves%3Awelcome+updated%3A2023-02-20..2023-07-28&type=Issues) | [@Zsailer](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter-resource-usage+involves%3AZsailer+updated%3A2023-02-20..2023-07-28&type=Issues)
3890

39-
<!-- <END NEW CHANGELOG ENTRY> -->
40-
4191
## 0.7.2
4292

4393
([Full Changelog](https://github.com/jupyter-server/jupyter-resource-usage/compare/@jupyter-server/[email protected]))

CONTRIBUTING.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,14 @@ JupyterLab v3.0.0
127127
jupyter-resource-usage v0.1.0 enabled OK
128128
```
129129

130+
## Which code creates what content
131+
132+
The stats are created by the server-side code in `jupyter_resource_usage`.
133+
134+
For the jupyterlab 4 / notebook 7 UIs, the code in `packages/labextension` creates and writes the content for both the statusbar and the topbar.
135+
136+
The topbar is defined in the schema, whilst the contents of the statusbar is driven purely by the labextension code.... and labels are defined by their appropriate `*View.tsx` file
137+
130138
## pre-commit
131139

132140
`jupyter-resource-usage` has adopted automatic code formatting so you shouldn't need to worry too much about your code style.

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,23 @@ memory:
140140

141141
![Screenshot with CPU and memory](./doc/statusbar-cpu.png)
142142

143+
### Disk [partition] Usage
144+
145+
`jupyter-resource-usage` can also track disk usage [of a defined partition] and report the `total` and `used` values as part of the `/api/metrics/v1` response.
146+
147+
You enable tracking by setting the `track_disk_usage` trait (disabled by default):
148+
149+
```python
150+
c = get_config()
151+
c.ResourceUseDisplay.track_disk_usage = True
152+
```
153+
154+
The values are from the partition containing the folder in the trait `disk_path` (which defaults to `/home/joyvan`). If this path does not exist, disk usage information is omitted from the display.
155+
156+
Mirroring CPU and Memory, the trait `disk_warning_threshold` signifies when to flag a usage warning, and like the others, it defaults to `0.1` (10% remaining)
157+
158+
![Screenshot with Disk, CPU, and memory](./doc/statusbar_disk.png)
159+
143160
### Disable Prometheus Metrics
144161

145162
There is a [known bug](https://github.com/jupyter-server/jupyter-resource-usage/issues/123) with Prometheus metrics which
@@ -163,9 +180,11 @@ render the alternative frontend in the topbar.
163180
Users can change the label and refresh rate for the alternative frontend using settings
164181
editor.
165182

183+
(The vertical bars are included by default, to help separate the three indicators.)
184+
166185
## Resources Displayed
167186

168-
Currently the server extension only reports memory usage and CPU usage. Other metrics will be added in the future as needed.
187+
Currently the server extension reports disk usage, memory usage and CPU usage. Other metrics will be added in the future as needed.
169188

170189
Memory usage will show the PSS whenever possible (Linux only feature), and default to RSS otherwise.
171190

doc/settings.png

9.53 KB
Loading

doc/statusbar_disk.png

7.54 KB
Loading

0 commit comments

Comments
 (0)