notebook/pyproject.toml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

293 lines
7.6 KiB
TOML
Raw Permalink Normal View History

2020-12-04 15:15:41 +02:00
[build-system]
requires = ["hatchling>=1.11", "jupyterlab>=4.1.0b2,<5"]
2022-06-13 10:19:48 -05:00
build-backend = "hatchling.build"
2022-06-13 10:19:48 -05:00
[project]
name = "notebook"
description = "Jupyter Notebook - A web-based notebook environment for interactive computing"
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.8"
2022-06-13 10:19:48 -05:00
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.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
2022-10-25 08:42:42 +02:00
"Programming Language :: Python :: 3.11",
2023-10-18 10:58:21 +02:00
"Programming Language :: Python :: 3.12",
"Typing :: Typed",
2022-06-13 10:19:48 -05:00
]
dependencies = [
"jupyter_server>=2.4.0,<3",
"jupyterlab>=4.1.0b2,<5",
"jupyterlab_server>=2.22.1,<3",
2022-11-18 10:23:39 +00:00
"notebook_shim>=0.2,<0.3",
"tornado>=6.2.0",
2022-06-13 10:19:48 -05:00
]
dynamic = ["version"]
2022-06-13 10:19:48 -05:00
[project.scripts]
jupyter-notebook = "notebook.app:main"
2022-06-13 10:19:48 -05:00
[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"
2022-06-13 10:19:48 -05:00
[project.optional-dependencies]
test = [
"nbval",
2022-11-21 06:37:19 -06:00
"pytest>=7.0",
2022-06-13 10:19:48 -05:00
"requests",
"pytest-tornasync",
"pytest-timeout",
"pytest-console-scripts",
"ipykernel",
"jupyter_server[test]>=2.4.0,<3",
"jupyterlab_server[test]>=2.22.1,<3",
"importlib-resources>=5.0;python_version<\"3.10\"",
2022-06-13 10:19:48 -05:00
]
2022-11-19 14:09:38 -06:00
docs = [
"myst_parser",
"nbsphinx",
"pydata-sphinx-theme",
"sphinx>=1.3.6",
"sphinxcontrib_github_alt",
"sphinxcontrib_spelling"
2022-11-19 14:09:38 -06:00
]
2022-06-13 10:19:48 -05:00
dev = [
"pre-commit",
2022-09-23 12:10:10 -05:00
"hatch"
2022-06-13 10:19:48 -05:00
]
[tool.hatch.version]
path = "notebook/_version.py"
2022-10-16 19:28:25 -05:00
validate-bump = false
2022-06-13 10:19:48 -05:00
[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"
"notebook.svg" = "share/icons/hicolor/scalable/apps/notebook.svg"
"jupyter-notebook.desktop" = "share/applications/jupyter-notebook.desktop"
2022-06-13 10:19:48 -05:00
[tool.hatch.build.targets.sdist]
artifacts = [
"notebook/labextension",
"notebook/static",
"notebook/schemas/@jupyter-notebook",
"notebook/templates",
"notebook.svg",
"jupyter-notebook.desktop",
2022-06-13 10:19:48 -05:00
]
include = [
"/jupyter-config",
"/notebook",
"/tests",
"/package.json",
"/install.json",
"/ts*.json",
"/*.md"
]
[tool.hatch.build.targets.wheel]
artifacts = [
"notebook/static",
"notebook/templates",
]
include = ["/notebook"]
2022-11-19 14:09:38 -06:00
[tool.hatch.envs.docs]
features = ["docs"]
[tool.hatch.envs.docs.scripts]
build = "make -C docs html SPHINXOPTS='-W'"
serve = "cd docs/build/html && python -m http.server"
2022-11-19 14:09:38 -06:00
2022-11-19 16:21:49 -06:00
[tool.hatch.envs.default.scripts]
2022-11-19 16:38:01 -06:00
npm_pack = "jlpm lerna exec -- npm pack"
js_test = "jlpm run build:test && jlpm run test"
2022-11-19 16:21:49 -06:00
2022-11-19 14:09:38 -06:00
[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[toml]", "pytest-cov"]
2022-11-19 14:09:38 -06:00
[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}"
2022-06-13 10:19:48 -05:00
[tool.hatch.envs.lint]
detached = true
2023-11-04 22:37:46 -05:00
dependencies = ["pre-commit"]
[tool.hatch.envs.lint.scripts]
2023-11-09 19:53:11 -06:00
build = [
"pre-commit run --all-files ruff",
"pre-commit run --all-files ruff-format"
]
2023-11-04 22:37:46 -05:00
[tool.hatch.envs.typing]
dependencies = [ "pre-commit"]
detached = true
[tool.hatch.envs.typing.scripts]
test = "pre-commit run --all-files --hook-stage manual mypy"
2022-06-13 10:19:48 -05:00
[tool.hatch.build.hooks.jupyter-builder]
dependencies = ["hatch-jupyter-builder>=0.5"]
2022-06-13 10:19:48 -05:00
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"
source_dir = "packages"
build_dir = "notebook/static"
npm = ["jlpm"]
[tool.hatch.build.hooks.jupyter-builder.editable-build-kwargs]
build_cmd = "build"
source_dir = "packages"
build_dir = "notebook/static"
npm = ["jlpm"]
2022-04-01 15:08:30 -05:00
[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 clean",
"jlpm build:prod"
]
before-build-python = [
"jlpm clean"
]
2022-04-01 15:08:30 -05:00
[tool.pytest.ini_options]
minversion = "6.0"
xfail_strict = true
log_cli_level = "info"
addopts = [
2023-11-04 22:37:46 -05:00
"-ra", "--durations=10", "--color=yes", "--doctest-modules",
"--showlocals", "--strict-markers", "--strict-config"
]
2022-04-01 15:08:30 -05:00
testpaths = [
2022-06-13 10:19:48 -05:00
"tests/",
2022-04-01 15:08:30 -05:00
]
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",
"ignore:datetime.utc.* is deprecated",
"ignore:datetime.datetime.* is deprecated",
2022-04-01 15:08:30 -05:00
]
2022-10-16 19:28:25 -05:00
2022-11-19 14:09:38 -06:00
[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.coverage.run]
relative_files = true
source = ["notebook"]
[tool.mypy]
files = "notebook"
python_version = "3.8"
strict = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
warn_unreachable = true
2022-10-17 15:10:42 +00:00
[tool.ruff]
line-length = 100
2023-10-29 15:48:32 -05:00
[tool.ruff.format]
docstring-code-format = true
2023-10-29 15:48:32 -05:00
[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear
"I", # isort
"ARG", # flake8-unused-arguments
"C4", # flake8-comprehensions
"EM", # flake8-errmsg
"ICN", # flake8-import-conventions
"G", # flake8-logging-format
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PTH", # flake8-use-pathlib
"PT", # flake8-pytest-style
"RET", # flake8-return
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"T20", # flake8-print
"UP", # pyupgrade
"YTT", # flake8-2020
"EXE", # flake8-executable
"PYI", # flake8-pyi
"S", # flake8-bandit
2022-10-17 15:10:42 +00:00
]
ignore = [
"PLR", # Design related pylint codes
"C408", "C416", # Unnecessary `dict` call (rewrite as a literal)
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
2022-10-17 15:10:42 +00:00
]
2023-10-29 15:48:32 -05:00
[tool.ruff.lint.per-file-ignores]
# S101 Use of `assert` detected
# F841 Local variable `foo` is assigned to but never used
"tests/*" = ["S101", "F841", "ARG", "PTH"]
"docs/source/conf.py" = ["PTH"]
"ui-tests/test/jupyter_server_config.py" = ["F821"]
"*.ipynb" = ["E402", "B018", "E501", "T201", "RET"]
[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"]
[tool.repo-review]
ignore = ["GH102", "PC180", "PC111"]