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
1 change: 0 additions & 1 deletion ISSUE_TEMPLATE → .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ If applicable, code to reproduce the issue and/or the stacktrace of the issue
- Python distribution/environment: CPython/Anaconda/IPython/IDLE
- Operating System: Windows 10, Ubuntu Linux, etc.
- Package version: `import progressbar; print(progressbar.__version__)`

12 changes: 6 additions & 6 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,23 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ python, javascript ]
language: [ python ]

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v6

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: +security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v2
if: ${{ matrix.language == 'python' || matrix.language == 'javascript' }}
uses: github/codeql-action/autobuild@v3
if: ${{ matrix.language == 'python' }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"
36 changes: 34 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@ name: tox

on:
push:
branches: [develop]
pull_request:
workflow_dispatch:

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

permissions:
contents: read

jobs:
perf-budget:
name: Performance budget
Expand Down Expand Up @@ -53,10 +61,10 @@ jobs:
experimental: true
- python-version: '3.14'
tox-env: docs
- python-version: '3.14'
tox-env: black
- python-version: '3.14'
tox-env: ruff
- python-version: '3.14'
tox-env: codespell

steps:
- uses: actions/checkout@v6
Expand All @@ -74,3 +82,27 @@ jobs:
# showing the failing step in the logs
continue-on-error: ${{ matrix.experimental || false }}
run: tox -e ${{ matrix.tox-env }}

windows:
name: tox (windows / py312)
runs-on: windows-latest
timeout-minutes: 10
env:
# Force UTF-8 I/O so unicode-marker tests (e.g. test_unicode) don't
# hit UnicodeEncodeError against the legacy Windows code page under
# pytest's fd-level capture.
PYTHONUTF8: '1'
steps:
- uses: actions/checkout@v6
- name: Set up Python 3.12
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip tox
- name: Test with tox
# The 100% coverage gate cannot be met on Windows: POSIX-only
# branches never execute there, so run without the coverage gate
# (`--no-cov` posarg). Linux jobs still enforce full coverage.
run: tox -e py312 -- --no-cov
4 changes: 3 additions & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ on:
jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v8
with:
days-before-issue-stale: 30
exempt-issue-labels: in-progress,help-wanted,pinned,security,enhancement
exempt-all-assignees: true

10 changes: 6 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
rev: v6.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-yaml
- id: check-added-large-files

- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.20
hooks:
- id: flake8
- id: ruff-check
- id: ruff-format
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ Stats: 1 obs (414t read) | 19,980t work | 98% savings
2388 12:04a ✅ CI/tox config updated to test Python 3.10–3.15

Access 20k tokens of past work via get_observations([IDs]) or mem-search skill.
</claude-mem-context>
</claude-mem-context>
1 change: 0 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

4 changes: 0 additions & 4 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
recursive-exclude *.pyc
recursive-exclude *.pyo
recursive-exclude *.html
include AUTHORS.rst
include CHANGES.rst
include CONTRIBUTING.rst
include LICENSE
include README.rst
include examples.py
include requirements.txt
include Makefile
include pytest.ini
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Text progress bar library for Python.
Build status:

.. image:: https://github.com/WoLpH/python-progressbar/actions/workflows/main.yml/badge.svg
:alt: python-progressbar test status
:alt: python-progressbar test status
:target: https://github.com/WoLpH/python-progressbar/actions

Coverage:
Expand Down
26 changes: 0 additions & 26 deletions appveyor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion benchmarks/results.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,4 @@
}
}
}
}
}
8 changes: 0 additions & 8 deletions circle.yml

This file was deleted.

1 change: 0 additions & 1 deletion docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ Examples
===================

.. literalinclude:: ../examples.py

1 change: 0 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@ Indices and tables
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

1 change: 0 additions & 1 deletion docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,3 @@ Bar with custom widgets
])
for i in bar(range(20)):
time.sleep(0.1)

