Skip to content

Commit 2512b66

Browse files
committed
working version Jlab3.6
1 parent c69c599 commit 2512b66

File tree

9 files changed

+349
-942
lines changed

9 files changed

+349
-942
lines changed

jupyter_fairly/jupyter_fairly/handlers.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from typing import Dict, List
99
from jupyter_server.base.handlers import APIHandler
1010
from jupyter_server.utils import url_path_join
11-
from dotenv import load_dotenv
1211
from tornado import web
1312
import fairly
1413

@@ -231,7 +230,7 @@ def post(self):
231230
client = fairly.client(id=data["client"])
232231
except ValueError:
233232
raise web.HTTPError(400, f"Invalid client id: {data['client']}")
234-
233+
235234
try:
236235
# TODO: fix bug:
237236
# Error messages:
@@ -257,6 +256,9 @@ def post(self):
257256
# print(client["token"])
258257
print(e)
259258
raise web.HTTPError(500, f'Something went wrong with uploading: {e}')
259+
except Warning:
260+
raise web.HTTPError(409, "Dataset already exists in data repository. Check the repository \
261+
and if necessary delete any the 'remotes' from the manifest.yaml before attemping again.")
260262
else:
261263
self.finish(json.dumps({
262264
"message": 'completed',

jupyter_fairly/package.json

Lines changed: 194 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -1,123 +1,201 @@
11
{
2-
"name": "jupyter-fairly",
3-
"version": "0.3.0-b",
4-
"description": "A JupyterLab extension for seamless integration of Jupyter-based research environments and research data repositories",
5-
"keywords": [
6-
"jupyter",
7-
"jupyterlab",
8-
"jupyterlab-extension"
9-
],
10-
"homepage": "https://github.com/ITC-CRIB/jupyter-fairly",
11-
"bugs": {
12-
"url": "https://github.com/ITC-CRIB/jupyter-fairly/issues"
13-
},
14-
"license": "BSD-3-Clause",
15-
"author": {
16-
"name": "Manuel G. Garcia, Serkan Girgin, Jose Urra Llanusa",
17-
"email": "m.g.garciaalvarez@tudelft.nl"
2+
"name": "jupyter-fairly",
3+
"version": "0.3.0",
4+
"description": "A JupyterLab extension for seamless integration of Jupyter-based research environments and research data repositories",
5+
"keywords": [
6+
"jupyter",
7+
"jupyterlab",
8+
"jupyterlab-extension"
9+
],
10+
"homepage": "https://github.com/ITC-CRIB/jupyter-fairly",
11+
"bugs": {
12+
"url": "https://github.com/ITC-CRIB/jupyter-fairly/issues"
13+
},
14+
"license": "BSD-3-Clause",
15+
"author": {
16+
"name": "Manuel G. Garcia, Serkan Girgin, Jose Urra Llanusa",
17+
"email": "m.g.garciaalvarez@tudelft.nl"
18+
},
19+
"files": [
20+
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
21+
"style/**/*.{css,js,eot,gif,html,jpg,json,png,svg,woff2,ttf}",
22+
"schema/*.json",
23+
"style/img/*.svg"
24+
],
25+
"main": "lib/index.js",
26+
"types": "lib/index.d.ts",
27+
"style": "style/index.css",
28+
"repository": {
29+
"type": "git",
30+
"url": "https://github.com/ITC-CRIB/jupyter-fairly.git"
31+
},
32+
"scripts": {
33+
"build": "jlpm build:lib && jlpm build:labextension:dev",
34+
"build:prod": "jlpm clean && jlpm build:lib:prod && jlpm build:labextension",
35+
"build:labextension": "jupyter labextension build .",
36+
"build:labextension:dev": "jupyter labextension build --development True .",
37+
"build:lib": "tsc --sourceMap",
38+
"build:lib:prod": "tsc",
39+
"clean": "jlpm clean:lib",
40+
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
41+
"clean:lintcache": "rimraf .eslintcache .stylelintcache",
42+
"clean:labextension": "rimraf jupyter_fairly/labextension jupyter_fairly/_version.py",
43+
"clean:all": "jlpm clean:lib && jlpm clean:labextension && jlpm clean:lintcache",
44+
"eslint": "jlpm eslint:check --fix",
45+
"eslint:check": "eslint . --cache --ext .ts,.tsx",
46+
"install:extension": "jlpm build",
47+
"lint": "jlpm stylelint && jlpm prettier && jlpm eslint",
48+
"lint:check": "jlpm stylelint:check && jlpm prettier:check && jlpm eslint:check",
49+
"prettier": "jlpm prettier:base --write --list-different",
50+
"prettier:base": "prettier \"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}\"",
51+
"prettier:check": "jlpm prettier:base --check",
52+
"stylelint": "jlpm stylelint:check --fix",
53+
"stylelint:check": "stylelint --cache \"style/**/*.css\"",
54+
"test": "jest --coverage",
55+
"watch": "run-p watch:src watch:labextension",
56+
"watch:src": "tsc -w",
57+
"watch:labextension": "jupyter labextension watch ."
58+
},
59+
"dependencies": {
60+
"@jupyterlab/application": "^3.6.0",
61+
"@jupyterlab/apputils": "^3.6.5",
62+
"@jupyterlab/coreutils": "^5.1.0",
63+
"@jupyterlab/filebrowser": "^3.6.5",
64+
"@jupyterlab/services": "^6.1.0",
65+
"@jupyterlab/settingregistry": "^3.1.0",
66+
"@jupyterlab/ui-components": "^3.6.5",
67+
"@lumino/widgets": "^1.37.0"
68+
},
69+
"devDependencies": {
70+
"@babel/core": "^7.0.0",
71+
"@babel/preset-env": "^7.0.0",
72+
"@jupyterlab/builder": "^3.1.0",
73+
"@jupyterlab/testutils": "^3.0.0",
74+
"@types/jest": "^26.0.0",
75+
"@typescript-eslint/eslint-plugin": "^4.8.1",
76+
"@typescript-eslint/parser": "^4.8.1",
77+
"eslint": "^7.14.0",
78+
"eslint-config-prettier": "^6.15.0",
79+
"eslint-plugin-prettier": "^3.1.4",
80+
"jest": "^26.0.0",
81+
"mkdirp": "^1.0.3",
82+
"npm-run-all": "^4.1.5",
83+
"prettier": "^2.1.1",
84+
"rimraf": "^3.0.2",
85+
"stylelint": "^14.3.0",
86+
"stylelint-config-prettier": "^9.0.4",
87+
"stylelint-config-recommended": "^6.0.0",
88+
"stylelint-config-standard": "~24.0.0",
89+
"stylelint-prettier": "^2.0.0",
90+
"ts-jest": "^26.0.0",
91+
"typescript": "~4.1.3"
92+
},
93+
"resolutions": {
94+
"@lumino/coreutils": "^1.11.0",
95+
"@lumino/widgets": "^1.37.2"
96+
},
97+
"sideEffects": [
98+
"style/*.css",
99+
"style/index.js"
100+
],
101+
"styleModule": "style/index.js",
102+
"publishConfig": {
103+
"access": "public"
104+
},
105+
"jupyterlab": {
106+
"discovery": {
107+
"server": {
108+
"managers": [
109+
"pip"
110+
],
111+
"base": {
112+
"name": "jupyter_fairly"
113+
}
114+
}
18115
},
19-
"files": [
20-
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
21-
"style/**/*.{css,js,eot,gif,html,jpg,json,png,svg,woff2,ttf}",
22-
"schema/*.json",
23-
"style/img/*.svg"
116+
"extension": true,
117+
"outputDir": "jupyter_fairly/labextension",
118+
"schemaDir": "schema"
119+
},
120+
"eslintIgnore": [
121+
"node_modules",
122+
"dist",
123+
"coverage",
124+
"**/*.d.ts",
125+
"tests",
126+
"**/__tests__",
127+
"ui-tests"
128+
],
129+
"eslintConfig": {
130+
"extends": [
131+
"eslint:recommended",
132+
"plugin:@typescript-eslint/eslint-recommended",
133+
"plugin:@typescript-eslint/recommended",
134+
"plugin:prettier/recommended"
24135
],
25-
"main": "lib/index.js",
26-
"types": "lib/index.d.ts",
27-
"style": "style/index.css",
28-
"repository": {
29-
"type": "git",
30-
"url": "https://github.com/ITC-CRIB/jupyter-fairly.git"
31-
},
32-
"scripts": {
33-
"build": "jlpm build:lib && jlpm build:labextension:dev",
34-
"build:prod": "jlpm clean && jlpm build:lib:prod && jlpm build:labextension",
35-
"build:labextension": "jupyter labextension build .",
36-
"build:labextension:dev": "jupyter labextension build --development True .",
37-
"build:lib": "tsc --sourceMap",
38-
"build:lib:prod": "tsc",
39-
"clean": "jlpm clean:lib",
40-
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
41-
"clean:lintcache": "rimraf .eslintcache .stylelintcache",
42-
"clean:labextension": "rimraf jupyter_fairly/labextension jupyter_fairly/_version.py",
43-
"clean:all": "jlpm clean:lib && jlpm clean:labextension && jlpm clean:lintcache",
44-
"eslint": "jlpm eslint:check --fix",
45-
"eslint:check": "eslint . --cache --ext .ts,.tsx",
46-
"install:extension": "jlpm build",
47-
"lint": "jlpm stylelint && jlpm prettier && jlpm eslint",
48-
"lint:check": "jlpm stylelint:check && jlpm prettier:check && jlpm eslint:check",
49-
"prettier": "jlpm prettier:base --write --list-different",
50-
"prettier:base": "prettier \"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}\"",
51-
"prettier:check": "jlpm prettier:base --check",
52-
"stylelint": "jlpm stylelint:check --fix",
53-
"stylelint:check": "stylelint --cache \"style/**/*.css\"",
54-
"test": "jest --coverage",
55-
"watch": "run-p watch:src watch:labextension",
56-
"watch:src": "tsc -w",
57-
"watch:labextension": "jupyter labextension watch ."
58-
},
59-
"dependencies": {
60-
"@jupyterlab/application": "^4.0.5",
61-
"@jupyterlab/apputils": "^4.1.5",
62-
"@jupyterlab/coreutils": "^5.1.0",
63-
"@jupyterlab/docregistry": "^4.0.5",
64-
"@jupyterlab/filebrowser": "^4.0.5",
65-
"@jupyterlab/launcher": "^4.0.5",
66-
"@jupyterlab/mainmenu": "^3.6.3",
67-
"@jupyterlab/services": "^6.1.0",
68-
"@jupyterlab/settingregistry": "^4.0.5",
69-
"@jupyterlab/translation": "^4.0.5",
70-
"@jupyterlab/ui-components": "^4.0.5",
71-
"@lumino/coreutils": "^2.1.2",
72-
"@lumino/signaling": "^2.1.2",
73-
"@lumino/widgets": "^2.3.0",
74-
"@phosphor/widgets": "^1.9.3"
136+
"parser": "@typescript-eslint/parser",
137+
"parserOptions": {
138+
"project": "tsconfig.json",
139+
"sourceType": "module"
75140
},
76-
"devDependencies": {
77-
"@babel/core": "^7.0.0",
78-
"@babel/preset-env": "^7.0.0",
79-
"@jupyterlab/builder": "^3.1.0",
80-
"@jupyterlab/testutils": "^3.0.0",
81-
"@types/jest": "^26.0.0",
82-
"@typescript-eslint/eslint-plugin": "^4.8.1",
83-
"@typescript-eslint/parser": "^4.8.1",
84-
"eslint": "^7.14.0",
85-
"eslint-config-prettier": "^6.15.0",
86-
"eslint-plugin-prettier": "^3.1.4",
87-
"jest": "^26.0.0",
88-
"mkdirp": "^1.0.3",
89-
"npm-run-all": "^4.1.5",
90-
"prettier": "^2.1.1",
91-
"rimraf": "^3.0.2",
92-
"stylelint": "^14.3.0",
93-
"stylelint-config-prettier": "^9.0.4",
94-
"stylelint-config-recommended": "^6.0.0",
95-
"stylelint-config-standard": "~24.0.0",
96-
"stylelint-prettier": "^2.0.0",
97-
"ts-jest": "^26.0.0",
98-
"typescript": "~4.1.3"
99-
},
100-
"sideEffects": [
101-
"style/*.css",
102-
"style/index.js"
141+
"plugins": [
142+
"@typescript-eslint"
103143
],
104-
"styleModule": "style/index.js",
105-
"publishConfig": {
106-
"access": "public"
107-
},
108-
"jupyterlab": {
109-
"discovery": {
110-
"server": {
111-
"managers": [
112-
"pip"
113-
],
114-
"base": {
115-
"name": "jupyter_fairly"
116-
}
117-
}
118-
},
119-
"extension": true,
120-
"outputDir": "jupyter_fairly/labextension",
121-
"schemaDir": "schema"
144+
"rules": {
145+
"@typescript-eslint/naming-convention": [
146+
"error",
147+
{
148+
"selector": "interface",
149+
"format": [
150+
"PascalCase"
151+
],
152+
"custom": {
153+
"regex": "^I[A-Z]",
154+
"match": true
155+
}
156+
}
157+
],
158+
"@typescript-eslint/no-unused-vars": [
159+
"warn",
160+
{
161+
"args": "none"
162+
}
163+
],
164+
"@typescript-eslint/no-explicit-any": "off",
165+
"@typescript-eslint/no-namespace": "off",
166+
"@typescript-eslint/no-use-before-define": "off",
167+
"@typescript-eslint/quotes": [
168+
"error",
169+
"single",
170+
{
171+
"avoidEscape": true,
172+
"allowTemplateLiterals": false
173+
}
174+
],
175+
"curly": [
176+
"error",
177+
"all"
178+
],
179+
"eqeqeq": "error",
180+
"prefer-arrow-callback": "error"
181+
}
182+
},
183+
"prettier": {
184+
"singleQuote": true,
185+
"trailingComma": "none",
186+
"arrowParens": "avoid",
187+
"endOfLine": "auto"
188+
},
189+
"stylelint": {
190+
"extends": [
191+
"stylelint-config-recommended",
192+
"stylelint-config-standard",
193+
"stylelint-prettier/recommended"
194+
],
195+
"rules": {
196+
"property-no-vendor-prefix": null,
197+
"selector-no-vendor-prefix": null,
198+
"value-no-vendor-prefix": null
122199
}
200+
}
123201
}

jupyter_fairly/pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["hatchling>=1.4.0", "jupyterlab>=3.4.7,<4.0.0", "hatch-nodejs-version"]
2+
requires = ["hatchling>=1.4.0", "jupyterlab>=3.5.0,<4.0.0", "hatch-nodejs-version"]
33
build-backend = "hatchling.build"
44

55
[project]
@@ -23,8 +23,8 @@ classifiers = [
2323
]
2424
dependencies = [
2525
"jupyter_server>=1.21,<3",
26-
"jupyterlab>=3.6.0,<4",
27-
"fairly>=0.4.0",
26+
"jupyterlab>=3.6.1,<4",
27+
"fairly>=0.4.1",
2828
]
2929
dynamic = ["version", "description", "authors", "urls", "keywords"]
3030

0 commit comments

Comments
 (0)