From 3b3de2cc54264e2bee1548980c2f57e92532bbbe Mon Sep 17 00:00:00 2001 From: Jared Dean Date: Wed, 24 Mar 2021 14:25:13 -0400 Subject: [PATCH] fix install; version; github actions; bump version --- .github/workflows/publish-to-test-pypi.yml | 2 +- .github/workflows/python-publish.yml | 5 +++-- binder/postBuild | 14 +++++++------- sas_kernel/kernel.py | 2 +- sas_kernel/showSASLog/__init__.py | 2 +- sas_kernel/theme/__init__.py | 2 -- sas_kernel/version.py | 2 +- setup.py | 12 ++++++------ 8 files changed, 20 insertions(+), 21 deletions(-) diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml index b33b318..6fed92f 100644 --- a/.github/workflows/publish-to-test-pypi.yml +++ b/.github/workflows/publish-to-test-pypi.yml @@ -1,7 +1,7 @@ # This workflow will upload a Python Package using Twine when a release is created # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries -name: Publish Python 🐍 Package 📦 to TestPyPI +name: Publish Package to TestPyPI on: push diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 1a32880..99df40b 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -1,12 +1,14 @@ # This workflow will upload a Python Package using Twine when a release is created # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries -name: Publish Python 🐍 Package 📦 to PyPI +name: Publish Package to PyPI on: release: types: [created] + workflow_dispatch: + jobs: deploy: @@ -24,7 +26,6 @@ jobs: pip install setuptools wheel twine - name: Build and publish env: - # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} run: | diff --git a/binder/postBuild b/binder/postBuild index ba97c81..c4da38a 100644 --- a/binder/postBuild +++ b/binder/postBuild @@ -21,14 +21,14 @@ mkdir -p ~/.config/saspy/ cp ./binder/sascfg_personal.py ~/.config/saspy/ #set -ex -# jupyter kernelspec list -# jupyter nbextension list +jupyter kernelspec list +jupyter nbextension list -# jupyter nbextension install --py sas_kernel.showSASLog --user -# jupyter nbextension enable sas_kernel.showSASLog --py +jupyter nbextension install --py sas_kernel.showSASLog --user +jupyter nbextension enable sas_kernel.showSASLog --py -# jupyter nbextension install --py sas_kernel.theme --user -# jupyter nbextension enable sas_kernel.theme --py +jupyter nbextension install --py sas_kernel.theme --user +jupyter nbextension enable sas_kernel.theme --py -# jupyter nbextension list +jupyter nbextension list diff --git a/sas_kernel/kernel.py b/sas_kernel/kernel.py index af45e1a..e23fcc4 100644 --- a/sas_kernel/kernel.py +++ b/sas_kernel/kernel.py @@ -26,7 +26,7 @@ from typing import Tuple from IPython.display import HTML from metakernel import MetaKernel -from ._version import __version__ +from .version import __version__ # create a LOGGER to output messages to the Jupyter CONSOLE diff --git a/sas_kernel/showSASLog/__init__.py b/sas_kernel/showSASLog/__init__.py index e9b392b..fb64e70 100644 --- a/sas_kernel/showSASLog/__init__.py +++ b/sas_kernel/showSASLog/__init__.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -# from .sas_kernel import __version__ + def _jupyter_nbextension_paths(): return [dict(section="notebook", diff --git a/sas_kernel/theme/__init__.py b/sas_kernel/theme/__init__.py index 5739bc7..b04e4ec 100644 --- a/sas_kernel/theme/__init__.py +++ b/sas_kernel/theme/__init__.py @@ -13,9 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -"""SAS Kernel Juypter Implementation""" -# from .sas_kernel import __version__ def _jupyter_nbextension_paths(): return [dict(section="notebook", src="", dest="theme", require="theme/theme_selector")] diff --git a/sas_kernel/version.py b/sas_kernel/version.py index 5797dbc..dd06fb1 100644 --- a/sas_kernel/version.py +++ b/sas_kernel/version.py @@ -14,4 +14,4 @@ # limitations under the License. # -__version__ = '2.4.2' +__version__ = '2.4.3' diff --git a/setup.py b/setup.py index 010d160..609e841 100644 --- a/setup.py +++ b/setup.py @@ -15,22 +15,22 @@ # limitations under the License. # +import sys +import os +from distutils.command.install import install exec(open('./sas_kernel/version.py').read()) print("Installing sas_kernel version:{}".format(__version__)) try: from setuptools import setup, find_packages except ImportError: from distutils.core import setup, find_packages -from distutils.command.install import install -import os, sys - -# from sas_kernel._version import __version__ SVEM_FLAG = '--single-version-externally-managed' if SVEM_FLAG in sys.argv: sys.argv.remove(SVEM_FLAG) + class InstallWithKernelspec(install): def run(self): # Regular installation @@ -61,8 +61,8 @@ def run(self): "jupyter_client>=6", "IPython>=7.12.0"], setup_requires=["jupyter_client>=6", "IPython>=7.12.0"], extras_require={'jlab_ext': ['jupyterlab >=3 ', - # 'sas2nb', - # 'sas_log_viewer_v2', + # 'sas2nb', + # 'sas_log_viewer_v2', 'jlab_create_sas_file' ]}, classifiers=['Framework :: IPython',