diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 0669002..397db6d 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -36,31 +36,11 @@ jobs: with: path: ./dist/*.tar.gz - build_wheels: - name: Build Wheels - runs-on: ubuntu-latest - needs: - - style_check - - run_tests - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v5.1.1 - with: - python-version: "3.10" - - run: python -m pip install --upgrade pip - - name: Build pure Python wheels - run: pip wheel . -w wheels/ --no-deps - - name: Upload builds - uses: actions/upload-artifact@v4 - with: - path: ./wheels/*.whl - publish_to_pypi: name: Publish to PyPI if: startsWith(github.event.ref, 'refs/tags/v') needs: - build_source - - build_wheels runs-on: ubuntu-latest steps: - name: Download source tarball and builds @@ -72,4 +52,4 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} # TODO: Add token in github settings + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/README.md b/README.md index 59b7303..e66fdab 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,23 @@ # Jupyter libyt +[![PyPI version](https://badge.fury.io/py/jupyter-libyt.svg)](https://badge.fury.io/py/jupyter-libyt) This is a Jupyter provisioner for [`libyt`](https://github.com/yt-project/libyt) kernel. * **Jupyter Project**: https://jupyter.org/ -* **YT Project**: https://yt-project.org/ +* **yt**: https://yt-project.org/ * **libyt Repo**: https://github.com/yt-project/libyt -* **libyt Doc**: https://yt-project.github.io/libyt/ +* **libyt Doc**: https://libyt.readthedocs.io/en/latest/ + +### Install + +- From PyPI: + ```bash + pip install jupyter-libyt + ``` +- From source: + ```bash + git clone https://github.com/yt-project/jupyter_libyt.git + cd jupyter_libyt + pip install . + ``` diff --git a/jupyter_libyt/_version.py b/jupyter_libyt/_version.py index f102a9c..3dc1f76 100644 --- a/jupyter_libyt/_version.py +++ b/jupyter_libyt/_version.py @@ -1 +1 @@ -__version__ = "0.0.1" +__version__ = "0.1.0" diff --git a/jupyter_libyt/provisioning/libyt_kernel_provisioner.py b/jupyter_libyt/provisioning/libyt_kernel_provisioner.py index 6cebfa1..6e7e2e1 100644 --- a/jupyter_libyt/provisioning/libyt_kernel_provisioner.py +++ b/jupyter_libyt/provisioning/libyt_kernel_provisioner.py @@ -74,6 +74,13 @@ async def cleanup(self, restart: bool = False) -> None: pass def _get_kernel_info(self, target_file: str) -> typing.Union[int, dict]: + # Print version info + from .. import _version + + print( + f"jupyter_libyt version {_version.__version__} (required libyt version >=0.1.0,<1.0.0)" + ) + # Get LIBYT_KERNEL_INFO_DIR in environment variable libyt_kernel_info_dir = os.getenv("LIBYT_KERNEL_INFO_DIR") if libyt_kernel_info_dir is None: diff --git a/pyproject.toml b/pyproject.toml index 5c04566..e6f828c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ authors = [ description = "A Jupyter kernel provisioner for libyt" readme = "README.md" license = {file = "LICENSE"} -requires-python = ">=3.8" +requires-python = ">=3.7" keywords = ["jupyter"] classifiers = [ "Development Status :: 3 - Alpha", diff --git a/setup.cfg b/setup.cfg index 8746d04..7748423 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,7 +7,7 @@ include_package_data = True packages = find: zip_safe = False install_requires = - jupyter-client>=8.0.0,<9 + jupyter-client>=7.0.0,<9 [options.packages.find] exclude =