Skip to content

Commit

Permalink
Migrate to hatch (#36)
Browse files Browse the repository at this point in the history
* Migrate to `hatch`

* Move flake8 config to pyproject
  • Loading branch information
jtpio authored Oct 21, 2022
1 parent 4b9d51b commit 357d2a6
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 48 deletions.
13 changes: 5 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,11 @@ repos:
exclude: docs/source/other/full-config.rst
stages: [manual]

- repo: https://github.com/pycqa/flake8
rev: 4.0.1
- repo: https://github.com/john-hen/Flake8-pyproject
rev: 1.1.0.post0
hooks:
- id: flake8
- id: Flake8-pyproject
alias: flake8
additional_dependencies:
[
"flake8-bugbear==20.1.4",
"flake8-logging-format==0.6.0",
"flake8-implicit-str-concat==0.2.0",
]
["flake8-bugbear==22.6.22", "flake8-implicit-str-concat==0.2.0"]
stages: [manual]
55 changes: 55 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "ypy-websocket"
dynamic = ["version"]
description = "WebSocket connector for Ypy"
readme = "README.md"
license = "MIT"
requires-python = ">=3.7"
authors = [
{ name = "David Brochart", email = "david.brochart@gmail.com" },
]
keywords = [
"websocket",
"yjs",
]
dependencies = [
"aiofiles >=0.8.0,<1",
"aiosqlite >=0.17.0,<1",
"y-py >=0.5.3,<0.6.0",
]

[project.optional-dependencies]
test = [
"mypy",
"pre-commit",
"pytest",
"pytest-asyncio",
"websockets >=10.0",
]

[project.urls]
Homepage = "https://github.com/y-crdt/ypy-websocket"

[tool.hatch.version]
path = "ypy_websocket/__init__.py"

[tool.hatch.build.targets.sdist]
include = [
"/ypy_websocket",
]

[tool.flake8]
ignore = "E501, W503, E402"
exclude = [
".github",
]
enable-extensions = "G"
extend-ignore = [
"G001", "G002", "G004", "G200", "G201", "G202",
# black adds spaces around ':'
"E203",
]
37 changes: 0 additions & 37 deletions setup.cfg

This file was deleted.

3 changes: 0 additions & 3 deletions setup.py

This file was deleted.

0 comments on commit 357d2a6

Please sign in to comment.