Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install uv
uses: astral-sh/setup-uv@v7
- run: make lint
- run: make test
29 changes: 15 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ run:
.PHONY: api-generate-openapi
api-generate-openapi: venv
bash -c '\
source venv/bin/activate \
source .venv/bin/activate \
&& ./scripts/api-generate-openapi \
'

.PHONY: api-generate-pages
api-generate-pages: venv
bash -c '\
source venv/bin/activate \
source .venv/bin/activate \
&& ./scripts/api-generate-pages \
'

.PHONY: api-generate-all
api-generate-all: venv
bash -c '\
source venv/bin/activate \
source .venv/bin/activate \
&& ./scripts/api-generate-openapi \
&& ./scripts/api-generate-pages \
'
Expand All @@ -30,7 +30,7 @@ broken-links:

.PHONY: lintlify
lintlify: venv
venv/bin/python -m lintlify.main
.venv/bin/python -m lintlify.main

.PHONY: lint
lint: broken-links mypy lintlify format-check
Expand All @@ -40,26 +40,27 @@ ci: broken-links mypy lintlify format-check test

.PHONY: format
format: venv
venv/bin/ruff check --fix
venv/bin/ruff format
uv run ruff check --fix
uv run ruff format

.PHONY: format-check
format-check: venv
venv/bin/ruff format --check
uv run ruff format --check

.PHONY: mypy
mypy: venv
venv/bin/mypy --strict scripts/*.py
venv/bin/mypy --strict --ignore-missing-imports -p lintlify
uv run mypy --strict scripts/*.py
uv run mypy --strict --ignore-missing-imports -p lintlify

venv: requirements.txt
rm -rf venv
python3 -m venv venv
venv/bin/pip install -r requirements.txt
.PHONY: venv
venv: .venv

.venv: uv.lock pyproject.toml
uv sync

.PHONY: test
test: venv
PYTHONPATH=. venv/bin/pytest lintlify -vv
uv run pytest src -vv

.PHONY: clean
clean:
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ This repository contains the source of https://api.docs.flare.io.

## Dependencies

**Interpreters**
**General**

- Python: This repository contains a `.python-version` file for [pyenv](https://github.com/pyenv/pyenv). Use it with `pyenv local`.
- Node: This repository contains a `.nvmrc` file for [nvm](https://github.com/nvm-sh/nvm). Use it with `nvm use`.
- `python`: This repository contains a `.python-version` file for [pyenv](https://github.com/pyenv/pyenv). Use it with `pyenv local`.
- `node`: This repository contains a `.nvmrc` file for [nvm](https://github.com/nvm-sh/nvm). Use it with `nvm use`.
- `uv`: https://docs.astral.sh/uv/

**Packages**
**openapi-generator**

You will need `openapi-generator` in order to generate the OpenAPI files.

Expand Down
23 changes: 22 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
[project]
name = "lintlify"
version = "0.1.0"
authors = [
{ name = "Alexandre Viau", email="alexandre.viau@flare.io>" }
]
requires-python = ">=3.10"
dependencies = [
"pydantic==2.12.3",
"mypy==1.18.2",
"ruff==0.14.3",
"python-frontmatter==1.1.0",
"requests==2.32.5",
"pytest==8.4.2",
"types-requests==2.32.4.20250913",
"flareio>=1.2.0",
]

[build-system]
requires = ["uv_build>=0.9.28,<0.10.0"]
build-backend = "uv_build"

[tool.ruff.lint]
extend-select = [
"I",
Expand All @@ -9,7 +31,6 @@ extend-select = [
"C419",
]


[tool.ruff.lint.isort]
force-single-line = true
no-sections = true
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions lintlify/context.py → src/lintlify/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class LintContext:
def mypy_path(self) -> str:
return os.path.join(
self.repository_root,
"venv",
".venv",
"bin",
"mypy",
)
Expand All @@ -23,7 +23,7 @@ def mypy_path(self) -> str:
def ruff_path(self) -> str:
return os.path.join(
self.repository_root,
"venv",
".venv",
"bin",
"ruff",
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions lintlify/main.py → src/lintlify/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def get_repo_dir() -> str:
os.path.join(
os.path.dirname(__file__),
"..",
"..",
)
)

Expand Down
File renamed without changes.
File renamed without changes.
Empty file added src/lintlify/py.typed
Empty file.
638 changes: 638 additions & 0 deletions uv.lock

Large diffs are not rendered by default.