Skip to content

Commit aaeb55c

Browse files
authored
feat: Header layouts and styling improvements (#127)
* Update project config settings. * Update doc site pages. * Improve header layouts and styling. * Mock env vars. * Add mock env vars.
1 parent 0ae4a8f commit aaeb55c

File tree

398 files changed

+43477
-18901
lines changed

Some content is hidden

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

398 files changed

+43477
-18901
lines changed

.dockerignore

Lines changed: 42 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,65 @@
1-
# Build artifacts
1+
# Build Artifacts
22
build/
33
dist/
44
*.egg-info/
55

6-
# Compiled Python files
6+
# Compiled Python Files
77
*.pyc
88
*.pyo
99
__pycache__/
1010

11-
# Virtual environment
12-
.venv/
13-
.env
14-
15-
# System-specific files
16-
.DS_Store
17-
18-
# Temporary files
19-
*~
20-
21-
# Logging
22-
logs/
23-
*.log
24-
25-
# Testing
26-
noxfile.py
27-
.nox/
28-
.coverage
29-
.coverage.*
30-
coverage.xml
31-
htmlcov/
32-
tests/
33-
setup/
34-
scripts/
11+
# Documentation and Markdown
12+
CHANGELOG.md
13+
CODE_OF_CONDUCT.md
14+
CONTRIBUTING.md
15+
docs/
16+
examples/
17+
mkdocs.yml
18+
site
3519

3620
# Git
37-
.github/
3821
.git/
22+
.github/
3923
.gitignore
4024

41-
# Markdown
42-
CODE_OF_CONDUCT.md
43-
CONTRIBUTING.md
44-
CHANGELOG.md
45-
4625
# Jupyter Notebook
4726
.ipynb_checkpoints/
48-
outputs/
4927
notebooks/
28+
outputs/
5029

51-
# VSCode workspace settings
52-
.vscode/
30+
# Logging
31+
logs/
32+
*.log
5333

54-
# Python Tools
34+
# Python Tools and Caches
5535
.mypy_cache/
5636
.pytest_cache/
5737
.ruff_cache/
5838

59-
# Mkdocs
60-
.cache
61-
docs/
62-
examples/
63-
mkdocs.yml
64-
site
39+
# System-Specific Files
40+
.DS_Store
41+
42+
# Temporary Files
43+
*~
44+
45+
# Testing
46+
*coverage*
47+
.nox/
48+
.reports/
49+
scripts/
50+
setup/
51+
tests/
52+
noxfile.py
53+
54+
# Virtual Environment
55+
.env
56+
.venv/
57+
58+
# VSCode Workspace Settings
59+
.vscode/
6560

66-
# Work In Progress (WIP)
67-
readmeai/cli/commands_line.py
68-
readmeai/cli/interactive.py
69-
readmeai/config/settings/prompts
70-
readmeai/config/settings/templates
61+
# README-AI
62+
.readmeai/
63+
.actrc
64+
.github/workflows/update-badges-local.yml
65+
.github/workflows/update-badges.yml

.gitignore

Lines changed: 31 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,50 @@
1-
# Build artifacts
1+
# Build Artifacts
2+
*.egg-info/
23
build/
34
dist/
4-
*.egg-info/
55

6-
# Compiled Python files
6+
# Compiled Python Files
77
*.pyc
88
*.pyo
99
__pycache__/
1010

11-
# Virtual environment
12-
.venv/
13-
.env
14-
15-
# System-specific files
16-
.DS_Store
17-
18-
# Temporary files
19-
*~
20-
21-
# Logging
22-
logs/
23-
*.log
24-
25-
# Testing
26-
.nox/
27-
.coverage
28-
.coverage.*
29-
coverage.xml
30-
htmlcov/
11+
# Documentation and MkDocs
12+
.cache
13+
site
3114

3215
# Jupyter Notebook
3316
.ipynb_checkpoints/
34-
outputs/
3517
notebooks/
3618

37-
# VSCode workspace settings
38-
.vscode/
19+
# Logging
20+
*.log
21+
logs/
3922

4023
# Python Tools
4124
.mypy_cache/
4225
.pytest_cache/
4326
.ruff_cache/
4427

45-
# Mkdocs
46-
.cache
47-
site
28+
# System-Specific Files
29+
.DS_Store
30+
31+
# Temporary Files
32+
*~
33+
34+
# Testing
35+
.nox/
36+
.reports/
37+
*coverage*
38+
39+
# Virtual Environment
40+
.env
41+
.venv/
42+
43+
# VSCode Workspace Settings
44+
.vscode/
4845

49-
# Work In Progress (WIP)
50-
readmeai/cli/commands_line.py
51-
readmeai/cli/interactive.py
52-
readmeai/config/settings/prompts
53-
readmeai/config/settings/templates
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 ]

