-
Notifications
You must be signed in to change notification settings - Fork 13
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 #61 from cmd-ntrf/pyproject
Make setup.py install labextension and replace setup.py by pyproject.toml
- Loading branch information
Showing
11 changed files
with
203 additions
and
99 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
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 |
---|---|---|
|
@@ -11,3 +11,4 @@ jupyterlmod.egg-info/ | |
*.lock | ||
*env*/ | ||
package-lock.json | ||
jupyterlmod/labextension |
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 was deleted.
Oops, something went wrong.
File renamed without changes.
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,69 @@ | ||
{ | ||
"name": "@cmd-ntrf/jupyterlab-lmod", | ||
"version": "4.0.0", | ||
"description": "Lmod JupyterLab extension", | ||
"keywords": [ | ||
"jupyter", | ||
"jupyterlab", | ||
"jupyterlab-extension" | ||
], | ||
"homepage": "https://github.com/cmd-ntrf/jupyter-lmod", | ||
"bugs": { | ||
"url": "https://github.com/cmd-ntrf/jupyter-lmod/issues" | ||
}, | ||
"license": "MIT", | ||
"author": { | ||
"name": "Felix-Antoine Fortin", | ||
"email": "[email protected]" | ||
}, | ||
"contributors": [ | ||
{ "name": "Étienne Dubeau" }, | ||
{ "name": "Guillaume Moutier" }, | ||
{ "name": "Alex Domingo" } | ||
], | ||
"files": [ | ||
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}", | ||
"style/*.css" | ||
], | ||
"main": "lib/labextension/src/index.js", | ||
"types": "lib/labextension/src/index.d.ts", | ||
"style": "style/index.css", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/cmd-ntrf/jupyter-lmod.git" | ||
}, | ||
"scripts": { | ||
"build": "jlpm run build:lib && jlpm run build:labextension:dev", | ||
"build:prod": "jlpm run build:lib && jlpm run build:labextension", | ||
"build:labextension": "jupyter labextension build .", | ||
"build:labextension:dev": "jupyter labextension build --development True .", | ||
"build:lib": "tsc", | ||
"clean": "jlpm run clean:lib", | ||
"clean:lib": "rimraf lib tsconfig.tsbuildinfo", | ||
"clean:labextension": "rimraf jupyterlab-lmod/labextension", | ||
"clean:all": "jlpm run clean:lib && jlpm run clean:labextension", | ||
"eslint": "eslint . --ext .ts,.tsx --fix", | ||
"eslint:check": "eslint . --ext .ts,.tsx", | ||
"eslint:check:junit": "eslint . --ext .ts,.tsx --format junit --output-file linting.xml", | ||
"install:extension": "jupyter labextension develop --overwrite .", | ||
"prepare": "jlpm run clean && jlpm run build:prod", | ||
"watch": "run-p watch:src watch:labextension", | ||
"watch:src": "tsc -w", | ||
"watch:labextension": "jupyter labextension watch ." | ||
}, | ||
"dependencies": { | ||
"@jupyterlab/application": "^2.0.0 || ^3.0.0", | ||
"@jupyterlab/launcher": "^2.0.0 || ^3.0.0", | ||
"@jupyterlab/server-proxy": "^3.1.0" | ||
}, | ||
"devDependencies": { | ||
"rimraf": "~3.0.2", | ||
"typescript": "~4.1.3", | ||
"@jupyterlab/builder": "^3.6.1" | ||
}, | ||
"jupyterlab": { | ||
"extension": true, | ||
"schemaDir": "schema", | ||
"outputDir": "../jupyterlmod/labextension" | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
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,100 @@ | ||
[build-system] | ||
requires = [ | ||
"hatch-jupyter-builder >=0.5", | ||
"hatch-nodejs-version", | ||
"hatchling >=1.4.0", | ||
"jupyterlab >=3.4.7,<4.0.0", | ||
] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "jupyterlmod" | ||
dynamic = [ | ||
"authors", | ||
"description", | ||
"keywords", | ||
"urls", | ||
"version", | ||
] | ||
readme = "README.md" | ||
license = { file = "LICENSE" } | ||
requires-python = ">=3.6" | ||
classifiers = [ | ||
"Framework :: Jupyter", | ||
"License :: OSI Approved :: BSD License", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
] | ||
dependencies = [ | ||
"jupyter-core", | ||
"jupyter-server", | ||
] | ||
|
||
[tool.hatch.metadata.hooks.nodejs] | ||
path = "labextension/package.json" | ||
fields = ["description", "authors", "urls"] | ||
|
||
[tool.hatch.build] | ||
artifacts = [ | ||
"jupyterlmod.egg-info/", | ||
"jupyterlmod/labextension", | ||
] | ||
|
||
[tool.hatch.build.targets.wheel] | ||
packages = ["jupyterlmod", "lmod"] | ||
|
||
[tool.hatch.build.targets.wheel.shared-data] | ||
"jupyterlmod/static" = "share/jupyter/nbextensions/jupyterlmod" | ||
"jupyterlmod/etc/jupyterlmod_serverextension.json" = "etc/jupyter/jupyter_notebook_config.d/jupyterlmod_serverextension.json" | ||
"jupyterlmod/etc/jupyterlmod_jupyterserverextension.json" = "etc/jupyter/jupyter_server_config.d/jupyterlmod_jupyterserverextension.json" | ||
"jupyterlmod/etc/jupyterlmod_nbextension.json" = "etc/jupyter/nbconfig/tree.d/jupyterlmod_nbextension.json" | ||
"jupyterlmod/labextension" = "share/jupyter/labextensions/@cmd-ntrf/jupyterlab-lmod" | ||
"./install.json" = "share/jupyter/labextensions/@cmd-ntrf/jupyterlab-lmod/install.json" | ||
|
||
[tool.hatch.version] | ||
source = "nodejs" | ||
path = "labextension/package.json" | ||
|
||
[tool.hatch.build.targets.sdist] | ||
exclude = [ | ||
".github", | ||
] | ||
|
||
[tool.hatch.build.hooks.jupyter-builder] | ||
ensured-targets = [ | ||
"jupyterlmod/labextension/package.json", | ||
] | ||
dependencies = [ | ||
"hatch-jupyter-builder>=0.8.2", | ||
] | ||
build-function = "hatch_jupyter_builder.npm_builder" | ||
|
||
[tool.hatch.build.hooks.jupyter-builder.build-kwargs] | ||
path = "labextension" | ||
build_cmd = "build:prod" | ||
npm = [ | ||
"jlpm", | ||
] | ||
|
||
[tool.tbump] | ||
field = [ | ||
{ name = "channel", default = "" }, | ||
{ name = "release", default = "" }, | ||
] | ||
|
||
[tool.tbump.version] | ||
current = "4.0.0" | ||
regex = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)((?P<channel>a|b|rc|.dev)(?P<release>\\d+))?" | ||
|
||
[tool.tbump.git] | ||
message_template = "Bump to {new_version}" | ||
tag_template = "v{new_version}" | ||
|
||
[[tool.tbump.file]] | ||
src = "pyproject.toml" | ||
version_template = "version = \"{major}.{minor}.{patch}{channel}{release}\"" |
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,43 +1 @@ | ||
#!/usr/bin/env python | ||
# coding: utf-8 | ||
from glob import glob | ||
from setuptools import setup | ||
|
||
setup_args = dict( | ||
name = 'jupyterlmod', | ||
packages = ['jupyterlmod', 'lmod'], | ||
version = "3.1.0", | ||
description = "jupyterlmod: notebook server extension to interact with Lmod system", | ||
long_description = "Jupyter interactive notebook server extension that allows user to select software modules to load with Lmod before launching kernels.", | ||
author = "Félix-Antoine Fortin", | ||
author_email = "[email protected]", | ||
url = "http://www.calculquebec.ca", | ||
license = "MIT", | ||
platforms = "Linux, Mac OS X", | ||
keywords = ['Interactive', 'Interpreter', 'Shell', 'Web', 'Lmod'], | ||
classifiers = [ | ||
'Intended Audience :: Developers', | ||
'Intended Audience :: System Administrators', | ||
'Intended Audience :: Science/Research', | ||
'License :: OSI Approved :: MIT License', | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 3', | ||
], | ||
install_requires = [ | ||
'jupyter-core', | ||
'jupyter-server' | ||
], | ||
data_files=[ | ||
('share/jupyter/nbextensions/jupyterlmod', glob('jupyterlmod/static/*')), | ||
('etc/jupyter/jupyter_notebook_config.d', ['jupyterlmod/etc/jupyterlmod_serverextension.json']), | ||
("etc/jupyter/jupyter_server_config.d", ['jupyterlmod/etc/jupyterlmod_jupyterserverextension.json']), | ||
('etc/jupyter/nbconfig/tree.d', ['jupyterlmod/etc/jupyterlmod_nbextension.json']) | ||
], | ||
zip_safe=False | ||
) | ||
|
||
def main(): | ||
setup(**setup_args) | ||
|
||
if __name__ == '__main__': | ||
main() | ||
# this file intentionally left blank for legacy tools to find |