Compare commits
9 Commits
main
...
b984dd5f42
| Author | SHA1 | Date | |
|---|---|---|---|
| b984dd5f42 | |||
| 0eaa6ee99a | |||
| a4d4874b39 | |||
| 22a0524823 | |||
| cd06de5435 | |||
| 14d89f5f91 | |||
| 7283a3eafd | |||
| 3ebfa34733 | |||
| 1e7e7c8a6c |
46
.drone.yml
46
.drone.yml
@@ -23,18 +23,13 @@ steps:
|
|||||||
commands:
|
commands:
|
||||||
- PACKAGE_NAME=$(grep -E '^name\s*=' pyproject.toml | head -1 | cut -d'"' -f2)
|
- PACKAGE_NAME=$(grep -E '^name\s*=' pyproject.toml | head -1 | cut -d'"' -f2)
|
||||||
- VERSION=$(grep -E '^version\s*=' pyproject.toml | head -1 | cut -d'"' -f2)
|
- VERSION=$(grep -E '^version\s*=' pyproject.toml | head -1 | cut -d'"' -f2)
|
||||||
|
- echo "🔍 Checking if $PACKAGE_NAME==$VERSION exists on $PIP_REPO_URL ..."
|
||||||
- |
|
- |
|
||||||
if [ "$DRONE_TAG" != "$VERSION" ]; then
|
if curl -fsSL -u "$PIP_USERNAME:$PIP_PASSWORD" "$PIP_REPO_URL/simple/$PACKAGE_NAME/" | grep -q "$VERSION"; then
|
||||||
echo "Tag '$DRONE_TAG' does not match pyproject version '$VERSION'; refusing to publish."
|
echo "✅ $PACKAGE_NAME==$VERSION already exists — skipping build."
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
- echo "Checking if $PACKAGE_NAME==$VERSION exists on $PIP_REPO_URL ..."
|
|
||||||
- |
|
|
||||||
if curl -fsSL -u "$PIP_USERNAME:$PIP_PASSWORD" "$PIP_REPO_URL/simple/$PACKAGE_NAME/" | grep -qE "${PACKAGE_NAME}-${VERSION}(-|\.tar\.gz|\.whl)"; then
|
|
||||||
echo "$PACKAGE_NAME==$VERSION already exists; skipping build."
|
|
||||||
exit 78
|
exit 78
|
||||||
else
|
else
|
||||||
echo "New version detected: $PACKAGE_NAME==$VERSION"
|
echo "🆕 New version detected: $PACKAGE_NAME==$VERSION"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: quality-gate
|
- name: quality-gate
|
||||||
@@ -49,24 +44,19 @@ steps:
|
|||||||
commands:
|
commands:
|
||||||
- pip install --upgrade pip build
|
- pip install --upgrade pip build
|
||||||
- |
|
- |
|
||||||
if [ -z "$PIP_REPO_URL" ] || [ -z "$PIP_USERNAME" ] || [ -z "$PIP_PASSWORD" ]; then
|
AUTH_URL="https://${PIP_USERNAME}:${PIP_PASSWORD}@$(echo "${PIP_REPO_URL#*://}" | sed 's:/*$::')/simple"
|
||||||
echo "PIP_REPO_URL / PIP_USERNAME / PIP_PASSWORD are not set" >&2
|
pip install --index-url "$AUTH_URL" --extra-index-url https://pypi.org/simple/ -U ".[dev]"
|
||||||
exit 1
|
- echo "🛡️ Running quality gate..."
|
||||||
fi
|
|
||||||
- AUTH_URL="https://$PIP_USERNAME:$PIP_PASSWORD@$(echo "$PIP_REPO_URL" | sed -E 's|^[a-zA-Z]+://||; s|/*$||')/simple"
|
|
||||||
- pip install --index-url "$AUTH_URL" --extra-index-url https://pypi.org/simple/ -U ".[dev]" "pydoclint>=0.9.1"
|
|
||||||
- echo "Running quality gate..."
|
|
||||||
- python -m black --check .
|
- python -m black --check .
|
||||||
- python -m ruff check .
|
- python -m ruff check .
|
||||||
- python -m mypy
|
- python -m mypy
|
||||||
- pydoclint .
|
|
||||||
- python -m pytest
|
- python -m pytest
|
||||||
|
|
||||||
- name: build-package
|
- name: build-package
|
||||||
image: python:3.13-slim
|
image: python:3.13-slim
|
||||||
commands:
|
commands:
|
||||||
- pip install --upgrade pip build
|
- pip install --upgrade pip build
|
||||||
- echo "Building Python package..."
|
- echo "📦 Building Python package..."
|
||||||
- python -m build
|
- python -m build
|
||||||
- ls -l dist
|
- ls -l dist
|
||||||
|
|
||||||
@@ -81,7 +71,7 @@ steps:
|
|||||||
from_secret: PIP_PASSWORD
|
from_secret: PIP_PASSWORD
|
||||||
commands:
|
commands:
|
||||||
- pip install --upgrade twine
|
- pip install --upgrade twine
|
||||||
- echo "Uploading to private PyPI at $PIP_REPO_URL ..."
|
- echo "🚀 Uploading to private PyPI at $PIP_REPO_URL ..."
|
||||||
- |
|
- |
|
||||||
twine upload \
|
twine upload \
|
||||||
--repository-url "$PIP_REPO_URL" \
|
--repository-url "$PIP_REPO_URL" \
|
||||||
@@ -128,31 +118,25 @@ steps:
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
PACKAGE_NAME=$(grep -E '^name\s*=' pyproject.toml | cut -d'"' -f2)
|
PACKAGE_NAME=$(grep -E '^name\s*=' pyproject.toml | cut -d'"' -f2)
|
||||||
echo "Package: $PACKAGE_NAME"
|
echo "📦 Package: $PACKAGE_NAME"
|
||||||
|
|
||||||
for TAG in $(git tag --sort=version:refname); do
|
for TAG in $(git tag --sort=version:refname); do
|
||||||
VERSION="$TAG"
|
VERSION="$TAG"
|
||||||
echo "Version: $VERSION"
|
echo "🔁 Version: $VERSION"
|
||||||
|
|
||||||
if curl -fsSL -u "$PIP_USERNAME:$PIP_PASSWORD" \
|
if curl -fsSL -u "$PIP_USERNAME:$PIP_PASSWORD" \
|
||||||
"$PIP_REPO_URL/simple/$PACKAGE_NAME/" | grep -qE "${PACKAGE_NAME}-${VERSION}(-|\.tar\.gz|\.whl)"; then
|
"$PIP_REPO_URL/simple/$PACKAGE_NAME/" | grep -q "$VERSION"; then
|
||||||
echo "Exists, skipping"
|
echo "⏭️ Exists, skipping"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git checkout --force "$TAG"
|
git checkout --force "$TAG"
|
||||||
|
|
||||||
TAG_VERSION=$(grep -E '^version\s*=' pyproject.toml | head -1 | cut -d'"' -f2)
|
echo "🏗️ Building $VERSION"
|
||||||
if [ "$TAG" != "$TAG_VERSION" ]; then
|
|
||||||
echo "Tag $TAG != pyproject version $TAG_VERSION at that commit; skipping"
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Building $VERSION"
|
|
||||||
rm -rf dist
|
rm -rf dist
|
||||||
python -m build
|
python -m build
|
||||||
|
|
||||||
echo "Uploading $VERSION"
|
echo "⬆️ Uploading $VERSION"
|
||||||
twine upload \
|
twine upload \
|
||||||
--repository-url "$PIP_REPO_URL" \
|
--repository-url "$PIP_REPO_URL" \
|
||||||
-u "$PIP_USERNAME" \
|
-u "$PIP_USERNAME" \
|
||||||
|
|||||||
17
CHANGELOG.md
17
CHANGELOG.md
@@ -7,26 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
## [0.0.3] - 2026-10-17
|
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- `py.typed` marker for PEP 561 type information.
|
- `py.typed` marker for PEP 561 type information.
|
||||||
- Type stubs for the `csv` and `xlsx` subpackages.
|
- `.drone.yml` CI with a quality-gate step (black, ruff, mypy, pytest).
|
||||||
- Hand-written wiki, plus doc-forge-generated API reference under `docs/lib`
|
- Canonical `docforge.nav.yml`, generated `mkdocs.yml` and `mcp_docs/` via doc-forge.
|
||||||
and MCP bundle under `docs/mcp` (per-kind MkDocs configs).
|
|
||||||
- MIT `LICENSE`.
|
- MIT `LICENSE`.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Adopted the standard Type A PyPI CI pipeline: a `tag == version` guard and a
|
- Standardized `pyproject.toml` (canonical packaging, lint tool config, extras).
|
||||||
quality gate (black, ruff, mypy, pydoclint, pytest).
|
|
||||||
- Standardized `pyproject.toml` (canonical packaging, lint tool config, extras)
|
|
||||||
with a shared Google-style `[tool.pydoclint]` configuration.
|
|
||||||
- Docstring types modernised (`List` -> `list`, `Optional` -> `X | None`) to
|
|
||||||
match signatures.
|
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- `XLSX`/`CSV` members added to the `content` type surface.
|
- `XLSX`/`CSV` members added to the `content` type surface.
|
||||||
- Stub fixes for typed API surfaces.
|
- Stub fixes for typed API surfaces.
|
||||||
|
|
||||||
[Unreleased]: https://git.aetoskia.com/aetos/omniread/compare/0.0.3...HEAD
|
|
||||||
[0.0.3]: https://git.aetoskia.com/aetos/omniread/compare/0.0.2...0.0.3
|
|
||||||
|
|||||||
@@ -67,4 +67,3 @@ extra_css:
|
|||||||
- https://unpkg.com/dracula-prism/dist/css/dracula-prism.css
|
- https://unpkg.com/dracula-prism/dist/css/dracula-prism.css
|
||||||
plugins:
|
plugins:
|
||||||
- search
|
- search
|
||||||
- docforge-linkfix
|
|
||||||
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "omniread"
|
name = "omniread"
|
||||||
version = "0.0.3"
|
version = "0.0.1"
|
||||||
description = "Composable content ingestion framework with pluggable scrapers and parsers for HTML, PDF, and structured data"
|
description = "Composable content ingestion framework with pluggable scrapers and parsers for HTML, PDF, and structured data"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.10"
|
requires-python = ">=3.10"
|
||||||
@@ -171,14 +171,6 @@ module = [
|
|||||||
ignore_missing_imports = true
|
ignore_missing_imports = true
|
||||||
|
|
||||||
|
|
||||||
[tool.pydoclint]
|
|
||||||
style = "google"
|
|
||||||
exclude = '\.pyi$|tests/'
|
|
||||||
allow-init-docstring = true
|
|
||||||
skip-checking-raises = true
|
|
||||||
check-class-attributes = false
|
|
||||||
|
|
||||||
|
|
||||||
[tool.coverage.run]
|
[tool.coverage.run]
|
||||||
source = ["omniread"]
|
source = ["omniread"]
|
||||||
omit = [
|
omit = [
|
||||||
|
|||||||
Reference in New Issue
Block a user