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

Docs/setup mkdocs like llm documentation #36

Closed
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
79 changes: 50 additions & 29 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: CI/CD

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

jobs:
test:
Expand All @@ -16,47 +16,68 @@ jobs:
python-version: ["3.10", "3.11"]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Install uv
uses: astral-sh/setup-uv@v5

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install the project
run: uv sync --all-extras --dev
- name: Install the project
run: uv sync --all-extras --dev

# - name: Run tests
# # For example, using `pytest`
# run: uv run pytest tests
# - name: Run tests
# # For example, using `pytest`
# run: uv run pytest tests

# Format code
# Format code

- name: Run type checker
run: uvx mypy py_launch_blueprint/
- name: Run type checker
run: uvx mypy py_launch_blueprint/

- name: Check linters
run: uvx ruff check py_launch_blueprint/
- name: Check linters
run: uvx ruff check py_launch_blueprint/

# - name: Run tests with coverage
# run: |
# pytest --cov=./ --cov-report=xml
# - name: Run tests with coverage
# run: |
# pytest --cov=./ --cov-report=xml

# - name: Upload coverage
# uses: codecov/codecov-action@v4
# - name: Upload coverage
# uses: codecov/codecov-action@v4

security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Run Safety CLI to check for vulnerabilities
uses: pyupio/safety-action@v1
with:
api-key: ${{ secrets.SAFETY_API_KEY }}
args: --detailed-output # To always see detailed output from this action
- name: Run Safety CLI to check for vulnerabilities
uses: pyupio/safety-action@v1
with:
api-key: ${{ secrets.SAFETY_API_KEY }}
args: --detailed-output

docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v5

- uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install dependencies
run: |
uv pip install mkdocs-material
uv pip install mkdocstrings[python]

- name: Build and deploy documentation
run: mkdocs gh-deploy --force
working-directory: ./template_docs

# publish:
# needs: [test, security]
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repos:
"types-click>=1.1.0",
]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
rev: v5.0.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
Expand Down
20 changes: 20 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"cSpell.words": [
"autoflake",
"docstrings",
"extrahead",
"fontawesome",
"inlinehilite",
"isort",
"Justfile",
"mypy",
"pydocstyle",
"Pylance",
"PYPI",
"pyproject",
"pytest",
"pyupgrade",
"pyupio",
"venv"
]
}
2 changes: 1 addition & 1 deletion Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,4 @@ alias pc := pre-commit-run

# Run tests
@test-pip *options:
pytest {{options}}
pytest {{options}}
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ all: help

## `make check` Example Output

### Success case
### Success case
# Checking dependencies...
# === System Requirements Status ===
# [✓] Just
Expand All @@ -53,7 +53,7 @@ all: help
# [✓] just
# [✗] uv (make install-uv)

# Found 1 missing deps: uv
# Found 1 missing deps: uv
# make: *** [check] Error 1

check: ## Check system requirements
Expand Down Expand Up @@ -130,6 +130,5 @@ help: ## The help command - this command
@echo "Usage: make [target]"
@echo ""
@echo "Targets:"
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "$(CYAN)%-30s$(NC) %s\n", $$1, $$2}'
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "$(CYAN)%-30s$(NC) %s\n", $$1, $$2}'
@echo ""

17 changes: 17 additions & 0 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Welcome to MkDocs

For full documentation visit [mkdocs.org](https://www.mkdocs.org).

## Commands

* `mkdocs new [dir-name]` - Create a new project.
* `mkdocs serve` - Start the live-reloading docs server.
* `mkdocs build` - Build the documentation site.
* `mkdocs -h` - Print help message and exit.

## Project layout

mkdocs.yml # The configuration file.
docs/
index.md # The documentation homepage.
... # Other markdown pages, images and other files.
1 change: 1 addition & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
site_name: My Docs
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ dependencies = [
"pyperclip>=1.8.0",
"requests>=2.31.0",
"rich>=13.0.0",
"mkdocs-material>=9.5.0",
]

[project.optional-dependencies]
Expand Down
17 changes: 17 additions & 0 deletions template_docs/docs/about/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: Changelog
description: Version history and changes for Py-Launch-Blueprint
---

# Changelog

## [0.1.0] - 2024-03-XX

### Added

- Initial release
- Zero configuration setup with pre-configured development tools
- Type safety with MyPy and Pylance integration
- Code quality tools (Ruff, pre-commit hooks)
- VS Code integration
- Comprehensive documentation
19 changes: 19 additions & 0 deletions template_docs/docs/about/license.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: License
description: MIT License terms for Py-Launch-Blueprint
---

# License

MIT License

Copyright (c) 2024 [Your Name]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

[Full license text should be copied from your LICENSE file]
37 changes: 37 additions & 0 deletions template_docs/docs/contributing/development.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: Development Guide
description: Development setup and workflow for contributors
---

# Development Guide

## Local Development Setup

!!! note "Development Requirements" - Python 3.10+ - UV Package Manager - VS Code (recommended) - Git

## Development Workflow

1. **Fork and Clone**

```bash
git clone https://github.com/your-username/py-launch-blueprint
cd py-launch-blueprint
```

2. **Setup Environment**

```bash
uv pip install --editable ".[dev]"
uvx pre-commit install
```

3. **Development Commands**
```bash
just format # Format code
just lint # Run linter
just test # Run tests
just check # Run all checks
```

!!! tip "VS Code Integration"
See our [VS Code guide](../features/vscode.md) for recommended extensions and settings.
67 changes: 67 additions & 0 deletions template_docs/docs/contributing/guidelines.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
title: Contributing Guidelines
description: How to contribute to Py-Launch-Blueprint
---

# Contributing Guidelines

!!! info "Quick Links" - [Code Standards](standards.md) - [Development Setup](development.md) - [Feature Overview](../features/overview.md)

## Getting Started

1. Fork the repository
2. Create a feature branch
3. Set up development environment
4. Make your changes
5. Submit a pull request

## Development Setup

```bash
# Clone your fork
git clone https://github.com/your-username/py-launch-blueprint
cd py-launch-blueprint

# Install dependencies
uv pip install --editable ".[dev]"

# Setup pre-commit hooks
uvx pre-commit install
```

## Code Standards

### Python Style

- Follow PEP 8 guidelines
- Use type hints
- Write docstrings for public APIs
- Keep functions focused and small

### Commit Messages

```
feat: add new feature X
^--^ ^---------------^
| |
| +-> Summary in present tense
|
+-------> Type: feat, fix, docs, style, refactor, test, chore
```

### Pull Request Process

1. Update documentation
2. Add tests for new features
3. Ensure all checks pass
4. Request review from maintainers

## Testing

```bash
# Run all tests
just test

# Run with coverage
just test-cov
```
34 changes: 34 additions & 0 deletions template_docs/docs/contributing/standards.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Code Standards

## Python Style Guide

- Follow PEP 8 guidelines
- Use type hints for all functions
- Write docstrings for public APIs
- Keep functions focused and small

## Code Formatting

All code is automatically formatted using Ruff:

```bash
just format
```

## Type Checking

All code must pass type checking:

```bash
just typecheck
```

## Testing

- Write tests for new features
- Maintain test coverage
- Run tests before committing:

```bash
just test
```
Loading
Loading