chore: create project
This commit is contained in:
commit
cb674a9642
|
|
@ -0,0 +1,2 @@
|
|||
**/__pycache__
|
||||
jean_website.egg-info
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
default_stages: [commit, merge-commit, push, manual]
|
||||
default_install_hook_types: [commit-msg, pre-commit]
|
||||
repos:
|
||||
- repo: https://github.com/compilerla/conventional-pre-commit
|
||||
rev: v2.3.0
|
||||
hooks:
|
||||
- id: conventional-pre-commit
|
||||
stages: [commit-msg]
|
||||
args: []
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.3.3
|
||||
hooks:
|
||||
- id: ruff
|
||||
args: [ --fix ]
|
||||
- id: ruff-format
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
from click import command
|
||||
|
||||
|
||||
@command
|
||||
def main() -> None:
|
||||
print("Hello world")
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
"""Nox configuration file."""
|
||||
|
||||
from nox import Session, session
|
||||
|
||||
|
||||
@session()
|
||||
def lint(session: Session) -> None:
|
||||
session.install("ruff")
|
||||
session.run("ruff", "check", "--fix")
|
||||
session.run("ruff", "format")
|
||||
|
||||
|
||||
@session()
|
||||
def mypy(session: Session) -> None:
|
||||
session.install("-e", ".[dev]")
|
||||
session.install("mypy")
|
||||
session.run("mypy")
|
||||
|
||||
|
||||
@session()
|
||||
def devenv(session: Session) -> None:
|
||||
session.install("-e", ".[dev]")
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
[project]
|
||||
name = "jean-website"
|
||||
version = "0.0.1"
|
||||
authors = [
|
||||
{name = "Jean-Website", email ="team@collectivit.org"}
|
||||
]
|
||||
|
||||
description = "Static site generator"
|
||||
license = {text = "WTFPL"}
|
||||
|
||||
readme = "README.md"
|
||||
|
||||
dependencies = [
|
||||
"click",
|
||||
"jinja2",
|
||||
"pymarkdown",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = [
|
||||
"nox",
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
jwebsite = "jwebsite.cli:main"
|
||||
|
||||
[build-system]
|
||||
requires = ["setuptools>=45"]
|
||||
|
||||
[tool.mypy]
|
||||
strict = true
|
||||
files = "jwebsite/**/*.py,noxfile.py"
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 110
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = [
|
||||
"E",
|
||||
"F",
|
||||
"W",
|
||||
"UP",
|
||||
"B",
|
||||
"SIM",
|
||||
"I",
|
||||
"N",
|
||||
"U",
|
||||
"YTT",
|
||||
"ASYNC",
|
||||
"RUF"
|
||||
]
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
asyncio_mode = "auto"
|
||||
Loading…
Reference in New Issue