13 changes: 6 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
[build-system]
build-backend = 'setuptools.build_meta'
# setuptools-scm is required at build time: its setuptools file-finder
# entry point is what populates the sdist with the full set of
# git-tracked files (docs/, tests/ data, tox.ini, .github/, ...).
# Dropping it silently shrinks the sdist and omits the test harness, so
# it must stay even though the version itself is static (see
# tool.setuptools.dynamic below).
requires = ['setuptools', 'setuptools-scm']

[project]
Expand Down Expand Up @@ -124,22 +130,15 @@ docs = [
]
tests = [
'dill>=0.3.6',
'flake8>=3.7.7',
'freezegun>=0.3.11',
'pytest-cov>=2.6.1',
'pytest-mypy',
'pytest>=4.6.9',
'sphinx>=1.8.5',
'pywin32; sys_platform == "win32"',
]

[dependency-groups]
dev = ['progressbar2[docs,tests]']

[tool.black]
line-length = 79
skip-string-normalization = true

[tool.codespell]
skip = '*/htmlcov,./docs/_build,*.asc'
ignore-words-list = 'datas,numbert'
Expand Down
11 changes: 4 additions & 7 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
[pytest]
python_files =
progressbar/*.py
tests/*.py

# Coverage flags intentionally live in the tox [testenv] commands, not
# here, so a bare `pytest -k foo` stays fast. CI enforces the 100% gate
# via tox. `--doctest-modules` still collects progressbar/*.py doctests
# regardless of `python_files` (which only scopes test-module collection).
addopts =
--cov progressbar
--cov-report=html
--cov-report=term-missing
--cov-report=xml
--cov-config=./pyproject.toml
--no-cov-on-fail
--doctest-modules

norecursedirs =
Expand Down
1 change: 0 additions & 1 deletion ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,3 @@ max-line-length = 79

[lint.flake8-pytest-style]
mark-parentheses = true

2 changes: 0 additions & 2 deletions tests/api_surface_snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -456,8 +456,6 @@
"annotations": "_Feature"
},
"progressbar.utils": {
"@py_assert1": "NoneType",
"@py_assert2": "NoneType",
"AttributeDict": "classsignature-unavailable",
"Iterable": "re-export",
"Iterator": "re-export",
Expand Down
20 changes: 5 additions & 15 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ envlist =
py314
py315
docs
black
ruff
; mypy
; codespell
codespell
; mypy is intentionally excluded: 11 non-gating precision errors are
; documented (see PR 4); it stays a local-only convenience env.
skip_missing_interpreters = True

[testenv]
Expand All @@ -19,7 +19,7 @@ deps =
pyright
commands =
pyright
py.test --basetemp="{envtmpdir}" --confcutdir=.. {posargs}
py.test --cov progressbar --cov-report=html --cov-report=term-missing --cov-report=xml --cov-config=./pyproject.toml --no-cov-on-fail --basetemp="{envtmpdir}" --confcutdir=.. {posargs}
skip_install = true

[testenv:mypy]
Expand All @@ -28,22 +28,13 @@ basepython = python3
deps = mypy
commands = mypy {toxinidir}/progressbar

[testenv:black]
basepython = python3
deps = black
commands = black --skip-string-normalization --line-length 79 {toxinidir}/progressbar

[testenv:docs]
changedir =
basepython = python3
deps = -r{toxinidir}/docs/requirements.txt
allowlist_externals =
rm
mkdir
whitelist_externals =
rm
cd
mkdir
commands =
rm -f docs/modules.rst
mkdir -p docs/_static
Expand All @@ -54,7 +45,7 @@ commands =
[testenv:ruff]
commands =
ruff check
ruff format
ruff format --check
deps = ruff
skip_install = true

Expand All @@ -63,4 +54,3 @@ changedir = {toxinidir}
commands = codespell .
deps = codespell
skip_install = true
command = codespell
Loading