diff --git a/Makefile b/Makefile index 487077b..c91a5b5 100755 --- a/Makefile +++ b/Makefile @@ -10,6 +10,8 @@ CONDA_REMOVE=source $$(conda info --base)/etc/profile.d/conda.sh ; conda remove ENV_NAME=datalayer +VERSION=1.0.9 + .DEFAULT_GOAL := default .SILENT: init @@ -58,7 +60,36 @@ kill: warning: echo "\x1b[34m\x1b[43mEnsure you have run \x1b[1;37m\x1b[41m conda deactivate \x1b[22m\x1b[34m\x1b[43m before invoking this.\x1b[0m" -publish-npm: # publish the npm packages +typedoc: ## generate typedoc + rm -fr typedoc && \ + yarn typedoc --tsconfig ./tsconfig.json && \ + open typedoc/index.html + +publish-typedoc: typedoc ## deploy typedoc + aws s3 rm \ + s3://datalayer-typedoc/datalayer/core/${VERSION}/ \ + --recursive \ + --profile datalayer + aws s3 cp \ + typedoc \ + s3://datalayer-typedoc/datalayer/core/${VERSION}/ \ + --recursive \ + --profile datalayer + aws cloudfront create-invalidation \ + --distribution-id XXX \ + --paths /datalayer/jupyter-kernels/${VERSION}/ \ + --profile datalayer + echo open ✨ https://typedoc.datalayer.tech/datalayer/core/${VERSION} + +publish-npm: # publish the npm package yarn build && \ npm publish --access public echo https://www.npmjs.com/package/@datalayer/core?activeTab=versions + +publish-pypi: # publish the pypi package + git clean -fdx && \ + python -m build + @exec echo + @exec echo twine upload ./dist/*-py3-none-any.whl + @exec echo + @exec echo https://pypi.org/project/datalayer/#history diff --git a/datalayer/__init__.py b/datalayer/__init__.py index be286c1..ed14a60 100644 --- a/datalayer/__init__.py +++ b/datalayer/__init__.py @@ -2,7 +2,11 @@ from ._version import __version__ from .serverapplication import DatalayerExtensionApp -from .lab import DatalayerLabApp + +try: + from .lab import DatalayerLabApp +except ModuleNotFoundError as e: + print("No jupyterlab available here...") def _jupyter_server_extension_points() -> List[Dict[str, Any]]: diff --git a/datalayer/application.py b/datalayer/application.py index 43c3aec..bd5d328 100644 --- a/datalayer/application.py +++ b/datalayer/application.py @@ -1,12 +1,12 @@ +# Copyright (c) Datalayer Development Team. +# Distributed under the terms of the Modified BSD License. + """ A base Application class for Datalayer applications. All Datalayer applications should inherit from this. """ -# Copyright (c) Datalayer Development Team. -# Distributed under the terms of the Modified BSD License. - import logging import os import sys diff --git a/datalayer/serverapplication.py b/datalayer/serverapplication.py index 05ab69d..d3122e0 100644 --- a/datalayer/serverapplication.py +++ b/datalayer/serverapplication.py @@ -1,6 +1,5 @@ """The Datalayer Server application.""" -import json import os import typing as t diff --git a/package.json b/package.json index 06e2ca3..f23f0bd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@datalayer/core", - "version": "1.0.7", + "version": "1.1.0", "description": "Ξ Datalayer Core.", "keywords": [ "datalayer", @@ -65,7 +65,7 @@ "watch:src": "tsc -w" }, "dependencies": { - "@datalayer/run": "^0.1.4" + "@datalayer/run": "^0.1.11" }, "devDependencies": { "@babel/core": "^7.21.0",