refactor: split the repo into self-contained validator, directory, quickstart, spec and site folders
validator/ holds mewslint (lint, css, fetch, DTD/CSS data); directory/ holds
the mews.page service (app, db, check, pages, cli) and depends on validator/;
quickstart/ holds mews-quickstart and md2mews.py for third parties who want
to create Mews content without cloning the repo; spec/ consolidates doc/ and
dtd/ with the canonical mews-0.1.css; site/ becomes a Pelican project with
the forward-facing pages as Markdown, the check form kept as a raw HTML
snippet. Root pyproject.toml is now a virtual uv workspace over validator,
directory and quickstart, with cross-cutting tests that span more than one
of them staying at the repo root. Makefile and flake.nix updated to match.
2026-10-13 12:29:23 +03:00
|
|
|
[tool.uv.workspace]
|
|
|
|
|
members = ["validator", "directory", "quickstart"]
|
2026-10-11 15:05:38 +03:00
|
|
|
|
refactor: split the repo into self-contained validator, directory, quickstart, spec and site folders
validator/ holds mewslint (lint, css, fetch, DTD/CSS data); directory/ holds
the mews.page service (app, db, check, pages, cli) and depends on validator/;
quickstart/ holds mews-quickstart and md2mews.py for third parties who want
to create Mews content without cloning the repo; spec/ consolidates doc/ and
dtd/ with the canonical mews-0.1.css; site/ becomes a Pelican project with
the forward-facing pages as Markdown, the check form kept as a raw HTML
snippet. Root pyproject.toml is now a virtual uv workspace over validator,
directory and quickstart, with cross-cutting tests that span more than one
of them staying at the repo root. Makefile and flake.nix updated to match.
2026-10-13 12:29:23 +03:00
|
|
|
[tool.uv.sources]
|
|
|
|
|
mews = { workspace = true }
|
|
|
|
|
mews-directory = { workspace = true }
|
|
|
|
|
mews-quickstart = { workspace = true }
|
2026-10-11 15:05:38 +03:00
|
|
|
|
|
|
|
|
[dependency-groups]
|
|
|
|
|
dev = [
|
|
|
|
|
"pytest>=8.0",
|
|
|
|
|
"ruff>=0.15",
|
refactor: split the repo into self-contained validator, directory, quickstart, spec and site folders
validator/ holds mewslint (lint, css, fetch, DTD/CSS data); directory/ holds
the mews.page service (app, db, check, pages, cli) and depends on validator/;
quickstart/ holds mews-quickstart and md2mews.py for third parties who want
to create Mews content without cloning the repo; spec/ consolidates doc/ and
dtd/ with the canonical mews-0.1.css; site/ becomes a Pelican project with
the forward-facing pages as Markdown, the check form kept as a raw HTML
snippet. Root pyproject.toml is now a virtual uv workspace over validator,
directory and quickstart, with cross-cutting tests that span more than one
of them staying at the repo root. Makefile and flake.nix updated to match.
2026-10-13 12:29:23 +03:00
|
|
|
"mews",
|
|
|
|
|
"mews-directory",
|
|
|
|
|
"mews-quickstart",
|
|
|
|
|
# quickstart/md2mews.py declares this in its own script header; tests
|
|
|
|
|
# import the script to check its page emitter still matches directory.pages.
|
2026-10-11 15:05:38 +03:00
|
|
|
"mistune>=3.0",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
[tool.ruff]
|
|
|
|
|
line-length = 88
|
|
|
|
|
# Both predate this configuration and run standalone from their own dependency
|
|
|
|
|
# headers, so they are left as they are rather than reformatted.
|
refactor: split the repo into self-contained validator, directory, quickstart, spec and site folders
validator/ holds mewslint (lint, css, fetch, DTD/CSS data); directory/ holds
the mews.page service (app, db, check, pages, cli) and depends on validator/;
quickstart/ holds mews-quickstart and md2mews.py for third parties who want
to create Mews content without cloning the repo; spec/ consolidates doc/ and
dtd/ with the canonical mews-0.1.css; site/ becomes a Pelican project with
the forward-facing pages as Markdown, the check form kept as a raw HTML
snippet. Root pyproject.toml is now a virtual uv workspace over validator,
directory and quickstart, with cross-cutting tests that span more than one
of them staying at the repo root. Makefile and flake.nix updated to match.
2026-10-13 12:29:23 +03:00
|
|
|
extend-exclude = ["quickstart/md2mews.py", "spec/check_dtd.py"]
|
2026-10-11 15:05:38 +03:00
|
|
|
|
|
|
|
|
[tool.ruff.lint]
|
|
|
|
|
select = [
|
|
|
|
|
"B", # flake8-bugbear
|
|
|
|
|
"BLE", # flake8-blind-except
|
|
|
|
|
"C4", # flake8-comprehensions
|
|
|
|
|
"D", # pydocstyle
|
|
|
|
|
"E", # pycodestyle
|
|
|
|
|
"F", # pyflakes
|
|
|
|
|
"I", # isort
|
|
|
|
|
"ICN", # flake8-import-conventions
|
|
|
|
|
"ISC", # flake8-implicit-str-concat
|
|
|
|
|
"PGH", # pygrep-hooks
|
|
|
|
|
"PL", # pylint
|
|
|
|
|
"RET", # flake8-return
|
|
|
|
|
"RUF", # ruff-specific rules
|
|
|
|
|
"SIM", # flake8-simplify
|
|
|
|
|
"T10", # flake8-debugger
|
|
|
|
|
"T20", # flake8-print
|
|
|
|
|
"TID", # flake8-tidy-imports
|
|
|
|
|
"TRY", # tryceratops
|
|
|
|
|
"UP", # pyupgrade
|
|
|
|
|
"W", # pycodestyle
|
|
|
|
|
"YTT", # flake8-2020
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
ignore = [
|
|
|
|
|
"D100", # missing docstring in public module
|
|
|
|
|
"D104", # missing docstring in public package
|
|
|
|
|
"D203", # blank line before class docstring
|
|
|
|
|
"D213", # multi-line docstring summary should start at the second line
|
|
|
|
|
"ISC001", # disabled so `ruff format` works without warning
|
|
|
|
|
"D105", # missing docstring in magic method
|
|
|
|
|
"D107", # missing docstring in __init__
|
|
|
|
|
"PLR0911", # too many return statements
|
|
|
|
|
"PLR0912", # too many branches
|
|
|
|
|
"PLR0913", # too many arguments
|
|
|
|
|
"PLR0915", # too many statements
|
|
|
|
|
"TRY003", # exception messages are the text shown to the author
|
|
|
|
|
"PLR0917", # too many positional arguments: page() mirrors md2mews.page()
|
|
|
|
|
# The messages authors read are wrapped across lines inside two-element
|
|
|
|
|
# tuples, where a missing comma would raise rather than merge two items.
|
|
|
|
|
"ISC004",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
[tool.ruff.lint.isort]
|
|
|
|
|
combine-as-imports = true
|
|
|
|
|
force-sort-within-sections = true
|
refactor: split the repo into self-contained validator, directory, quickstart, spec and site folders
validator/ holds mewslint (lint, css, fetch, DTD/CSS data); directory/ holds
the mews.page service (app, db, check, pages, cli) and depends on validator/;
quickstart/ holds mews-quickstart and md2mews.py for third parties who want
to create Mews content without cloning the repo; spec/ consolidates doc/ and
dtd/ with the canonical mews-0.1.css; site/ becomes a Pelican project with
the forward-facing pages as Markdown, the check form kept as a raw HTML
snippet. Root pyproject.toml is now a virtual uv workspace over validator,
directory and quickstart, with cross-cutting tests that span more than one
of them staying at the repo root. Makefile and flake.nix updated to match.
2026-10-13 12:29:23 +03:00
|
|
|
known-first-party = ["mews", "directory", "quickstart"]
|
2026-10-11 15:05:38 +03:00
|
|
|
|
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
|
|
|
"tests/*" = [
|
|
|
|
|
"D103", # a test name says what it tests
|
|
|
|
|
"PLC0415", # imports inside a test keep it self-contained
|
|
|
|
|
"PLE2502", # fixtures deliberately carry bidi overrides
|
|
|
|
|
"PLR2004", # expected values belong in the assertion
|
|
|
|
|
"D401", # a fixture docstring names what the fixture is
|
|
|
|
|
]
|
refactor: split the repo into self-contained validator, directory, quickstart, spec and site folders
validator/ holds mewslint (lint, css, fetch, DTD/CSS data); directory/ holds
the mews.page service (app, db, check, pages, cli) and depends on validator/;
quickstart/ holds mews-quickstart and md2mews.py for third parties who want
to create Mews content without cloning the repo; spec/ consolidates doc/ and
dtd/ with the canonical mews-0.1.css; site/ becomes a Pelican project with
the forward-facing pages as Markdown, the check form kept as a raw HTML
snippet. Root pyproject.toml is now a virtual uv workspace over validator,
directory and quickstart, with cross-cutting tests that span more than one
of them staying at the repo root. Makefile and flake.nix updated to match.
2026-10-13 12:29:23 +03:00
|
|
|
"*/tests/*" = [
|
|
|
|
|
"D103",
|
|
|
|
|
"PLC0415",
|
|
|
|
|
"PLE2502",
|
|
|
|
|
"PLR2004",
|
|
|
|
|
"D401",
|
|
|
|
|
]
|
2026-10-11 15:05:38 +03:00
|
|
|
# These print their results: they are the command line interface.
|
refactor: split the repo into self-contained validator, directory, quickstart, spec and site folders
validator/ holds mewslint (lint, css, fetch, DTD/CSS data); directory/ holds
the mews.page service (app, db, check, pages, cli) and depends on validator/;
quickstart/ holds mews-quickstart and md2mews.py for third parties who want
to create Mews content without cloning the repo; spec/ consolidates doc/ and
dtd/ with the canonical mews-0.1.css; site/ becomes a Pelican project with
the forward-facing pages as Markdown, the check form kept as a raw HTML
snippet. Root pyproject.toml is now a virtual uv workspace over validator,
directory and quickstart, with cross-cutting tests that span more than one
of them staying at the repo root. Makefile and flake.nix updated to match.
2026-10-13 12:29:23 +03:00
|
|
|
"directory/directory/cli.py" = ["T201"]
|
|
|
|
|
"validator/mews/lint.py" = ["T201"]
|
2026-10-11 20:55:27 +03:00
|
|
|
# Also a command line tool, and it holds templates for files it writes, whose
|
|
|
|
|
# line lengths are the generated file's business rather than this module's.
|
refactor: split the repo into self-contained validator, directory, quickstart, spec and site folders
validator/ holds mewslint (lint, css, fetch, DTD/CSS data); directory/ holds
the mews.page service (app, db, check, pages, cli) and depends on validator/;
quickstart/ holds mews-quickstart and md2mews.py for third parties who want
to create Mews content without cloning the repo; spec/ consolidates doc/ and
dtd/ with the canonical mews-0.1.css; site/ becomes a Pelican project with
the forward-facing pages as Markdown, the check form kept as a raw HTML
snippet. Root pyproject.toml is now a virtual uv workspace over validator,
directory and quickstart, with cross-cutting tests that span more than one
of them staying at the repo root. Makefile and flake.nix updated to match.
2026-10-13 12:29:23 +03:00
|
|
|
"quickstart/quickstart/__init__.py" = ["T201", "E501"]
|
2026-10-11 15:05:38 +03:00
|
|
|
|
|
|
|
|
[tool.pytest.ini_options]
|
|
|
|
|
testpaths = ["tests"]
|
2026-10-11 20:55:27 +03:00
|
|
|
# The scaffold build downloads Pelican and takes a minute. Run it with
|
|
|
|
|
# `pytest -m slow`, or everything with `--runslow`.
|
|
|
|
|
addopts = "-m 'not slow'"
|
|
|
|
|
markers = ["slow: needs the network and about a minute"]
|