Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Jupyter Packaging and other cleanup #68

Merged
merged 2 commits into from
Oct 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ jobs:
jupyter nbclassic -h
- name: Test with pytest
run: |
pytest -vv --cov nbclassic --cov-report term-missing:skip-covered
pytest -vv --cov=nbclassic nbclassic --cov-report term-missing:skip-covered
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
include LICENSE
include setupbase.py
8 changes: 4 additions & 4 deletions nbclassic/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .notebookapp import NotebookApp


def _jupyter_server_extension_paths():
# Locally import to avoid install errors.
from .notebookapp import NotebookApp

return [
{
'module': 'nbclassic.notebookapp',
Expand All @@ -11,4 +11,4 @@ def _jupyter_server_extension_paths():
{
'module': 'nbclassic.nbserver',
}
]
]
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
def _jupyter_server_extension_points():
return [
{
"module": "tests.shim.mockextension",
"module": "nbclassic.tests.shim.mockextension",
"app": MockExtensionApp
}
]
Expand All @@ -35,4 +35,4 @@ class MockExtensionApp(
# ------ Traits found ServerApp and MockExtensionApp

allow_origin = Unicode(config=True)
allow_origin_pat = Unicode(config=True)
allow_origin_pat = Unicode(config=True)
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def jp_server_config():
"ServerApp": {
"jpserver_extensions": {
"nbclassic": True,
"tests.shim.mockextension": True
"nbclassic.tests.shim.mockextension": True
}
}
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
30 changes: 30 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[build-system]
requires = ["jupyter_packaging~=0.9,<2"]
build-backend = "jupyter_packaging.build_api"

[tool.check-manifest]
ignore = ["tbump.toml", ".*", "conftest.py"]

[tool.pytest.ini_options]
addopts = "--doctest-modules"
norecursedirs = ["confs"]
testpaths = [
"nbclassic/tests"
]

[tool.jupyter-releaser]
skip = ["check-links"]

[tool.tbump.version]
current = "0.3.2"
regex = '''
(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)
((?P<channel>a|b|rc|.dev)(?P<release>\d+))?
'''

[tool.tbump.git]
message_template = "Bump to {new_version}"
tag_template = "v{new_version}"

[[tool.tbump.file]]
src = "nbclassic/__version__.py"
62 changes: 58 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,58 @@
[tool:pytest]
addopts =
--color=yes
-s
[metadata]
name = nbclassic
version = attr: nbclassic.__version__.__version__
description = Jupyter Notebook as a Jupyter Server extension.
long_description = file: README.md
long_description_content_type = text/markdown
license_file = LICENSE
author = Jupyter Development Team
author_email = jupyter@googlegroups.com
url = https://jupyter.org
platforms = Linux, Mac OS X, Windows
keywords = ipython, jupyter
classifiers =
Intended Audience :: Developers
Intended Audience :: System Administrators
Intended Audience :: Science/Research
License :: OSI Approved :: BSD License
Programming Language :: Python
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9

[options]
zip_safe = False
include_package_data = True
packages = find:
python_requires = >=3.6
install_requires =
notebook<7
jupyter_server~=1.8

[options.data_files]
etc/jupyter/jupyter_server_config.d =
jupyter_server_config.d/nbclassic.json


[options.extras_require]
test =
pytest
pytest-tornasync
pytest-console-scripts

[options.entry_points]
console_scripts =
jupyter-nbclassic = nbclassic.notebookapp:main

[options.packages.find]
exclude = ['docs*']

[flake8]
ignore = E, C, W, F401, F403, F811, F841, E402, I100, I101, D400
builtins = c, get_config
exclude =
.cache,
.github,
docs,
setup.py
74 changes: 0 additions & 74 deletions setup.py

This file was deleted.

Loading