.ruff.toml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,20 @@ exclude = [
1111
".venv",
1212
".vscode",
1313
]
14-
line-length = 79
14+
line-length = 88
1515
indent-width = 4
16-
target-version = "py310"
16+
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]+?))$"
21-
extend-select = ["E501"]
19+
preview = true
20+
extend-select = [
21+
"E305", # 2 blank lines before class or function
22+
]
2223
select = [
2324
"ARG", # unused arguments
2425
"B", # flake8-bugbear
2526
"E", # pycodestyle
27+
"E303", # too many blank lines
2628
"E722", # bare except statements
2729
"F", # pyflakes
2830
"F401", # remove unused imports
@@ -31,6 +33,10 @@ select = [
3133
"RUF", # ruff
3234
"SIM", # flake8-simplify
3335
"UP", # pyupgrade
36+
"W", # pycodestyle
37+
"W291", # trailing whitespace
38+
"W293", # blank line contains whitespace
39+
# "F821", # undefined name
3440
]
3541
fixable = ["ALL"]
3642
ignore = [
@@ -40,10 +46,18 @@ ignore = [
4046
]
4147
unfixable = []
4248

49+
[lint.isort]
50+
known-third-party = ["readmeai"]
51+
relative-imports-order = "closest-to-furthest"
52+
53+
# [lint.pydocstyle]
54+
# convention = "numpy"
55+
4356
[format]
4457
docstring-code-format = true
45-
docstring-code-line-length = "dynamic"
58+
docstring-code-line-length = 88
4659
indent-style = "space"
4760
line-ending = "auto"
61+
preview = true
4862
quote-style = "double"
4963
skip-magic-trailing-comma = false

Makefile

Lines changed: 62 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,89 @@
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
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 --------------------------------------------------------------------
823

9-
.PHONY: conda-recipe
10-
conda-recipe: ## Create conda recipe for conda-forge
11-
grayskull pypi readmeai
12-
conda build .
1324

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

18-
.PHONY: poetry-install
19-
poetry-install: ## Install dependencies using Poetry.
29+
30+
# -- Poetry --------------------------------------------------------------------
31+
32+
33+
.PHONY: install
34+
install: ## Install project dependencies using Poetry
2035
poetry install
2136

22-
.PHONY: poetry-remove-environment
23-
poetry-remove-environment: ## Removes Poetry virtual environment and lock file.
37+
.PHONY: rm-environment
38+
rm-environment: ## Remove Poetry virtual environment.
2439
poetry env remove --all && rm poetry.lock
2540

26-
.PHONY: poetry-shell
27-
poetry-shell: ## Launch a shell within Poetry virtual environment.
41+
.PHONY: shell
42+
shell: ## Start a shell within the Poetry virtual environment
2843
poetry shell
2944

30-
.PHONY: poetry-to-requirements
31-
poetry-to-requirements: ## Export poetry requirements to requirements.txt
45+
.PHONY: to-requirements
46+
to-requirements: ## Export Poetry dependencies to requirements.txt
3247
poetry export -f requirements.txt --output setup/requirements.txt --without-hashes
3348

34-
.PHONY: ruff-format
35-
ruff-format: ## Format codebase using Ruff
36-
ruff check --select I --fix .
37-
ruff format .
3849

39-
.PHONY: ruff-lint
40-
ruff-lint: ## Lint codebase using Ruff
41-
ruff check . --fix
50+
# -- Code Quality --------------------------------------------------------------
4251

43-
.PHONY: run-mkdocs
44-
run-mkdocs: ## Run the MkDocs server
45-
cd docs && mkdocs serve
4652

47-
.PHONY: search
48-
search: ## Search for a word in the codebase
49-
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+
5064

5165
.PHONY: test
52-
test: ## Run unit tests using pytest
53-
poetry run pytest
66+
test: ## Run test suite using Pytest
67+
poetry run pytest $(TARGET_TEST) --config-file $(PYPROJECT_TOML)
5468

5569
.PHONY: test-nox
56-
test-nox: ## Run test suite against multiple Python versions
70+
test-nox: ## Run test suite using Nox
5771
nox -f noxfile.py
5872

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+
5981
.PHONY: help
60-
help: Makefile ## Display the help menu
61-
@echo -e ""
62-
@echo -e "Usage: make [target]"
63-
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
64-
@echo -e "__________________________________________________________________________________________\n"
82+
help: ## Display this help
83+
@echo ""
84+
@echo "Usage: make [target]"
85+
@echo ""
86+
@awk 'BEGIN {FS = ":.*?## "; printf "\033[1m%-20s %-50s\033[0m\n", "Target", "Description"; \
87+
printf "%-20s %-50s\n", "------", "-----------";} \
88+
/^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-20s\033[0m %-50s\n", $$1, $$2}' $(MAKEFILE_LIST)
89+
@echo ""

0 commit comments

Comments
 (0)