From e828027779d6e97eff8ab1c7b325136f95c44e90 Mon Sep 17 00:00:00 2001 From: wsnk Date: Mon, 10 Feb 2025 17:37:32 +0200 Subject: [PATCH 1/3] Create pypi-publish.yml --- .github/workflows/pypi-publish.yml | 70 ++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 .github/workflows/pypi-publish.yml diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml new file mode 100644 index 0000000..b493f9c --- /dev/null +++ b/.github/workflows/pypi-publish.yml @@ -0,0 +1,70 @@ +# This workflow will upload a Python Package to PyPI when a release is created +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Upload Python Package + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + release-build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - name: Build release distributions + run: | + # NOTE: put your own distribution build steps here. + python -m pip install build + python -m build + + - name: Upload distributions + uses: actions/upload-artifact@v4 + with: + name: release-dists + path: dist/ + + pypi-publish: + runs-on: ubuntu-latest + needs: + - release-build + permissions: + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write + + # Dedicated environments with protections for publishing are strongly recommended. + # For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules + environment: + name: release + # OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status: + # url: https://pypi.org/p/YOURPROJECT + # + # ALTERNATIVE: if your GitHub Release name is the PyPI project version string + # ALTERNATIVE: exactly, uncomment the following line instead: + # url: https://pypi.org/project/YOURPROJECT/${{ github.event.release.name }} + + steps: + - name: Retrieve release distributions + uses: actions/download-artifact@v4 + with: + name: release-dists + path: dist/ + + - name: Publish release distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: dist/ From a932307a66cc3147e24bd4c1f5bf8c78d3845572 Mon Sep 17 00:00:00 2001 From: wsnk Date: Mon, 10 Feb 2025 17:45:18 +0200 Subject: [PATCH 2/3] Update pyproject.toml --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9f0e374..30d7c29 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["setuptools", "wheel"] build-backend = "setuptools.build_meta" [project] -name = "pyma" +name = "pytma" version = "0.1.0" dependencies = [ "pytest" @@ -11,4 +11,4 @@ dependencies = [ optional-dependencies.tests = ["flake8"] [project.entry-points.pytest11] -myproject = "pyma.pytplug" +myproject = "pytma.pytplug" From fc54536c13ae3c9988147c2c92244b6b941a62d6 Mon Sep 17 00:00:00 2001 From: wsnk Date: Mon, 10 Feb 2025 23:02:05 +0200 Subject: [PATCH 3/3] Rename to majava --- {pyma => majava}/__init__.py | 0 {pyma => majava}/basic.py | 2 +- {pyma => majava}/formats.py | 0 {pyma => majava}/fs.py | 0 {pyma => majava}/matchers.py | 0 {pyma => majava}/pytplug.py | 0 pyproject.toml | 4 ++-- tests/test_basic.py | 2 +- 8 files changed, 4 insertions(+), 4 deletions(-) rename {pyma => majava}/__init__.py (100%) rename {pyma => majava}/basic.py (96%) rename {pyma => majava}/formats.py (100%) rename {pyma => majava}/fs.py (100%) rename {pyma => majava}/matchers.py (100%) rename {pyma => majava}/pytplug.py (100%) diff --git a/pyma/__init__.py b/majava/__init__.py similarity index 100% rename from pyma/__init__.py rename to majava/__init__.py diff --git a/pyma/basic.py b/majava/basic.py similarity index 96% rename from pyma/basic.py rename to majava/basic.py index b9f9bb3..05b12d4 100644 --- a/pyma/basic.py +++ b/majava/basic.py @@ -1,4 +1,4 @@ -from pyma.matchers import Matcher, Mismatch, _match +from majava.matchers import Matcher, Mismatch, _match class DictContains(Matcher): diff --git a/pyma/formats.py b/majava/formats.py similarity index 100% rename from pyma/formats.py rename to majava/formats.py diff --git a/pyma/fs.py b/majava/fs.py similarity index 100% rename from pyma/fs.py rename to majava/fs.py diff --git a/pyma/matchers.py b/majava/matchers.py similarity index 100% rename from pyma/matchers.py rename to majava/matchers.py diff --git a/pyma/pytplug.py b/majava/pytplug.py similarity index 100% rename from pyma/pytplug.py rename to majava/pytplug.py diff --git a/pyproject.toml b/pyproject.toml index 30d7c29..0bb089b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["setuptools", "wheel"] build-backend = "setuptools.build_meta" [project] -name = "pytma" +name = "majava" version = "0.1.0" dependencies = [ "pytest" @@ -11,4 +11,4 @@ dependencies = [ optional-dependencies.tests = ["flake8"] [project.entry-points.pytest11] -myproject = "pytma.pytplug" +myproject = "majava.pytplug" diff --git a/tests/test_basic.py b/tests/test_basic.py index 01e65ee..ba1e937 100644 --- a/tests/test_basic.py +++ b/tests/test_basic.py @@ -1,5 +1,5 @@ import pytest -from pyma.basic import InInterval, IsType, DictContains +from majava.basic import InInterval, IsType, DictContains def test_ininterval():