Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Markdown Section Templates #115

Merged
merged 12 commits into from
Aug 21, 2024
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
87 changes: 52 additions & 35 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,53 +1,70 @@
# Git and GitHub metadata
.github/
.git/
.gitignore
CODE_OF_CONDUCT.md
CONTRIBUTING.md
CHANGELOG.md

# Exclude all .pyc files
**/__pycache__

# Build artifacts
build/
dist/
*.tar.gz
*.whl
*.egg-info/

# Test and setup scripts
# Compiled Python files
*.pyc
*.pyo
__pycache__/

# Virtual environment
.venv/
.env

# System-specific files
.DS_Store

# Temporary files
*~

# Logging
logs/
*.log

# Testing
noxfile.py
.nox/
.coverage
.coverage.*
coverage.xml
htmlcov/
tests/
setup/
scripts/

# Jupyter notebooks
# Git
.github/
.git/
.gitignore

# Markdown
CODE_OF_CONDUCT.md
CONTRIBUTING.md
CHANGELOG.md

# Jupyter Notebook
.ipynb_checkpoints/
outputs/
notebooks/

# Package Management
Pipfile
Pipfile.lock
# VSCode workspace settings
.vscode/

# Python Tools
.mypy_cache/
.pytest_cache/
.ruff_cache/

# Documentation and Automation Files
# Documentation
docs/
examples/
mkdocs.yml
Makefile
noxfile.py

# Work In Progress
# Configuration Files (wip)

# Work In Progress (WIP)
examples/images/dalle
readmeai/config/settings/themes
readmeai/config/settings/classifiers.toml
readmeai/config/settings/models.toml
readmeai/config/settings/quickstart_wip.toml
readmeai/config/settings/quickstart.toml

# Github Actions
.github/workflows/ci.yml

# Submodules (wip)
readmeai/templates/
readmeai/ui/

# Dalle-3 Images
examples/images/dalle
readmeai/utils/file_cleaner.py
55 changes: 17 additions & 38 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,36 +1,34 @@
# Build artifacts
build/
dist/
*.egg-info/

# Compiled Python files
*.pyc
*.pyo
__pycache__/
.venv/

# Compiled Cython files
*.so
*.c
# Virtual environment
.venv/
.env

# System-specific files
.DS_Store
Thumbs.db

# Temporary files
*~

# Test coverage results
# Logging
logs/
*.log

# Testing
.nox/
.coverage
.coverage.*
coverage.xml
htmlcov/

# Log files
logs/
*.log

# Build artifacts
build/
dist/
*.egg-info/

# Jupyter Notebook
.ipynb_checkpoints/
outputs/
Expand All @@ -39,33 +37,14 @@ notebooks/
# VSCode workspace settings
.vscode/

# cache
# Python Tools
.mypy_cache/
.pytest_cache/
.ruff_cache/

# Benchmarks
.benchmarks/

# Package Management
Pipfile
Pipfile.lock

# Work In Progress
# Configuration Files (wip)

# Work In Progress (WIP)
examples/images/dalle
readmeai/config/settings/themes
readmeai/config/settings/classifiers.toml
readmeai/config/settings/models.toml
readmeai/config/settings/quickstart_wip.toml
readmeai/config/settings/quickstart.toml
readmeai/utils/file_cleaner.py

# Github Actions
.github/workflows/ci.yml

# Submodules (wip)
readmeai/templates/
readmeai/ui/

# Dalle-3 Images
examples/images/dalle
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Pre-commit hooks - https://pre-commit.com/
# https://pre-commit.com/

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand All @@ -18,8 +18,8 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.11
rev: v0.6.1
hooks:
- id: ruff
args: [ --fix ]
args: [--fix]
- id: ruff-format
45 changes: 45 additions & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
exclude = [
".git",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pyenv",
".pytest_cache",
".ruff_cache",
".env,",
".venv",
".vscode",
"venv",
]
line-length = 79
indent-width = 4
target-version = "py311"

[lint]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
extend-select = ["E501"]
select = [
"ARG", # unused arguments
"B", # flake8-bugbear
"E", # pycodestyle
"E722", # bare except statements
"F", # pyflakes
"F401", # remove unused imports
"I", # isort
"N", # pep8-naming
"RUF", # ruff
"SIM", # flake8-simplify
"UP", # pyupgrade
]
fixable = ["ALL"]
ignore = []
unfixable = []

[format]
docstring-code-format = true
docstring-code-line-length = "dynamic"
indent-style = "space"
line-ending = "auto"
quote-style = "double"
skip-magic-trailing-comma = false
21 changes: 6 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,25 @@
# Use a base image with Python 3.10 installed (multi-platform)
FROM --platform=${BUILDPLATFORM} python:3.10-slim-buster

# Set working directory
WORKDIR /app

# Set environment variable for Git Python
ENV GIT_PYTHON_REFRESH=quiet

# Install system dependencies and clean up apt cache
RUN apt-get update && apt-get install -y git \
RUN apt-get update \
&& apt-get install -y git \
&& rm -rf /var/lib/apt/lists/*

# Create a non-root user with a specific UID and GID (i.e. 1000 in this case)
RUN groupadd -r tempuser -g 1000 && \
useradd -r -u 1000 -g tempuser tempuser && \
mkdir -p /home/tempuser && \
chown -R tempuser:tempuser /home/tempuser
RUN groupadd -r tempuser -g 1000 \
&& useradd -r -u 1000 -g tempuser tempuser \
&& mkdir -p /home/tempuser \
&& chown -R tempuser:tempuser /home/tempuser

# Set permissions for the working directory to the new user
RUN chown tempuser:tempuser /app

# Switch to the new user
USER tempuser

# Add the directory where pip installs user scripts to the PATH
ENV PATH=/home/tempuser/.local/bin:$PATH

# Install the readmeai package from PyPI with a pinned version
RUN pip install --no-cache-dir --user --upgrade readmeai

# Set the command to run the CLI
ENTRYPOINT ["readmeai"]
CMD ["--help"]
Loading
Loading