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
13 changes: 6 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@ jobs:
id-token: write # mandatory for trusted publishing

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.11"

- run: pip install -U pip setuptools wheel tox
- run: tox -e py,docs,style
- run: python setup.py sdist bdist_wheel
python-version: "3.14"

- uses: astral-sh/setup-uv@v7
- run: uvx --with tox-uv tox -e py,docs,style
- run: uv build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
42 changes: 30 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,54 @@ on:
pull_request:
branches: [ main ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:

name: Test py${{ matrix.python-version }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Name went away?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I never put name, but a bot recently put one for me on another repo, and it is a nice little touch... So put it here too

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- run: pip install -U pip tox
- run: tox -e py
- uses: codecov/codecov-action@v3
- uses: astral-sh/setup-uv@v7
- run: uvx --with tox-uv tox -e py

- uses: coverallsapp/github-action@v2
with:
file: .tox/test-reports/coverage.xml
flag-name: python-${{ matrix.python-version }}
parallel: true

coveralls-finish:
name: Finish Coveralls
needs: [test]
runs-on: ubuntu-latest
steps:
- name: Finish parallel build
uses: coverallsapp/github-action@v2
with:
files: .tox/test-reports/coverage.xml
parallel-finished: true

linters:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.11"
python-version: "3.14"

- run: pip install -U pip tox
- run: tox -e docs,style
- uses: astral-sh/setup-uv@v7
- run: uvx --with tox-uv tox -e docs,style
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Portable python binaries
:target: https://github.com/codrsquad/portable-python/actions
:alt: Tested with Github Actions

.. image:: https://codecov.io/gh/codrsquad/portable-python/branch/main/graph/badge.svg
:target: https://codecov.io/gh/codrsquad/portable-python
.. image:: https://coveralls.io/repos/github/codrsquad/portable-python/badge.svg?branch=main
:target: https://coveralls.io/github/codrsquad/portable-python?branch=main
:alt: Test coverage

.. image:: https://img.shields.io/pypi/pyversions/portable-python.svg
Expand Down
10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
click~=8.0
pyyaml~=6.0
requests<3.0
runez~=5.5
urllib3~=1.26
click<9
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only max?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I don't think we need anything really here... Just conservative to require human intervention when click reaches v9 for example. I don't think we need >=

pyyaml<7
requests<3
runez<6
urllib3<3
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name="portable-python",
setup_requires="setupmeta",
setup_requires=["setupmeta"],
versioning="dev",
author="Zoran Simic zoran@simicweb.com",
keywords="python, portable, binary",
Expand Down
8 changes: 2 additions & 6 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
import runez
from runez.conftest import cli, logged, temp_folder
from runez.conftest import cli, ClickRunner, logged, temp_folder # noqa: F401, fixtures
from runez.http import GlobalHttpCalls

from portable_python.cli import main

GlobalHttpCalls.forbid()

# These are fixtures, satisfying linters with an assert
assert logged
assert temp_folder

# Ensure common logging setup is done throughout all tests (even tests not invoking cli)
runez.log.setup(debug=True, console_format="%(levelname)s %(message)s", locations=None)

cli.default_main = main
ClickRunner.default_main = main


def dummy_tarball(folders, basename, content=None):
Expand Down
3 changes: 3 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,13 @@ deps = ruff
commands = ruff check --fix
ruff format

# Old check-manifest + readme-renderer, see if there's better out there nowadays
[testenv:docs]
skip_install = True
deps = check-manifest
readme-renderer
pip
setuptools
commands = check-manifest
python setup.py check --strict --restructuredtext

Expand Down
Loading