mirror of
https://github.com/jupyter/notebook.git
synced 2024-11-21 01:11:21 +08:00
6205bf376f
* Update packages to JupyterLab 4.0.0a32 * Update python dependency * Update `@jupyterlab/galata` * Require `jupyter_server>=2.0.1,<3` * Undo `jupyter_server` bump for now * Update to Jest 29 * More jest fixes * Update to the latest Lumino * Fix yarn.lock * Fix JSON background color * Update snapshots
277 lines
6.6 KiB
TOML
277 lines
6.6 KiB
TOML
[build-system]
|
|
requires = ["hatchling>=1.11", "jupyterlab>=4.0.0a32,<5"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[project]
|
|
name = "notebook"
|
|
description = "Jupyter Notebook - A web-based notebook environment for interactive computing"
|
|
readme = "README.md"
|
|
license = { file = "LICENSE" }
|
|
requires-python = ">=3.7"
|
|
authors = [
|
|
{ name = "Jupyter Development Team", email = "jupyter@googlegroups.com" },
|
|
]
|
|
keywords = [
|
|
"Jupyter",
|
|
"JupyterLab",
|
|
"Notebook",
|
|
]
|
|
classifiers = [
|
|
"Framework :: Jupyter",
|
|
"Intended Audience :: Developers",
|
|
"Intended Audience :: Science/Research",
|
|
"Intended Audience :: System Administrators",
|
|
"License :: OSI Approved :: BSD License",
|
|
"Programming Language :: Python",
|
|
"Programming Language :: Python :: 3.7",
|
|
"Programming Language :: Python :: 3.8",
|
|
"Programming Language :: Python :: 3.9",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Typing :: Typed",
|
|
]
|
|
dependencies = [
|
|
"jupyter_server>=2.0.0rc3,<3",
|
|
"importlib-resources>=5.0;python_version<\"3.9\"",
|
|
"jupyterlab>=4.0.0a32,<5",
|
|
"jupyterlab_server>=2.16.3,<3",
|
|
"notebook_shim>=0.2,<0.3",
|
|
"tornado>=6.1.0",
|
|
]
|
|
dynamic = ["version"]
|
|
|
|
[project.scripts]
|
|
jupyter-notebook = "notebook.app:main"
|
|
|
|
[project.urls]
|
|
Documentation = "https://jupyter-notebook.readthedocs.io/"
|
|
Homepage = "https://github.com/jupyter/notebook"
|
|
Source = "https://github.com/jupyter/notebook"
|
|
Tracker = "https://github.com/jupyter/notebook/issues"
|
|
|
|
[project.optional-dependencies]
|
|
test = [
|
|
"coverage",
|
|
"nbval",
|
|
"pytest>=7.0",
|
|
"pytest-cov",
|
|
"requests",
|
|
"pytest-tornasync",
|
|
"pytest-timeout",
|
|
"pytest-console-scripts",
|
|
"ipykernel",
|
|
"jupyter_server[test]>=2.0.0rc3,<3",
|
|
"jupyterlab_server[test]>=2.16.3,<3",
|
|
]
|
|
docs = [
|
|
"myst_parser",
|
|
"nbsphinx",
|
|
"pydata-sphinx-theme",
|
|
"sphinx>=1.3.6",
|
|
"sphinxcontrib_github_alt",
|
|
"sphinxcontrib_spelling"
|
|
]
|
|
dev = [
|
|
"pre-commit",
|
|
"hatch"
|
|
]
|
|
|
|
[tool.hatch.version]
|
|
path = "notebook/_version.py"
|
|
validate-bump = false
|
|
|
|
[tool.hatch.build.targets.wheel.shared-data]
|
|
"notebook/labextension" = "share/jupyter/labextensions/@jupyter-notebook/lab-extension"
|
|
"notebook/schemas/@jupyter-notebook" = "share/jupyter/lab/schemas/@jupyter-notebook"
|
|
"jupyter-config/jupyter_server_config.d" = "etc/jupyter/jupyter_server_config.d"
|
|
|
|
[tool.hatch.build.targets.sdist]
|
|
artifacts = [
|
|
"notebook/labextension",
|
|
"notebook/static",
|
|
"notebook/schemas/@jupyter-notebook",
|
|
"notebook/templates",
|
|
]
|
|
include = [
|
|
"/jupyter-config",
|
|
"/notebook",
|
|
"/tests",
|
|
"/package.json",
|
|
"/install.json",
|
|
"/ts*.json",
|
|
"/*.md"
|
|
]
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
artifacts = [
|
|
"notebook/static",
|
|
"notebook/templates",
|
|
]
|
|
include = ["/notebook"]
|
|
|
|
[tool.hatch.envs.docs]
|
|
features = ["docs"]
|
|
[tool.hatch.envs.docs.scripts]
|
|
build = "make -C docs html SPHINXOPTS='-W'"
|
|
|
|
[tool.hatch.envs.default.scripts]
|
|
npm_pack = "jlpm lerna exec -- npm pack"
|
|
js_test = "jlpm run build:test && jlpm run test"
|
|
|
|
[tool.hatch.envs.test]
|
|
features = ["test"]
|
|
[tool.hatch.envs.test.scripts]
|
|
test = "python -m pytest -vv {args}"
|
|
nowarn = "test -W default {args}"
|
|
|
|
[tool.hatch.envs.cov]
|
|
features = ["test"]
|
|
dependencies = ["coverage", "pytest-cov"]
|
|
[tool.hatch.envs.cov.scripts]
|
|
test = "python -m pytest -vv --cov notebook --cov-branch --cov-report term-missing:skip-covered {args}"
|
|
nowarn = "test -W default {args}"
|
|
|
|
[tool.hatch.envs.typing]
|
|
features = ["test"]
|
|
dependencies = ["mypy>=0.990"]
|
|
[tool.hatch.envs.typing.scripts]
|
|
test = "mypy --install-types --non-interactive {args:notebook tests}"
|
|
|
|
[tool.hatch.envs.lint]
|
|
dependencies = [
|
|
"black[jupyter]==22.10.0",
|
|
"mdformat>0.7",
|
|
"mdformat-gfm>=0.3.5",
|
|
"ruff==0.0.189"
|
|
]
|
|
detached = true
|
|
[tool.hatch.envs.lint.scripts]
|
|
style = [
|
|
"ruff {args:notebook tests ui-tests}",
|
|
"black --check --diff {args:.}",
|
|
"mdformat --check {args:CHANGELOG.md}"
|
|
]
|
|
fmt = [
|
|
"black {args:.}",
|
|
"ruff --fix {args:notebook}",
|
|
"mdformat {args:CHANGELOG.md}"
|
|
]
|
|
|
|
[tool.hatch.build.hooks.jupyter-builder]
|
|
dependencies = ["hatch-jupyter-builder>=0.2"]
|
|
build-function = "hatch_jupyter_builder.npm_builder"
|
|
ensured-targets = [
|
|
"notebook/labextension/static/style.js",
|
|
"notebook/static/bundle.js"
|
|
]
|
|
install-pre-commit-hook = true
|
|
|
|
[tool.hatch.build.hooks.jupyter-builder.build-kwargs]
|
|
build_cmd = "build:prod"
|
|
editable_build_cmd = "build"
|
|
source_dir = "packages"
|
|
build_dir = "notebook/static"
|
|
npm = "jlpm"
|
|
|
|
[tool.jupyter-releaser.options]
|
|
version-cmd = "jlpm run release:bump --force --skip-commit"
|
|
|
|
[tool.jupyter-releaser.hooks]
|
|
before-bump-version = [
|
|
"python -m pip install --pre -U jupyterlab",
|
|
"jlpm",
|
|
"jlpm run build:utils",
|
|
"python -m pip install hatch"
|
|
]
|
|
before-build-npm = [
|
|
"jlpm build:prod"
|
|
]
|
|
before-build-python = [
|
|
"jlpm clean"
|
|
]
|
|
|
|
[tool.pytest.ini_options]
|
|
addopts = "-raXs --durations 10 --color=yes --doctest-modules"
|
|
testpaths = [
|
|
"tests/",
|
|
]
|
|
timeout = 300
|
|
filterwarnings = [
|
|
"error",
|
|
"ignore:There is no current event loop:DeprecationWarning",
|
|
"ignore:make_current is deprecated; start the event loop first",
|
|
"ignore:clear_current is deprecated"
|
|
]
|
|
|
|
[tool.coverage.report]
|
|
exclude_lines = [
|
|
"pragma: no cover",
|
|
"def __repr__",
|
|
"if self.debug:",
|
|
"if settings.DEBUG",
|
|
"raise AssertionError",
|
|
"raise NotImplementedError",
|
|
"if 0:",
|
|
"if __name__ == .__main__.:",
|
|
"class .*\bProtocol\\):",
|
|
"@(abc\\.)?abstractmethod",
|
|
]
|
|
|
|
[tool.mypy]
|
|
check_untyped_defs = true
|
|
disallow_incomplete_defs = true
|
|
no_implicit_optional = true
|
|
pretty = true
|
|
show_error_context = true
|
|
show_error_codes = true
|
|
strict_equality = true
|
|
strict_optional = true
|
|
warn_no_return = true
|
|
warn_return_any = true
|
|
warn_unused_configs = true
|
|
warn_unused_ignores = true
|
|
warn_redundant_casts = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = [
|
|
"ruamel",
|
|
]
|
|
ignore_missing_imports = true
|
|
|
|
|
|
[tool.black]
|
|
line-length = 100
|
|
target-version = ["py37"]
|
|
skip-string-normalization = true
|
|
|
|
[tool.ruff]
|
|
target-version = "py37"
|
|
line-length = 100
|
|
select = [
|
|
"A", "B", "C", "E", "F", "FBT", "I", "N", "Q", "RUF", "S", "T",
|
|
"UP", "W", "YTT",
|
|
]
|
|
ignore = [
|
|
# Q000 Single quotes found but double quotes preferred
|
|
"Q000",
|
|
# FBT001 Boolean positional arg in function definition
|
|
"FBT001", "FBT002", "FBT003",
|
|
# C408 Unnecessary `dict` call (rewrite as a literal)
|
|
"C408", "C416",
|
|
]
|
|
|
|
[tool.ruff.per-file-ignores]
|
|
# S101 Use of `assert` detected
|
|
# F841 Local variable `foo` is assigned to but never used
|
|
"tests/*" = ["S101", "F841"]
|
|
|
|
[tool.interrogate]
|
|
ignore-init-module=true
|
|
ignore-private=true
|
|
ignore-semiprivate=true
|
|
ignore-property-decorators=true
|
|
ignore-nested-functions=true
|
|
ignore-nested-classes=true
|
|
fail-under=100
|
|
exclude = ["tests", "ui-tests", "docs", "node_modules", "setup.py"]
|