openoutnews 0.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- openoutnews-0.1.4/.github/workflows/deploy.yml +67 -0
- openoutnews-0.1.4/.gitignore +4 -0
- openoutnews-0.1.4/LICENCE.md +674 -0
- openoutnews-0.1.4/PKG-INFO +69 -0
- openoutnews-0.1.4/README.md +39 -0
- openoutnews-0.1.4/openoutnews/__init__.py +0 -0
- openoutnews-0.1.4/openoutnews/__main__.py +6 -0
- openoutnews-0.1.4/openoutnews/cli.py +144 -0
- openoutnews-0.1.4/openoutnews/conf.py +46 -0
- openoutnews-0.1.4/openoutnews/fetch.py +66 -0
- openoutnews-0.1.4/openoutnews/ml/__init__.py +0 -0
- openoutnews-0.1.4/openoutnews/ml/embeddings.py +20 -0
- openoutnews-0.1.4/openoutnews/ml/qualifier.py +20 -0
- openoutnews-0.1.4/openoutnews/store.py +119 -0
- openoutnews-0.1.4/openoutnews/version.py +1 -0
- openoutnews-0.1.4/pyproject.toml +56 -0
- openoutnews-0.1.4/tests/conftest.py +17 -0
- openoutnews-0.1.4/tests/test_cli.py +93 -0
- openoutnews-0.1.4/tests/test_fetch.py +52 -0
- openoutnews-0.1.4/tests/test_qualifier.py +48 -0
- openoutnews-0.1.4/tests/test_store.py +89 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
name: Deploy
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
test:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v4
|
|
12
|
+
|
|
13
|
+
- uses: actions/setup-python@v5
|
|
14
|
+
with:
|
|
15
|
+
python-version: "3.12"
|
|
16
|
+
|
|
17
|
+
- uses: astral-sh/setup-uv@v5
|
|
18
|
+
|
|
19
|
+
- name: Install
|
|
20
|
+
run: uv pip install --system -e ".[dev]"
|
|
21
|
+
|
|
22
|
+
- name: Run tests
|
|
23
|
+
run: pytest
|
|
24
|
+
|
|
25
|
+
# The supported install. **Every green push to `main` is a release** — the version is
|
|
26
|
+
# derived here, not committed, because PyPI numbers are single-use and permanent. Same
|
|
27
|
+
# rule as OpenOutFind and OpenOutSend: a release nobody has to remember cannot drift out
|
|
28
|
+
# of sync with what actually shipped. The cost is accepted: every commit that passes CI
|
|
29
|
+
# is public and permanent, so `main` is the release branch and `needs: test` is the whole
|
|
30
|
+
# gate.
|
|
31
|
+
publish-pypi:
|
|
32
|
+
if: github.ref == 'refs/heads/main'
|
|
33
|
+
needs: test
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
# Required: the PyPI trusted publisher is registered against this workflow filename
|
|
36
|
+
# *and* this environment name. Do not add a required reviewer to it — that would put
|
|
37
|
+
# every push behind a manual approval, which is the thing this job exists to remove.
|
|
38
|
+
environment: pypi
|
|
39
|
+
permissions:
|
|
40
|
+
id-token: write # PyPI trusted publishing
|
|
41
|
+
steps:
|
|
42
|
+
- uses: actions/checkout@v4
|
|
43
|
+
with:
|
|
44
|
+
fetch-depth: 0 # the version is a commit count; a shallow clone cannot count
|
|
45
|
+
|
|
46
|
+
# `0.1.0` in pyproject.toml is the *base*: major and minor are declared there and
|
|
47
|
+
# bumped by hand when the change deserves it; the patch is how many commits this
|
|
48
|
+
# repo has. Monotonic across a base bump, unique per commit, and nothing has to be
|
|
49
|
+
# committed for it. This repo has no tags, so the count starts at the first commit.
|
|
50
|
+
- name: Derive the version from the commit count
|
|
51
|
+
id: version
|
|
52
|
+
run: |
|
|
53
|
+
set -euo pipefail
|
|
54
|
+
base=$(grep -m1 '^version = ' pyproject.toml | cut -d'"' -f2 | cut -d. -f1,2)
|
|
55
|
+
patch=$(git rev-list --count HEAD)
|
|
56
|
+
version="${base}.${patch}"
|
|
57
|
+
echo "Releasing ${version}"
|
|
58
|
+
sed -i "0,/^version = .*/s//version = \"${version}\"/" pyproject.toml
|
|
59
|
+
echo "value=${version}" >> "$GITHUB_OUTPUT"
|
|
60
|
+
|
|
61
|
+
- name: Build sdist + wheel
|
|
62
|
+
run: pipx run build
|
|
63
|
+
|
|
64
|
+
- name: Publish to PyPI
|
|
65
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
66
|
+
with:
|
|
67
|
+
skip-existing: true # a re-run of an already-published commit is a no-op
|