Skip to content

Commit

Permalink
Release request commit created with Cranko.
Browse files Browse the repository at this point in the history
+++ cranko-rc-info-v1
[[projects]]
qnames = ["wwt_kernel_data_relay", "pypa"]
bump_spec = "micro bump"

+++
  • Loading branch information
cranko committed Oct 23, 2021
2 parents bf77bfa + a58722f commit 0d552fb
Show file tree
Hide file tree
Showing 8 changed files with 109 additions and 52 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# rc: minor bump
# rc: micro bump

- Add the drop-in configuration files needed to automatically activate the
server extension upon package installation (#1, @pkgw).


# wwt_kernel_data_relay 0.1.0 (2021-10-14)

Initial release of the WWT Kernel Data Relay package.
4 changes: 4 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
include CHANGELOG.md
include LICENSE
include README.md
include .coveragerc
include *.md
include *.yml

graft docs
prune docs/_build

recursive-include jupyter-config *.json

graft wwt_kernel_data_relay/tests

global-exclude *~
Expand Down
4 changes: 2 additions & 2 deletions ci/azure-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
set -euo pipefail
source activate-conda.sh
set -x
\conda create -y -n build setuptools pip python="$PYTHON_SERIES"
\conda create -y -n build jupyter-packaging setuptools pip python="$PYTHON_SERIES"
conda activate build
pip install $BASH_WORKSPACE/sdist/*.tar.gz
displayName: Install from sdist
Expand All @@ -64,7 +64,7 @@ jobs:
set -euo pipefail
source activate-conda.sh
set -x
\conda create -y -n build setuptools pip python=3.9
\conda create -y -n build jupyter-packaging setuptools pip python=3.9
conda activate build
pip install $BASH_WORKSPACE/sdist/*.tar.gz
displayName: Install from sdist
Expand Down
1 change: 1 addition & 0 deletions ci/azure-sdist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
conda config --add channels conda-forge
conda install -y \
jupyter_client \
jupyter-packaging \
notebook \
tornado \
traitlets
Expand Down
7 changes: 7 additions & 0 deletions jupyter-config/nb-config/wwt_kernel_data_relay.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"NotebookApp": {
"nbserver_extensions": {
"wwt_kernel_data_relay": true
}
}
}
7 changes: 7 additions & 0 deletions jupyter-config/server-config/wwt_kernel_data_relay.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"ServerApp": {
"jpserver_extensions": {
"wwt_kernel_data_relay": true
}
}
}
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[build-system]
requires = ["jupyter_packaging~=0.10,<2", "jupyterlab~=3.1"]
build-backend = "jupyter_packaging.build_api"

[tool.cranko]
extra_python_rewrite_files = [
"docs/conf.py"
Expand Down
126 changes: 77 additions & 49 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,83 +2,111 @@
# Copyright 2019-2021 the .NET Foundation
# Licensed under the MIT License

import os
from setuptools import setup, Extension
import sys
from setuptools import setup


def get_long_desc():
in_preamble = True
lines = []

with open('README.md', 'rt', encoding='utf8') as f:
with open("README.md", "rt", encoding="utf8") as f:
for line in f:
if in_preamble:
if line.startswith('<!--pypi-begin-->'):
if line.startswith("<!--pypi-begin-->"):
in_preamble = False
else:
if line.startswith('<!--pypi-end-->'):
if line.startswith("<!--pypi-end-->"):
break
else:
lines.append(line)

lines.append('''
lines.append(
"""
For more information, including installation instructions, please visit [the
project homepage].
[the project homepage]: https://github.com/WorldWideTelescope/wwt_kernel_data_relay/
''')
return ''.join(lines)
"""
)
return "".join(lines)


data_files_spec = [
(
"etc/jupyter/jupyter_server_config.d",
"jupyter-config/server-config",
"wwt_kernel_data_relay.json",
),
# For backward compatibility with notebook server:
(
"etc/jupyter/jupyter_notebook_config.d",
"jupyter-config/nb-config",
"wwt_kernel_data_relay.json",
),
]


setup_args = dict(
name = 'wwt_kernel_data_relay', # cranko project-name
version = '0.dev0', # cranko project-version
description = 'Jupyter server extension to allow kernels to make data web-accessible',
long_description = get_long_desc(),
long_description_content_type = 'text/markdown',
url = 'https://github.com/WorldWideTelescope/wwt_kernel_data_relay/',
license = 'MIT',
platforms = 'Linux, Mac OS X, Windows',

author = 'AAS WorldWide Telescope Team',
author_email = '[email protected]',

classifiers = [
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Topic :: Scientific/Engineering :: Astronomy',
'Topic :: Scientific/Engineering :: Visualization',
name="wwt_kernel_data_relay", # cranko project-name
version="0.dev0", # cranko project-version
description="Jupyter server extension to allow kernels to make data web-accessible",
long_description=get_long_desc(),
long_description_content_type="text/markdown",
url="https://github.com/WorldWideTelescope/wwt_kernel_data_relay/",
license="MIT",
platforms="Linux, Mac OS X, Windows",
author="AAS WorldWide Telescope Team",
author_email="[email protected]",
classifiers=[
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Scientific/Engineering :: Astronomy",
"Topic :: Scientific/Engineering :: Visualization",
],

packages = [
'wwt_kernel_data_relay',
packages=[
"wwt_kernel_data_relay",
#'wwt_kernel_data_relay.tests',
],
include_package_data = True,

install_requires = [
'jupyter-client>=7',
'notebook>=6',
'tornado>=6',
'traitlets>=5',
include_package_data=True,
install_requires=[
"jupyter-client>=7",
"notebook>=6",
"tornado>=6",
"traitlets>=5",
],

extras_require = {
'test': [
'pytest-cov',
extras_require={
"test": [
"pytest-cov",
],
'docs': [
'astropy-sphinx-theme',
'numpydoc',
'sphinx',
'sphinx-automodapi',
"docs": [
"astropy-sphinx-theme",
"numpydoc",
"sphinx",
"sphinx-automodapi",
],
},
)

if __name__ == '__main__':
try:
from jupyter_packaging import get_data_files

setup_args["data_files"] = get_data_files(data_files_spec)
except ImportError as e:
import logging

logging.basicConfig(format="%(levelname)s: %(message)s")
logging.warning(
"Build tool `jupyter-packaging` is missing. Install it with pip or conda."
)
if not ("--name" in sys.argv or "--version" in sys.argv):
raise e


if __name__ == "__main__":
setup(**setup_args)

0 comments on commit 0d552fb

Please sign in to comment.