Skip to content
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
40 changes: 40 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Format and Lint
on:
pull_request:
branches: [main]
workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
lint-python:
name: Format and Lint Python
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Run Ruff
run: uv run ruff check . --output-format=github
- name: Ruff format
run: uv run ruff format . --check

lint-docs:
name: Lint Markdown
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Markdown Lint base-files
uses: DavidAnson/markdownlint-cli2-action@v20
with:
globs: |
*.md
.github/**/*.md
config: ./.markdownlint.json
# - name: Markdown Lint Docs
# uses: DavidAnson/markdownlint-cli2-action@v20
# with:
# globs: docs/**/*.md
# config: docs/.markdownlint.json
25 changes: 15 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,8 @@ on:
- "tests/**"
- "pyproject.toml"
jobs:
lint-and-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Run Ruff
run: uv run ruff check . --output-format=github
- name: Ruff format
run: uv run ruff format . --check
test-against-python-matrix:
name: PyTest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
Expand All @@ -41,3 +32,17 @@ jobs:
- name: Run tests
run: |
uv run -p ${{ matrix.python-version }} pytest

test-entry-point:
runs-on: ubuntu-latest
name: Check the configured entry point
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up env
run: uv sync
- name: Install package
run: source .venv/bin/activate && uv pip install .
- name: Check entry point
run: source .venv/bin/activate && render-engine init --no-input
4 changes: 4 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"MD013": false,
"MD041": false
}
19 changes: 19 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_language_version:
python: python3.12
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-yaml
- id: check-toml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.12
hooks:
- id: ruff
args: ["--fix"]
# Run the formatter.
- id: ruff-format
39 changes: 39 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Contributing to the Render Engine Projects

Render Engine CLI is the CLI tool for the Render Engin static site generator. Please refer to
the main [CONTRIBUTING.md](https://github.com/render-engine/render-engine/blob/main/CONTRIBUTING.md)
for more details on how to contribute.

## Render Engine CLI Specific Topics

Render Engine CLI is a `uv` based project. For more information on installing `uv` and using it
please see the [uv documentation](https://docs.astral.sh/uv/#installation).To get started, for
this repository and check out your fork.

```shell
git clone <url to fork>
```

Once you have checked out the repository, run `uv sync` and then activate the `venv` that was
created:

```shell
uv sync
source .venv/bin/activate
```

Once you have done this you will be in the virtual environment and ready to work. It is recommended
that you do a local, editable install of the CLI in your virtual environment so that you can easily
work with the changes you have made.

```shell

uv pip install . && uv pip install -e .
```

**NOTE**: The above actually has you installing the CLI as uneditable and then as editable. This
is only needed as long as the main Render Engine install includes an entry point as there is a
conflict. The `uv pip install .` will overwrite the entry point for `render-engine` while the
second command, `uv pip insall -e .` will convert it to an editable install.

This will allow you to test your changes via the command line.
51 changes: 51 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
## Render Engine CLI

[![PyTest](https://github.com/render-engine/render-engine-cli/actions/workflows/test.yml/badge.svg)](https://github.com/render-engine/render-engine-cli/actions/workflows/test.yml)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![Discord](https://img.shields.io/discord/1174377880118104156?label=Discord&color=purple)](https://discord.gg/2xMQ4j4d8m)

Render Engine CLI is the CLI tool for the Render Engine static site generator.

## Learn More

- [CLI Documentation](https://render-engine.readthedocs.io/en/latest/cli/)
- [Check out the Render Engien Documentation](https://render-engine.readthedocs.io/en/latest/)
- [Contributors and Builders, Check out the Wiki](https://github.com/render-engine/render-engine/wiki)
- [Join the community!](https://discord.gg/2xMQ4j4d8m)

## Installing the Render Engine CLI

To use the render engine, you must have Python 3.10 or greater installed. You can download Python from [python.org](https://python.org).

- Linux/MacOS: [python.org](https://python.org)
- Windows: [Microsoft Store](https://apps.microsoft.com/store/detail/python-311/9NRWMJP3717K)

The Render Engine CLI is available in PyPI and can be installed via `pip` or `uv`:

```shell
pip install render-engine-cli # via pip
uv pip install render-engine-cli # via uv
```

Since render engine itself is one of the dependencies of the CLI there is no need to isntall
them separately. With that, the version of render engine in the CLI dependencies is not pinned
to a specific version so if you want to pin it you can do so either in your `requirements.txt`
(`pip`) or `pyproject.toml` (`uv`) files.

```shell
# requirements.text
render-engine-cli
render-engine==<version to pin>


# pyproject.toml
[project]
dependencies = [
"render-engine-cli",
"render-engine==<version to pin>"
]
```

## Getting Started

Check out the [Getting Started](https://render-engine.readthedocs.io/en/latest/page/) Section in the [Documentation](https://render-engine.readthedocs.io)
6 changes: 2 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ requires-python = ">=3.10"
dependencies = [
"click>=8.2.1",
"cookiecutter>=2.6.0",
"render-engine>=2025.5.1",
"render-engine",
"rich>=14.0.0",
"toml>=0.10.2",
"watchfiles>=1.1.0",
Expand All @@ -34,7 +34,7 @@ repository = "https://github.com/render-engine/render-engine/"
documentation = "https://render-engine.readthedocs.io/en/latest/"

[project.scripts]
render-engine = "render_engine_cli:cli"
render-engine = "render_engine_cli.cli:app"

[tool.pytest.ini_options]
pythonpath = ["src"]
Expand All @@ -55,5 +55,3 @@ select = ["E", "F", "I", "UP"]
[build-system]
requires = ["setuptools", "setuptools_scm", "wheel"]
build-backend = "setuptools.build_meta"