Skip to content

Commit

Permalink
chore: updated extension template
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-jaeger committed Nov 12, 2024
1 parent 67328b1 commit 3e91f87
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 55 deletions.
11 changes: 3 additions & 8 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: v4.2.4
_commit: v4.3.5
_src_path: https://github.com/jupyterlab/extension-template
author_email: [email protected]
author_name: Florian Jaeger
data_format: string
file_extension: ''
author_name: Florian Jaeger, Marijana Petojevic, Matthias Matt
has_binder: true
has_settings: true
kind: server
labextension_name: grader-labextension
mimetype: ''
mimetype_name: ''
project_short_description: Grader Labextension is a JupyterLab extension to enable
automatic grading of assignment notebooks.
python_name: grader_labextension
repository: https://github.com/TU-Wien-dataLAB/Grader-Labextension
repository: https://github.com/TU-Wien-dataLAB/grader-labextension
test: true
viewer_name: ''

2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ jobs:
retention-days: 1
path: |
./dist
!./dist/**/*.md
!./dist/**/*.md
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2024, Florian Jaeger
Copyright (c) 2024, Florian Jaeger, Marijana Petojevic, Matthias Matt
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# grader_labextension

[![Github Actions Status](https://github.com/TU-Wien-dataLAB/Grader-Labextension/workflows/Build/badge.svg)](https://github.com/TU-Wien-dataLAB/Grader-Labextension/actions/workflows/build.yml)[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/TU-Wien-dataLAB/Grader-Labextension/main?urlpath=lab)
[![Github Actions Status](https://github.com/TU-Wien-dataLAB/grader-labextension/workflows/Build/badge.svg)](https://github.com/TU-Wien-dataLAB/grader-labextension/actions/workflows/build.yml)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/TU-Wien-dataLAB/grader-labextension/main?urlpath=lab)


Grader Labextension is a JupyterLab extension to enable automatic grading of assignment notebooks.

This extension is composed of a Python package named `grader_labextension`
Expand Down
45 changes: 7 additions & 38 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,52 +58,21 @@ npm publish --access public

## Automated releases with the Jupyter Releaser

The extension repository should already be compatible with the Jupyter Releaser.

Check out the [workflow documentation](https://jupyter-releaser.readthedocs.io/en/latest/get_started/making_release_from_repo.html) for more information.
The extension repository should already be compatible with the Jupyter Releaser. But
the GitHub repository and the package managers need to be properly set up. Please
follow the instructions of the Jupyter Releaser [checklist](https://jupyter-releaser.readthedocs.io/en/latest/how_to_guides/convert_repo_from_repo.html).

Here is a summary of the steps to cut a new release:

- Add tokens to the [Github Secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets) in the repository:
- `ADMIN_GITHUB_TOKEN` (with "public_repo" and "repo:status" permissions); see the [documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)
- `NPM_TOKEN` (with "automation" permission); see the [documentation](https://docs.npmjs.com/creating-and-viewing-access-tokens)
- Set up PyPI

<details><summary>Using PyPI trusted publisher (modern way)</summary>

- Set up your PyPI project by [adding a trusted publisher](https://docs.pypi.org/trusted-publishers/adding-a-publisher/)
- The _workflow name_ is `publish-release.yml` and the _environment_ should be left blank.
- Ensure the publish release job as `permissions`: `id-token : write` (see the [documentation](https://docs.pypi.org/trusted-publishers/using-a-publisher/))

</details>

<details><summary>Using PyPI token (legacy way)</summary>

- If the repo generates PyPI release(s), create a scoped PyPI [token](https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#saving-credentials-on-github). We recommend using a scoped token for security reasons.

- You can store the token as `PYPI_TOKEN` in your fork's `Secrets`.

- Advanced usage: if you are releasing multiple repos, you can create a secret named `PYPI_TOKEN_MAP` instead of `PYPI_TOKEN` that is formatted as follows:

```text
owner1/repo1,token1
owner2/repo2,token2
```
If you have multiple Python packages in the same repository, you can point to them as follows:
```text
owner1/repo1/path/to/package1,token1
owner1/repo1/path/to/package2,token2
```
</details>
- Go to the Actions panel
- Run the "Step 1: Prep Release" workflow
- Check the draft changelog
- Run the "Step 2: Publish Release" workflow

> [!NOTE]
> Check out the [workflow documentation](https://jupyter-releaser.readthedocs.io/en/latest/get_started/making_release_from_repo.html)
> for more information.
## Publishing to `conda-forge`

If the package is not on conda forge yet, check the documentation to learn how to add it: https://conda-forge.org/docs/maintainer/adding_pkgs.html
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,27 @@
"jupyterlab",
"jupyterlab-extension"
],
"homepage": "https://github.com/TU-Wien-dataLAB/Grader-Labextension",
"homepage": "https://github.com/TU-Wien-dataLAB/grader-labextension",
"bugs": {
"url": "https://github.com/TU-Wien-dataLAB/Grader-Labextension/issues"
"url": "https://github.com/TU-Wien-dataLAB/grader-labextension/issues"
},
"license": "BSD-3-Clause",
"author": {
"name": "Florian Jaeger",
"name": "Florian Jaeger, Marijana Petojevic, Matthias Matt",
"email": "[email protected]"
},
"files": [
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
"style/**/*.{css,js,eot,gif,html,jpg,json,png,svg,woff2,ttf}",
"src/**/*.{ts,tsx}",
"schema/*.json"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",
"style": "style/index.css",
"repository": {
"type": "git",
"url": "https://github.com/TU-Wien-dataLAB/Grader-Labextension.git"
"url": "https://github.com/TU-Wien-dataLAB/grader-labextension.git"
},
"scripts": {
"build": "jlpm build:lib && jlpm build:labextension:dev",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ search = "grader-labextension=={current_version}"
source = "nodejs"

[tool.hatch.metadata.hooks.nodejs]
fields = ["description", "authors", "urls"]
fields = ["description", "authors", "urls", "keywords"]

[tool.hatch.build.targets.sdist]
artifacts = ["grader_labextension/labextension"]
Expand Down
2 changes: 1 addition & 1 deletion ui-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ in [jupyter_server_test_config.py](./jupyter_server_test_config.py).

The default configuration will produce video for failing tests and an HTML report.

> There is a new experimental UI mode that you may fall in love with; see [that video](https://www.youtube.com/watch?v=jF0yA-JLQW0).
> There is a UI mode that you may like; see [that video](https://www.youtube.com/watch?v=jF0yA-JLQW0).
## Run the tests

Expand Down

0 comments on commit 3e91f87

Please sign in to comment.