offetestci 0.1.0__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.
@@ -0,0 +1,6 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
@@ -0,0 +1,30 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+
8
+ concurrency:
9
+ group: ${{ github.workflow }}-${{ github.ref }}
10
+ cancel-in-progress: true
11
+
12
+ jobs:
13
+ check:
14
+ runs-on: ubuntu-latest
15
+ strategy:
16
+ matrix:
17
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
18
+ steps:
19
+ - uses: actions/checkout@v7
20
+ - uses: actions/setup-python@v6
21
+ with:
22
+ python-version: ${{ matrix.python-version }}
23
+ - uses: astral-sh/setup-uv@v7
24
+ with:
25
+ enable-cache: true
26
+ - run: uv pip install --system -e ".[dev]"
27
+ - run: ruff format --check src
28
+ - run: ruff check src
29
+ - run: mypy src
30
+ - run: pytest
@@ -0,0 +1,26 @@
1
+ name: Publish
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ publish:
9
+ runs-on: ubuntu-latest
10
+ permissions:
11
+ id-token: write
12
+ steps:
13
+ - uses: actions/checkout@v7
14
+ - uses: actions/setup-python@v6
15
+ with:
16
+ python-version: "3.10"
17
+ - uses: astral-sh/setup-uv@v7
18
+ with:
19
+ enable-cache: true
20
+ - run: uv pip install --system -e ".[dev]"
21
+ - run: ruff format --check src
22
+ - run: ruff check src
23
+ - run: mypy src
24
+ - run: pytest
25
+ - run: uv build
26
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,12 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ build/
4
+ dist/
5
+ *.egg-info/
6
+ .venv/
7
+ venv/
8
+ .pytest_cache/
9
+ .mypy_cache/
10
+ .ruff_cache/
11
+ .vscode/
12
+ .idea/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Beltrán Offerrall
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,59 @@
1
+ Metadata-Version: 2.4
2
+ Name: offetestci
3
+ Version: 0.1.0
4
+ Author: Beltrán Offerrall
5
+ License-Expression: MIT
6
+ License-File: LICENSE
7
+ Requires-Python: >=3.10
8
+ Provides-Extra: dev
9
+ Requires-Dist: mypy; extra == 'dev'
10
+ Requires-Dist: pytest; extra == 'dev'
11
+ Requires-Dist: ruff; extra == 'dev'
12
+ Description-Content-Type: text/markdown
13
+
14
+ # offetestci
15
+
16
+ Paquete de prueba para validar el flujo completo de CI y publicación
17
+ automática a PyPI vía GitHub Actions (trusted publishing, sin tokens).
18
+ No tiene funcionalidad real; existe solo para comprobar que el pipeline
19
+ funciona de principio a fin.
20
+
21
+ ## Publicación a PyPI — registro previo (importante)
22
+
23
+ El workflow de publicación (`.github/workflows/publish.yml`) sube el
24
+ paquete usando **trusted publishing**: GitHub se autentica ante PyPI con
25
+ un token OIDC temporal, sin guardar ningún secreto en el repo.
26
+
27
+ Para que eso funcione, PyPI tiene que confiar en este repo **de antemano**.
28
+ Como el paquete aún no existe en PyPI, se registra como *pending publisher*:
29
+
30
+ 1. Entra en [pypi.org](https://pypi.org) (con 2FA activado).
31
+ 2. Ve a los ajustes de tu cuenta → **Publishing**
32
+ (no dentro de un proyecto, sino en la cuenta).
33
+ 3. Añade un *pending publisher* de tipo **GitHub** con estos datos exactos:
34
+
35
+ | Campo | Valor |
36
+ |---|---|
37
+ | PyPI Project Name | `offetestci` |
38
+ | Owner | `offerrall` |
39
+ | Repository name | `offetestci` |
40
+ | Workflow name | `publish.yml` |
41
+ | Environment | *(vacío)* |
42
+
43
+ 4. Guarda.
44
+
45
+ > **El error típico:** "Workflow name" es el nombre del **fichero**
46
+ > (`publish.yml`), no el `name:` que pone dentro del YAML. Si pones el de
47
+ > dentro, PyPI rechaza la publicación con un error poco claro.
48
+
49
+ Una vez registrado, la primera publicación crea el proyecto en PyPI y
50
+ establece el trusted publisher de golpe.
51
+
52
+ ## Publicar
53
+
54
+ 1. Sube la versión en `src/offetestci/__init__.py`.
55
+ 2. En GitHub → **Releases** → crea un release con su tag (ej. `v0.1.0`).
56
+ 3. El workflow `publish.yml` se dispara solo: verifica, construye y sube.
57
+
58
+ Tras el registro previo, todo el flujo es desde GitHub — sin tokens, sin
59
+ publicar desde tu máquina.
@@ -0,0 +1,46 @@
1
+ # offetestci
2
+
3
+ Paquete de prueba para validar el flujo completo de CI y publicación
4
+ automática a PyPI vía GitHub Actions (trusted publishing, sin tokens).
5
+ No tiene funcionalidad real; existe solo para comprobar que el pipeline
6
+ funciona de principio a fin.
7
+
8
+ ## Publicación a PyPI — registro previo (importante)
9
+
10
+ El workflow de publicación (`.github/workflows/publish.yml`) sube el
11
+ paquete usando **trusted publishing**: GitHub se autentica ante PyPI con
12
+ un token OIDC temporal, sin guardar ningún secreto en el repo.
13
+
14
+ Para que eso funcione, PyPI tiene que confiar en este repo **de antemano**.
15
+ Como el paquete aún no existe en PyPI, se registra como *pending publisher*:
16
+
17
+ 1. Entra en [pypi.org](https://pypi.org) (con 2FA activado).
18
+ 2. Ve a los ajustes de tu cuenta → **Publishing**
19
+ (no dentro de un proyecto, sino en la cuenta).
20
+ 3. Añade un *pending publisher* de tipo **GitHub** con estos datos exactos:
21
+
22
+ | Campo | Valor |
23
+ |---|---|
24
+ | PyPI Project Name | `offetestci` |
25
+ | Owner | `offerrall` |
26
+ | Repository name | `offetestci` |
27
+ | Workflow name | `publish.yml` |
28
+ | Environment | *(vacío)* |
29
+
30
+ 4. Guarda.
31
+
32
+ > **El error típico:** "Workflow name" es el nombre del **fichero**
33
+ > (`publish.yml`), no el `name:` que pone dentro del YAML. Si pones el de
34
+ > dentro, PyPI rechaza la publicación con un error poco claro.
35
+
36
+ Una vez registrado, la primera publicación crea el proyecto en PyPI y
37
+ establece el trusted publisher de golpe.
38
+
39
+ ## Publicar
40
+
41
+ 1. Sube la versión en `src/offetestci/__init__.py`.
42
+ 2. En GitHub → **Releases** → crea un release con su tag (ej. `v0.1.0`).
43
+ 3. El workflow `publish.yml` se dispara solo: verifica, construye y sube.
44
+
45
+ Tras el registro previo, todo el flujo es desde GitHub — sin tokens, sin
46
+ publicar desde tu máquina.
@@ -0,0 +1,39 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "offetestci"
7
+ dynamic = ["version"]
8
+ description = ""
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = "MIT"
12
+ license-files = ["LICENSE"]
13
+ authors = [{ name = "Beltrán Offerrall" }]
14
+ dependencies = []
15
+
16
+ [project.optional-dependencies]
17
+ dev = ["ruff", "mypy", "pytest"]
18
+
19
+ [tool.hatch.version]
20
+ path = "src/offetestci/__init__.py"
21
+
22
+ [tool.hatch.build.targets.wheel]
23
+ packages = ["src/offetestci"]
24
+
25
+ [tool.ruff]
26
+ line-length = 100
27
+ target-version = "py310"
28
+ src = ["src"]
29
+
30
+ [tool.ruff.lint]
31
+ select = ["E", "F", "I", "UP", "B", "SIM"]
32
+
33
+ [tool.mypy]
34
+ python_version = "3.10"
35
+ files = ["src"]
36
+ strict = true
37
+
38
+ [tool.pytest.ini_options]
39
+ testpaths = ["tests"]
@@ -0,0 +1 @@
1
+ __version__ = "0.1.0"
File without changes
@@ -0,0 +1,5 @@
1
+ import offetestci
2
+
3
+
4
+ def test_import():
5
+ assert offetestci.__version__