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
51 changes: 0 additions & 51 deletions .github/workflows/docker.yml

This file was deleted.

29 changes: 17 additions & 12 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,24 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Setup python
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: '3.12'
enable-cache: true

- name: Install poetry
run: pipx install poetry
- name: Install dependencies
run: uv sync

- name: Check our style
run: |
poetry env use python3.12
poetry install
poetry run flake8
poetry run pytest
- name: Run prek
uses: j178/prek-action@v2

- name: Run pytest
shell: bash
run: uv run pytest -v --md-report --md-report-flavor gfm --md-report-output md_report.md

- name: Output pytest report
if: always()
shell: bash
run: cat md_report.md >> $GITHUB_STEP_SUMMARY
31 changes: 18 additions & 13 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,28 @@ on:
- master

jobs:
build:
test:
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v10.0.1
with:
python-version: '3.12'
enable-cache: true

- name: Install poetry
run: pipx install poetry
- name: Install dependencies
run: uv sync

- name: Run tests
run: |
poetry env use python3.12
poetry install
poetry run flake8
poetry run pytest
- name: Run prek
uses: j178/prek-action@v2

- name: Run pytest
shell: bash
run: uv run pytest -v --md-report --md-report-flavor gfm --md-report-output md_report.md

- name: Output pytest report
if: always()
shell: bash
run: cat md_report.md >> $GITHUB_STEP_SUMMARY
18 changes: 0 additions & 18 deletions .pre-commit-config.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ build:
python: "3.12"
jobs:
post_create_environment:
- pip install poetry
- pip install uv
post_install:
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --with docs
- UV_PROJECT_ENVIRONMENT=$READTHEDOCS_VIRTUALENV_PATH uv sync --locked --group docs

# Optionally build your docs in additional formats such as PDF and ePub
formats: []
Expand Down
16 changes: 9 additions & 7 deletions Earthfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
VERSION 0.8
FROM python:3.12

uv:
FROM ghcr.io/astral-sh/uv:latest
SAVE ARTIFACT /uv

build:
# Install poetry
RUN apt-get update && apt-get install -y curl
RUN curl -sSL https://install.python-poetry.org | python3 -
RUN ln -s /root/.local/bin/poetry /usr/local/bin/poetry
# Install uv
COPY +uv/uv /usr/local/bin/uv

# Add files
COPY --dir zbuilder .
COPY poetry.lock pyproject.toml README.md .
COPY uv.lock pyproject.toml README.md LICENSE .

# Install zbuilder
RUN poetry build
RUN pip3 install dist/zbuilder-*.whl
RUN uv build
RUN uv pip install --system dist/zbuilder-*.whl

# Save for usage on docker
SAVE ARTIFACT /usr/local/lib/python3.12/site-packages
Expand Down
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,27 @@ way it achieves high integration with ansible.

## Installation

Install and update using:

## Installation

Install with:
```
pipx install --force zbuilder
```

or

```
pip3 install --user --upgrade zbuilder
```

## Development
During development you can:
```
uv sync
. .venv/bin/activate
```

## Links

* [Documentation](https://zbuilder.readthedocs.io/en/stable/?badge=stable)
Expand Down
23 changes: 11 additions & 12 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@

import os
import sys
import pkg_resources
from importlib.metadata import version as _version

sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath(".."))
base_dir = os.path.dirname(__file__)

ver = pkg_resources.get_distribution("zbuilder").version
ver = _version("zbuilder")


# -- Project information -----------------------------------------------------

project = 'ZBuilder'
copyright = '2019, Nikos Chasiotis'
author = 'Nikos Chasiotis'
project = "ZBuilder"
copyright = "2019, Nikos Chasiotis"
author = "Nikos Chasiotis"

# The full version, including alpha/beta/rc tags
version = ver
Expand All @@ -34,28 +34,27 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
]
extensions = []

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
html_theme = "alabaster"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ['_static']

master_doc = 'index'
master_doc = "index"
7 changes: 7 additions & 0 deletions prek.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[[repos]]
repo = "https://github.com/astral-sh/ruff-pre-commit"
rev = "v0.15.13"
hooks = [
{ id = "ruff-check" },
{ id = "ruff-format" }
]
Loading
Loading