-
Notifications
You must be signed in to change notification settings - Fork 79
Consolidate package metadata and template others #224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
{% set package_json = load_file_data("package.json") %} | ||
{% set pyproject_toml = load_file_data("pyproject.toml") %} | ||
|
||
{% set version = environ['RAPIDS_PACKAGE_VERSION'].lstrip('v') %} | ||
{% set date_string = environ['RAPIDS_DATE_STRING'] %} | ||
|
||
{% set python_min = "3.9" %} | ||
{% set requires_python = pyproject_toml["project"]["requires-python"] %} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We reuse the Python requirement from |
||
|
||
|
||
package: | ||
|
@@ -20,35 +23,32 @@ build: | |
|
||
requirements: | ||
host: | ||
- python {{ python_min }} | ||
- python {{ requires_python }} | ||
- pip | ||
- nodejs | ||
- hatch-jupyter-builder >=0.5 | ||
- hatch-nodejs-version >=0.3.2 | ||
- hatchling >=1.5.0 | ||
- jupyterlab >=4.0.0 | ||
{% for r in pyproject_toml["build-system"]["requires"] %} | ||
- {{ r }} | ||
{% endfor %} | ||
Comment on lines
24
to
+31
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With the exception of some base requirements ( |
||
run: | ||
- python >={{ python_min }} | ||
- jupyterlab >=4.0.0 | ||
- psutil | ||
- pynvml >=12.0.0,<13.0.0a0 | ||
- python {{ requires_python }} | ||
{% for r in pyproject_toml["project"]["dependencies"] %} | ||
- {{ r }} | ||
{% endfor %} | ||
Comment on lines
32
to
+36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We repeat the same process loading |
||
|
||
test: | ||
requires: | ||
- python {{ python_min }} | ||
- python {{ requires_python }} | ||
- pip | ||
commands: | ||
- pip check | ||
imports: | ||
- jupyterlab_nvdashboard | ||
|
||
about: | ||
home: https://rapids.ai | ||
license: BSD-3-Clause | ||
license_family: BSD | ||
home: {{ package_json["homepage"] }} | ||
license: {{ package_json["license"] }} | ||
license_file: ../../../LICENSE | ||
summary: A JupyterLab extension for displaying dashboards of GPU usage | ||
description: | | ||
A JupyterLab extension for displaying dashboards of GPU usage. | ||
doc_url: https://github.com/rapidsai/jupyterlab-nvdashboard | ||
dev_url: https://github.com/rapidsai/jupyterlab-nvdashboard | ||
summary: {{ package_json["description"] }} | ||
description: {{ package_json["description"] }} | ||
doc_url: {{ package_json["homepage"] }} | ||
dev_url: {{ package_json["repository"]["url"] }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Metadata is now loaded from |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
"bugs": { | ||
"url": "https://github.com/rapidsai/jupyterlab-nvdashboard/issues" | ||
}, | ||
"license": "", | ||
"license": "BSD-3-Clause", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fill this in as SPDX. This can be loaded with |
||
"author": "NV Dashboard contributors", | ||
"files": [ | ||
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
# Copyright (c) 2023, NVIDIA CORPORATION. | ||
# Copyright (c) 2023-2025, NVIDIA CORPORATION. | ||
|
||
[build-system] | ||
requires = [ | ||
"hatch-jupyter-builder>=0.5", | ||
"hatch-nodejs-version>=0.3.2", | ||
"hatchling>=1.5.0", | ||
"hatchling>=1.27.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hatch 1.27.0 added support for license files with PR: pypa/hatch#1829 Hence we bump the minimum version accordingly |
||
"jupyterlab>=4.0.0", | ||
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit dependencies.yaml and run `rapids-dependency-file-generator`. | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "jupyterlab_nvdashboard" | ||
readme = "README.md" | ||
license = { file = "LICENSE" } | ||
license-files = [ | ||
"LICENSE", | ||
] | ||
Comment on lines
-15
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We drop the Also PEP 639 defined the spec for handling license files. So we use that here |
||
requires-python = ">=3.9" | ||
classifiers = [ | ||
"Framework :: Jupyter", | ||
|
@@ -33,7 +35,7 @@ dependencies = [ | |
"psutil", | ||
"pynvml>=12.0.0,<13.0.0a0", | ||
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit dependencies.yaml and run `rapids-dependency-file-generator`. | ||
dynamic = ["version", "description", "authors", "urls", "keywords"] | ||
dynamic = ["version", "license", "description", "authors", "urls", "keywords"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note we now flag the |
||
|
||
[project.optional-dependencies] | ||
test = [ | ||
|
@@ -47,7 +49,7 @@ test = [ | |
source = "nodejs" | ||
|
||
[tool.hatch.metadata.hooks.nodejs] | ||
fields = ["description", "authors", "urls"] | ||
fields = ["license", "description", "authors", "urls"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With the |
||
|
||
[tool.hatch.build.targets.sdist] | ||
artifacts = ["jupyterlab_nvdashboard/labextension"] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the Conda recipe we can also load from
package.json
. So we do so hereWe fallback to
pyproject.toml
for anything else