Skip to content

Commit

Permalink
Improve header layouts and styling.
Browse files Browse the repository at this point in the history
  • Loading branch information
eli64s committed Jan 2, 2025
1 parent 0e716da commit 3428a25
Show file tree
Hide file tree
Showing 389 changed files with 43,176 additions and 18,966 deletions.
8 changes: 5 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ noxfile.py
# VSCode Workspace Settings
.vscode/

# Work In Progress (WIP)
readmeai/cli/interactive.py
readmeai/config/settings/.conf
# README-AI
.readmeai/
.actrc
.github/workflows/update-badges-local.yml
.github/workflows/update-badges.yml
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ logs/
# VSCode Workspace Settings
.vscode/

# Work In Progress (WIP)
readmeai/cli/interactive.py
readmeai/config/settings/.conf
# README-AI
.readmeai/
.actrc
.github/workflows/update-badges-local.yml
.github/workflows/update-badges.yml
8 changes: 3 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# https://pre-commit.com/

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
Expand All @@ -13,8 +11,8 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
rev: v0.8.4
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- id: ruff
args: [ --fix, --exit-non-zero-on-fix ]
21 changes: 16 additions & 5 deletions .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,20 @@ exclude = [
".venv",
".vscode",
]
line-length = 79
line-length = 88
indent-width = 4
target-version = "py311"

[lint]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
preview = true
extend-select = [
"E305", # 2 blank lines before class or function
"E501",
]
select = [
"ARG", # unused arguments
"B", # flake8-bugbear
"E", # pycodestyle
"E303", # too many blank lines
"E722", # bare except statements
"F", # pyflakes
"F401", # remove unused imports
Expand All @@ -34,6 +33,10 @@ select = [
"RUF", # ruff
"SIM", # flake8-simplify
"UP", # pyupgrade
"W", # pycodestyle
"W291", # trailing whitespace
"W293", # blank line contains whitespace
# "F821", # undefined name
]
fixable = ["ALL"]
ignore = [
Expand All @@ -43,10 +46,18 @@ ignore = [
]
unfixable = []

[lint.isort]
known-third-party = ["readmeai"]
relative-imports-order = "closest-to-furthest"

# [lint.pydocstyle]
# convention = "numpy"

[format]
docstring-code-format = true
docstring-code-line-length = "dynamic"
docstring-code-line-length = 88
indent-style = "space"
line-ending = "auto"
preview = true
quote-style = "double"
skip-magic-trailing-comma = false
83 changes: 55 additions & 28 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,56 +1,83 @@
SHELL := /bin/bash
SRC_PATH := readmeai
TEST_PATH := tests
TARGET := readmeai
TARGET_TEST := tests
PYPROJECT_TOML := pyproject.toml

# -- Development --------------------------------------------------------------


.PHONY: clean
clean: ## Remove project build artifacts
./scripts/clean.sh clean_pyc
clean: ## Clean project files
./scripts/clean.sh clean-pyc


# -- Documentation ----------------------------------------------------------------------


.PHONY: docs
docs: ## Build and serve Mkdocs documentation
cd docs && mkdocs build && mkdocs serve


# -- Docker --------------------------------------------------------------------


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

.PHONY: poetry-install
poetry-install: ## Install dependencies using Poetry.

# -- Poetry --------------------------------------------------------------------


.PHONY: install
install: ## Install project dependencies using Poetry
poetry install

.PHONY: poetry-rm-env
poetry-rm-env: ## Removes Poetry virtual environment and lock file.
.PHONY: rm-environment
rm-environment: ## Remove Poetry virtual environment.
poetry env remove --all && rm poetry.lock

.PHONY: poetry-shell
poetry-shell: ## Launch a shell within Poetry virtual environment.
.PHONY: shell
shell: ## Start a shell within the Poetry virtual environment
poetry shell

.PHONY: poetry-to-requirements
poetry-to-requirements: ## Export poetry requirements to requirements.txt
.PHONY: to-requirements
to-requirements: ## Export Poetry dependencies to requirements.txt
poetry export -f requirements.txt --output setup/requirements.txt --without-hashes

.PHONY: ruff-format
ruff-format: ## Format codebase using Ruff
ruff check --select I --fix .
ruff format .

.PHONY: ruff-lint
ruff-lint: ## Lint codebase using Ruff
ruff check . --fix
# -- Code Quality --------------------------------------------------------------

.PHONY: run-mkdocs
run-mkdocs: ## Run the MkDocs server
cd docs && mkdocs serve

.PHONY: search
search: ## Search for a word in the codebase
grep -Ril ${WORD} readmeai tests scripts setup
.PHONY: format
format: ## Format codebase using Ruff
poetry run ruff format $(TARGET)

.PHONY: lint
lint: ## Lint codebase using Ruff
poetry run ruff check $(TARGET) --fix


# -- Testing -------------------------------------------------------------------


.PHONY: test
test: ## Run unit tests using pytest
poetry run pytest
test: ## Run test suite using Pytest
poetry run pytest $(TARGET_TEST) --config-file $(PYPROJECT_TOML)

.PHONY: test-nox
test-nox: ## Run test suite against multiple Python versions
test-nox: ## Run test suite using Nox
nox -f noxfile.py


# -- Utilities ----------------------------------------------------------------


.PHONY: search
search: ## Search for a word across project files
grep -Ril ${WORD} $(TARGET) docs tests

.PHONY: help
help: ## Display this help
@echo ""
Expand Down
Loading

0 comments on commit 3428a25

Please sign in to comment.