Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
832cefe
Remove Travis CI
bskinn Nov 28, 2025
d5a57f4
Fix doctest for Python 3.12
bskinn Nov 28, 2025
394a920
Freshen Pythons in tox.ini and add some envs
bskinn Nov 28, 2025
013679b
Add flake8 config to tox.ini
bskinn Nov 28, 2025
72e54b1
Bump black max line length to 88
bskinn Nov 28, 2025
8e209aa
Restore test code to in-scope for coverage
bskinn Nov 28, 2025
d1c472a
Modernize requirements files
bskinn Nov 28, 2025
972dd79
Blacken & fix lints
bskinn Nov 28, 2025
03c8a0b
Add workflows
bskinn Nov 28, 2025
0c6cbec
Temporarily activate sdist test on PRs to main
bskinn Nov 28, 2025
8bd62db
Disable regular tests while fixing sdist to save times
bskinn Nov 28, 2025
534dd16
Add tox install to sdist test job
bskinn Nov 28, 2025
6c6f752
Add req'ts files and tox.init to MANIFEST.in
bskinn Nov 28, 2025
54764a6
Add conftest.py to MANIFEST.in
bskinn Nov 28, 2025
373d324
Re-enable tests in CI
bskinn Nov 28, 2025
bf7f42c
Turn on all workflows for `main` to run a full test
bskinn Nov 28, 2025
bdcccdd
Remove 'module not executable' stanzas
bskinn Nov 28, 2025
1fada0e
Return cross-platform & sdist workflows to stable only
bskinn Nov 28, 2025
1e93b7c
Update tox version matrix
bskinn Nov 28, 2025
b5ded81
Switch testdir_coverage to only-stable & sdist-test to main-also
bskinn Nov 28, 2025
d958908
Start setup.py conversion to pyproject.toml
bskinn Nov 28, 2025
ca6cb73
Finish setup.py/pyproject.toml conversions
bskinn Nov 29, 2025
7d8f885
Refactor __version__ to new version.py
bskinn Nov 29, 2025
850e6ce
Add flake8-absolute-import to flake8 req'ts
bskinn Nov 29, 2025
cd4a9d4
Fix primary stdio_mgr import
bskinn Nov 29, 2025
4d5a7df
Refactor imports
bskinn Nov 29, 2025
48cdfb4
Restore sdist test to only PRs to stable
bskinn Nov 29, 2025
b3770f6
Add explanatory comment about pytest opts in tox.ini
bskinn Nov 29, 2025
b471f6d
Update CHANGELOG
bskinn Nov 29, 2025
0b9dd54
Merge pull request #108 from bskinn/107-testable-sdist
bskinn Nov 29, 2025
9e15970
Run core CI tests on commits on `main`, also
bskinn Nov 29, 2025
b5734cd
Rename README to .md
bskinn Nov 29, 2025
f2136b4
Convert README to Markdown
bskinn Nov 29, 2025
b63fa74
Update docstring license blocks in src/test files
bskinn Nov 29, 2025
2b97879
Update classifiers
bskinn Nov 29, 2025
d1852e4
Set version to v1.0.1.1 target
bskinn Nov 29, 2025
7d6ded5
Update copyright range end years
bskinn Nov 29, 2025
1f7a68b
Clean up some lingering README.rst points of use
bskinn Nov 29, 2025
f709e74
Don't use h5 in .md, apparently
bskinn Nov 29, 2025
a29d625
Add flake8-isort to flake8 req'ts
bskinn Nov 29, 2025
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
8 changes: 4 additions & 4 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[run]
omit =
# Don't do coverage on test code

include =
src/*
tests/*
conftest.py

# Don't cover code in the env (Termux only?)
omit =
env*/*

[report]
Expand Down
77 changes: 77 additions & 0 deletions .github/workflows/all_core_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: 'PR: Run core tests'

on:
pull_request:
push:
branches:
- main

jobs:
all_checks:
name: plus lints, etc. on Python 3.12
runs-on: ubuntu-latest
if: ${{ !contains(toJson(github.event), '[skip ci]') }}

steps:
- name: Check out repo
uses: actions/checkout@v6

- name: Install Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
cache: 'pip'
cache-dependency-path: |
requirements-ci.txt
requirements-flake8.txt

- name: Update pip & setuptools
run: python -m pip install -U pip setuptools

- name: Install & report CI dependencies
run: |
python -m pip install -U --force-reinstall -r requirements-ci.txt -r requirements-flake8.txt
python --version
pip list

- name: Run tests
run: |
pytest --cov
tox -e sdist_install

- name: Lint code
run: tox -e flake8


just_tests:
name: for Python ${{ matrix.python }}
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.10', '3.11', '3.13', '3.14']
if: ${{ !contains(toJson(github.event), '[skip ci]') }}

steps:
- name: Check out repo
uses: actions/checkout@v6

- name: Install Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
cache: 'pip'
cache-dependency-path: requirements-ci.txt

- name: Update pip & setuptools
run: python -m pip install -U pip setuptools

