Skip to content

Commit 3428a25

Browse files
committed
Improve header layouts and styling.
1 parent 0e716da commit 3428a25

File tree

389 files changed

+43176
-18966
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

389 files changed

+43176
-18966
lines changed

.dockerignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ noxfile.py
5858
# VSCode Workspace Settings
5959
.vscode/
6060

61-
# Work In Progress (WIP)
62-
readmeai/cli/interactive.py
63-
readmeai/config/settings/.conf
61+
# README-AI
62+
.readmeai/
63+
.actrc
64+
.github/workflows/update-badges-local.yml
65+
.github/workflows/update-badges.yml

.gitignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ logs/
4343
# VSCode Workspace Settings
4444
.vscode/
4545

46-
# Work In Progress (WIP)
47-
readmeai/cli/interactive.py
48-
readmeai/config/settings/.conf
46+
# README-AI
47+
.readmeai/
48+
.actrc
49+
.github/workflows/update-badges-local.yml
50+
.github/workflows/update-badges.yml

.pre-commit-config.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# https://pre-commit.com/
2-
31
repos:
42
- repo: https://github.com/pre-commit/pre-commit-hooks
53
rev: v4.4.0
@@ -13,8 +11,8 @@ repos:
1311
- id: trailing-whitespace
1412

1513
- repo: https://github.com/astral-sh/ruff-pre-commit
16-
rev: v0.6.9
14+
rev: v0.8.4
1715
hooks:
18-
- id: ruff
19-
args: [--fix]
2016
- id: ruff-format
17+
- id: ruff
18+
args: [ --fix, --exit-non-zero-on-fix ]

.ruff.toml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,20 @@ exclude = [
1111
".venv",
1212
".vscode",
1313
]
14-
line-length = 79
14+
line-length = 88
1515
indent-width = 4
1616
target-version = "py311"
1717

1818
[lint]
19-
# Allow unused variables when underscore-prefixed.
20-
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
19+
preview = true
2120
extend-select = [
2221
"E305", # 2 blank lines before class or function
23-
"E501",
2422
]
2523
select = [
2624
"ARG", # unused arguments
2725
"B", # flake8-bugbear
2826
"E", # pycodestyle
27+
"E303", # too many blank lines
2928
"E722", # bare except statements
3029
"F", # pyflakes
3130
"F401", # remove unused imports
@@ -34,6 +33,10 @@ select = [
3433
"RUF", # ruff
3534
"SIM", # flake8-simplify
3635
"UP", # pyupgrade
36+
"W", # pycodestyle
37+
"W291", # trailing whitespace
38+
"W293", # blank line contains whitespace
39+
# "F821", # undefined name
3740
]
3841
fixable = ["ALL"]
3942
ignore = [
@@ -43,10 +46,18 @@ ignore = [
4346
]
4447
unfixable = []
4548

49+
[lint.isort]
50+
known-third-party = ["readmeai"]
51+
relative-imports-order = "closest-to-furthest"
52+
53+
# [lint.pydocstyle]
54+
# convention = "numpy"
55+
4656
[format]
4757
docstring-code-format = true
48-
docstring-code-line-length = "dynamic"
58+
docstring-code-line-length = 88
4959
indent-style = "space"
5060
line-ending = "auto"
61+
preview = true
5162
quote-style = "double"
5263
skip-magic-trailing-comma = false

Makefile

Lines changed: 55 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,83 @@
11
SHELL := /bin/bash
2-
SRC_PATH := readmeai
3-
TEST_PATH := tests
2+
TARGET := readmeai
3+
TARGET_TEST := tests
4+
PYPROJECT_TOML := pyproject.toml
5+
6+
# -- Development --------------------------------------------------------------
7+
48

59
.PHONY: clean
6-
clean: ## Remove project build artifacts
7-
./scripts/clean.sh clean_pyc
10+
clean: ## Clean project files
11+
./scripts/clean.sh clean-pyc
12+
13+
14+
# -- Documentation ----------------------------------------------------------------------
15+
16+
17+
.PHONY: docs
18+
docs: ## Build and serve Mkdocs documentation
19+
cd docs && mkdocs build && mkdocs serve
20+
21+
22+
# -- Docker --------------------------------------------------------------------
23+
824

925
.PHONY: docker-build
1026
docker-build: ## Build Docker image for application
1127
docker build -t zeroxeli/readme-ai:latest .
1228

13-
.PHONY: poetry-install
14-
poetry-install: ## Install dependencies using Poetry.
29+
30+
# -- Poetry --------------------------------------------------------------------
31+
32+
33+
.PHONY: install
34+
install: ## Install project dependencies using Poetry
1535
poetry install
1636

17-
.PHONY: poetry-rm-env
18-
poetry-rm-env: ## Removes Poetry virtual environment and lock file.
37+
.PHONY: rm-environment
38+
rm-environment: ## Remove Poetry virtual environment.
1939
poetry env remove --all && rm poetry.lock
2040

21-
.PHONY: poetry-shell
22-
poetry-shell: ## Launch a shell within Poetry virtual environment.
41+
.PHONY: shell
42+
shell: ## Start a shell within the Poetry virtual environment
2343
poetry shell
2444

25-
.PHONY: poetry-to-requirements
26-
poetry-to-requirements: ## Export poetry requirements to requirements.txt
45+
.PHONY: to-requirements
46+
to-requirements: ## Export Poetry dependencies to requirements.txt
2747
poetry export -f requirements.txt --output setup/requirements.txt --without-hashes
2848

29-
.PHONY: ruff-format
30-
ruff-format: ## Format codebase using Ruff
31-
ruff check --select I --fix .
32-
ruff format .
3349

34-
.PHONY: ruff-lint
35-
ruff-lint: ## Lint codebase using Ruff
36-
ruff check . --fix
50+
# -- Code Quality --------------------------------------------------------------
3751

38-
.PHONY: run-mkdocs
39-
run-mkdocs: ## Run the MkDocs server
40-
cd docs && mkdocs serve
4152

42-
.PHONY: search
43-
search: ## Search for a word in the codebase
44-
grep -Ril ${WORD} readmeai tests scripts setup
53+
.PHONY: format
54+
format: ## Format codebase using Ruff
55+
poetry run ruff format $(TARGET)
56+
57+
.PHONY: lint
58+
lint: ## Lint codebase using Ruff
59+
poetry run ruff check $(TARGET) --fix
60+
61+
62+
# -- Testing -------------------------------------------------------------------
63+
4564

4665
.PHONY: test
47-
test: ## Run unit tests using pytest
48-
poetry run pytest
66+
test: ## Run test suite using Pytest
67+
poetry run pytest $(TARGET_TEST) --config-file $(PYPROJECT_TOML)
4968

5069
.PHONY: test-nox
51-
test-nox: ## Run test suite against multiple Python versions
70+
test-nox: ## Run test suite using Nox
5271
nox -f noxfile.py
5372

73+
74+
# -- Utilities ----------------------------------------------------------------
75+
76+
77+
.PHONY: search
78+
search: ## Search for a word across project files
79+
grep -Ril ${WORD} $(TARGET) docs tests
80+
5481
.PHONY: help
5582
help: ## Display this help
5683
@echo ""

0 commit comments

Comments
 (0)