From 909f2d65a7920aaa2129d051be8f2a9238befffd Mon Sep 17 00:00:00 2001 From: David Brochart Date: Mon, 26 Sep 2022 09:00:28 +0200 Subject: [PATCH] Use hatch --- .pre-commit-config.yaml | 2 +- pyproject.toml | 73 +++++++++++++++++++++++++++++++++-------- setup.cfg | 41 ----------------------- setup.py | 3 -- 4 files changed, 60 insertions(+), 59 deletions(-) delete mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e6584e4..1b6cafb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -47,5 +47,5 @@ repos: hooks: - id: flake8 additional_dependencies: - ["flake8-bugbear==22.6.22", "flake8-implicit-str-concat==0.2.0"] + ["flake8-bugbear==22.6.22", "flake8-implicit-str-concat==0.2.0", "flake8-pyproject"] stages: [manual] diff --git a/pyproject.toml b/pyproject.toml index 29977e8..0f2afb2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,19 +1,64 @@ -[tool.check-manifest] -ignore = [".*"] +[build-system] +requires = [ + "hatchling>=1.10.0", +] +build-backend = "hatchling.build" + +[project] +name = "jupyter-ydoc" +dynamic = [ + "version", +] +description = "Document structures for collaborative editing using Ypy" +requires-python = ">=3.7" +keywords = [ + "jupyter", + "ypy", +] +dependencies = [ + "y-py >=0.5.3,<0.6.0", +] + +[[project.authors]] +name = "Jupyter Development Team" +email = "jupyter@googlegroups.com" + +[project.optional-dependencies] +test = [ + "pre-commit", + "pytest", + "pytest-asyncio", + "websockets >=10.0", + "ypy-websocket >=0.3.1,<0.4.0", +] + +[project.entry-points.jupyter_ydoc] +file = "jupyter_ydoc.ydoc:YFile" +notebook = "jupyter_ydoc.ydoc:YNotebook" -[tool.tbump.version] -current = "0.1.17" -regex = ''' - (?P\d+)\.(?P\d+)\.(?P\d+) - ((?Pa|b|rc|.dev)(?P\d+))? -''' +[project.readme] +file = "README.md" +content-type = "text/markdown" -[tool.tbump.git] -message_template = "Bump to {new_version}" -tag_template = "v{new_version}" +[project.license] +text = "BSD 3-Clause License" -[[tool.tbump.file]] -src = "jupyter_ydoc/__init__.py" +[project.urls] +Homepage = "https://jupyter.org" + +[tool.hatch.version] +path = "jupyter_ydoc/__init__.py" + +[tool.check-manifest] +ignore = [ + ".*", +] [tool.jupyter-releaser] -skip = ["check-links", "check-manifest"] +skip = [ + "check-links", + "check-manifest", +] + +[tool.flake8] +max-line-length = 100 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 45a07be..0000000 --- a/setup.cfg +++ /dev/null @@ -1,41 +0,0 @@ -[metadata] -name = jupyter_ydoc -version = attr: jupyter_ydoc.__version__ -description = Document structures for collaborative editing using Ypy -long_description = file: README.md -long_description_content_type = text/markdown -license = BSD 3-Clause License -license_files = LICENSE -author = David Brochart -author_email = david.brochart@gmail.com -url = https://github.com/jupyter-server/jupyter_ydoc -platforms = Windows, Linux, Mac OS X -keywords = jupyter ypy - -[bdist_wheel] -universal = 1 - -[options] -include_package_data = True -packages = find: -python_requires = >=3.7 - -install_requires = - setuptools - y-py >=0.5.3,<0.6.0 - -[options.extras_require] -test = - pre-commit - pytest - pytest-asyncio - websockets >=10.0 - ypy-websocket >=0.3.1,<0.4.0 - -[options.entry_points] -jupyter_ydoc = - file = jupyter_ydoc.ydoc:YFile - notebook = jupyter_ydoc.ydoc:YNotebook - -[flake8] -max-line-length = 100 diff --git a/setup.py b/setup.py deleted file mode 100644 index b908cbe..0000000 --- a/setup.py +++ /dev/null @@ -1,3 +0,0 @@ -import setuptools - -setuptools.setup()