- name: Install & report CI dependencies
run: |
python -m pip install -U --force-reinstall -r requirements-ci.txt
python --version
pip list

- name: Run tests
run: |
pytest --cov
tox -e sdist_install
49 changes: 49 additions & 0 deletions .github/workflows/release_platform_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: 'RELEASE: Run cross-platform tests'

on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
branches:
- stable

jobs:
just_tests:
name: ${{ matrix.os }} python ${{ matrix.py }}
runs-on: ${{ matrix.os }}
concurrency:
group: ${{ github.workflow }}-${{ matrix.os }}-${{ matrix.py }}-${{ github.ref }}
cancel-in-progress: true
if: ${{ !github.event.pull_request.draft && !contains(toJson(github.event), '[skip ci]') }}
strategy:
matrix:
os: ['windows-latest', 'macos-latest']
py: ['3.10', '3.11', '3.12', '3.13']

steps:
- name: Check out repo
uses: actions/checkout@v6

- name: Install Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.py }}
cache: 'pip'
cache-dependency-path: requirements-ci.txt

- name: Update pip & setuptools
run: python -m pip install -U pip setuptools

- name: Install & report CI dependencies
run: |
python -m pip install -U --force-reinstall -r requirements-ci.txt
python --version
pip list

- name: Run tests
run: |
pytest --cov
tox -e sdist_install
72 changes: 72 additions & 0 deletions .github/workflows/release_sdist_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: 'RELEASE: Check sdist'

on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
branches:
- stable

jobs:
sdist_build_and_check:
name: builds & is testable
runs-on: 'ubuntu-latest'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
if: ${{ !github.event.pull_request.draft && !contains(toJson(github.event), '[skip ci]')}}

steps:
- name: Check out repo
uses: actions/checkout@v6

- name: Install Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
cache: 'pip'
cache-dependency-path: |
requirements-dev.txt
requirements-flake8.txt

- name: Build sdist
run: |
pip install tox
tox -e build
ls -lah dist

- name: Create sandbox
run: mkdir sandbox

- name: Unpack sdist in sandbox
run: |
cp dist/*.gz sandbox/
cd sandbox
tar xvf *.gz

- name: Create venv
run: |
cd sandbox
python -m venv env

# Only the dir of the unpacked sdist will have a digit in its name
- name: Store sdist unpack path
run: echo "UNPACK_PATH=$( find sandbox -maxdepth 1 -type d -regex 'sandbox/.+[0-9].+' )" >> $GITHUB_ENV

- name: Report sdist unpack path
run: echo $UNPACK_PATH

- name: Install dev req'ts to venv
run: |
source sandbox/env/bin/activate
cd "$UNPACK_PATH"
python -m pip install -r requirements-dev.txt

- name: Run test suite in sandbox
run: |
source sandbox/env/bin/activate
cd "$UNPACK_PATH"
pytest
38 changes: 38 additions & 0 deletions .github/workflows/release_testdir_coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: 'RELEASE: Ensure all tests ran'

on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
branches:
- stable

jobs:
testdir_coverage:
name: via coverage check
runs-on: 'ubuntu-latest'
if: ${{ !github.event.pull_request.draft && !contains(toJson(github.event), '[skip ci]')}}

steps:
- name: Check out repo
uses: actions/checkout@v6

- name: Install Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
cache: 'pip'
cache-dependency-path: |
requirements-ci.txt

- name: Install CI requirements
run: pip install -r requirements-ci.txt

- name: Run pytest with coverage
run: pytest --cov

- name: Check 100% test execution
run: coverage report --include="tests/*" --fail-under=100
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

22 changes: 21 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,25 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### [Unreleased]

...
#### Internal

- Convert project build config (mostly) from `setup.py` to `pyproject.toml`
([#108]).
- The dynamic README stays in `setup.py`.
- Convert CI to GitHub Actions and diversify ([#108]).
- Ubuntu tests across Pythons on every PR.
- Cross-platform tests across Pythons on PRs to `stable`.
- Ensuring testability of sdist in PRs to `stable`.
- Augment `MANIFEST.in` until tests run successfully on unpacked sdist.
- Checking all tests ran in PRs to `stable`.
- `[skip ci]` implemented in all.

- Refactor `__version__` to new `version.py` ([#108]).

- Set up `black`, `flake`, `isort` with `tox` envs and run/fix ([#108]).

- Update Python & deps versions in `tox` env matrix ([#108]).


### [1.0.1] - 2019-02-11

Expand All @@ -29,3 +47,5 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
which adds content to the end of the stream without changing the
current seek position.


[#108]: https://github.com/bskinn/stdio-mgr/pull/108
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018-2019 Brian Skinn
Copyright (c) 2018-2025 Brian Skinn

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
5 changes: 4 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
include LICENSE.txt README.rst CHANGELOG.md pyproject.toml
include LICENSE.txt README.md CHANGELOG.md pyproject.toml
include requirements-dev.txt requirements-ci.txt requirements-flake8.txt
include tox.ini
include conftest.py
Loading