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
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: "CI — Lint & Test"

on:
push:
Expand All @@ -8,18 +8,18 @@ permissions:
contents: read

jobs:
ruff:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.13"
python-version: "3.11"

- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v8.0.0
with:
enable-cache: true

Expand All @@ -40,7 +40,7 @@ jobs:
python-version: ["3.11", "3.12", "3.13"]

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

- name: Install WeasyPrint system dependencies
run: |
Expand All @@ -52,12 +52,12 @@ jobs:
fonts-dejavu-core

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v8.0.0
with:
enable-cache: true

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Publish Docker Image
name: "Docker — Build & Publish"

on:
release:
Expand All @@ -16,38 +16,27 @@ jobs:
contents: read
packages: write
id-token: write
attestations: write


steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v7
with:
ref: ${{ github.event_name == 'release' && github.event.release.tag_name || github.ref }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Cache pip dependencies
uses: actions/cache@v4
with:
path: |
~/.cache/pip
/tmp/.buildx-cache
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-

uses: docker/setup-buildx-action@v4

- name: Log in to Container Registry
uses: docker/login-action@v3
if: github.event_name == 'release'
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@v6
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
Expand All @@ -64,8 +53,7 @@ jobs:
org.opencontainers.image.revision=${{ github.sha }}

- name: Build and push Docker image
id: build
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: .
file: ./Dockerfile
Expand All @@ -77,11 +65,3 @@ jobs:
cache-to: type=gha,mode=max
provenance: true
sbom: true

- name: Generate artifact attestation
if: github.event_name == 'release'
uses: actions/attest-build-provenance@v3
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
subject-digest: ${{ steps.build.outputs.digest }}
push-to-registry: true
12 changes: 6 additions & 6 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy Documentation
name: "Docs — Deploy to Pages"

on:
release:
Expand All @@ -9,18 +9,18 @@ permissions:
contents: write

jobs:
deploy:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.11"

- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v8.0.0
with:
enable-cache: true

Expand All @@ -31,7 +31,7 @@ jobs:
run: uv run mkdocs build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
56 changes: 56 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: "PyPI — Build & Publish"

on:
release:
types: [published]
workflow_dispatch:

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v7
with:
ref: ${{ github.event_name == 'release' && github.event.release.tag_name || github.ref }}

- name: Install uv
uses: astral-sh/setup-uv@v8.0.0
with:
python-version: "3.11"

- name: Build release distributions
run: uv build

- name: Upload distributions
uses: actions/upload-artifact@v7
with:
name: release-dists
path: dist/

publish:
runs-on: ubuntu-latest
needs:
- build
permissions:
id-token: write

environment:
name: release
url: https://pypi.org/project/naminter

steps:
- name: Retrieve release distributions
uses: actions/download-artifact@v8
with:
name: release-dists
path: dist/

- name: Install uv
uses: astral-sh/setup-uv@v8.0.0

- name: Publish release distributions to PyPI
run: uv publish
65 changes: 0 additions & 65 deletions .github/workflows/python-publish.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2025 3xp0rt
Copyright (c) 2025–2026 3xp0rt

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ Naminter is a Python package and command-line interface (CLI) tool for asynchron

## Documentation

Full documentation is available at [https://3xp0rt.github.io/Naminter/](https://3xp0rt.github.io/Naminter/), including:

- [Installation Guide](https://3xp0rt.github.io/Naminter/getting-started/installation/) - Detailed installation instructions
Documentation is available at [https://3xp0rt.github.io/Naminter/](https://3xp0rt.github.io/Naminter/), including:
- [Setup Guide](https://3xp0rt.github.io/Naminter/getting-started/setup/) - Install, update, verify, and uninstall instructions
- [Usage Examples](https://3xp0rt.github.io/Naminter/getting-started/usage/) - CLI and Python API examples
- [API Reference](https://3xp0rt.github.io/Naminter/api/core/main/) - API documentation

Expand Down
12 changes: 9 additions & 3 deletions docs/api/core/validator.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ with open("wmn-data-schema.json", encoding="utf-8") as f:
# Create validator with schema
validator = WMNValidator(schema)

# Validate against JSON schema
# Validate against JSON schema (WMN spec: enums, patterns, ranges, etc.)
# and custom data checks (required keys, types, placeholders, status ranges, etc.)
schema_errors = validator.validate_schema(data)

# Validate with custom data rules
data_errors = WMNValidator.validate_data(data)

if schema_errors or data_errors:
Expand All @@ -35,6 +34,13 @@ else:
print("Validation passed!")
```

When no JSON Schema is available (for example with `--skip-validation`), run custom
data checks only:

```python
data_errors = WMNValidator.validate_data(data)
```

## CLI Usage

The validator is also available via the CLI:
Expand Down
Loading