Skip to content

Commit

Permalink
bump version, merge pull request tqdm#1439 from tqdm/devel
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl authored Mar 3, 2023
2 parents 6791e8c + 687f5e4 commit 0bb9185
Show file tree
Hide file tree
Showing 58 changed files with 440 additions and 719 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
- perf
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
- run: pip install -U tox
- run: tox
env:
Expand All @@ -28,10 +28,10 @@ jobs:
name: Benchmark (Full)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
- name: Install
run: |
pip install -U wheel
Expand Down Expand Up @@ -62,10 +62,10 @@ jobs:
name: Benchmark (Branch)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
- name: Install
run: |
pip install -U wheel
Expand Down
22 changes: 10 additions & 12 deletions .github/workflows/comment-bot.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
name: Comment Bot
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issue_comment: {types: [created]}
pull_request_review_comment: {types: [created]}
jobs:
tag: # /tag <tagname> <commit>
if: startsWith(github.event.comment.body, '/tag ')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: React Seen
uses: actions/github-script@v2
uses: actions/github-script@v6
with:
script: |
const perm = await github.repos.getCollaboratorPermissionLevel({
const perm = await github.rest.repos.getCollaboratorPermissionLevel({
owner: context.repo.owner, repo: context.repo.repo,
username: context.payload.comment.user.login})
post = (context.eventName == "issue_comment"
? github.reactions.createForIssueComment
: github.reactions.createForPullRequestReviewComment)
? github.rest.reactions.createForIssueComment
: github.rest.reactions.createForPullRequestReviewComment)
if (!["admin", "write"].includes(perm.data.permission)){
post({
owner: context.repo.owner, repo: context.repo.repo,
Expand All @@ -40,12 +38,12 @@ jobs:
BODY: ${{ github.event.comment.body }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: React Success
uses: actions/github-script@v2
uses: actions/github-script@v6
with:
script: |
post = (context.eventName == "issue_comment"
? github.reactions.createForIssueComment
: github.reactions.createForPullRequestReviewComment)
? github.rest.reactions.createForIssueComment
: github.rest.reactions.createForPullRequestReviewComment)
post({
owner: context.repo.owner, repo: context.repo.repo,
comment_id: context.payload.comment.id, content: "rocket"})
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/post-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Checkout wiki
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: ${{ github.repository }}.wiki
path: wiki
- name: Checkout docs
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: ${{ github.repository }}.github.io
path: docs
token: ${{ secrets.GH_TOKEN }}
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install
Expand Down
73 changes: 35 additions & 38 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@ name: Test
on:
push:
pull_request:
schedule:
- cron: '2 1 * * 6' # M H d m w (Sat 1:02)
schedule: [{cron: '2 1 * * 6'}] # M H d m w (Sat 1:02)
jobs:
check:
if: github.event_name != 'pull_request' || github.repository_owner != 'tqdm'
if: github.event_name != 'pull_request' || !contains('OWNER,MEMBER,COLLABORATOR', github.event.pull_request.author_association)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: set PYSHA
run: echo "PYSHA=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- uses: actions/cache@v1
- uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PYSHA }}|${{ hashFiles('.pre-commit-config.yaml') }}
Expand All @@ -35,32 +36,28 @@ jobs:
EVENT: ${{ github.event_name }}
- run: pre-commit run -a --show-diff-on-failure
test:
if: github.event_name != 'pull_request' || github.repository_owner != 'tqdm'
if: github.event_name != 'pull_request' || !contains('OWNER,MEMBER,COLLABORATOR', github.event.pull_request.author_association)
name: py${{ matrix.python }}-${{ matrix.os }}
continue-on-error: ${{ matrix.os == 'windows' }}
strategy:
matrix:
os: [ubuntu]
python: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, '3.10']
python: [3.7, 3.8, 3.9, '3.10', 3.11]
include:
- os: macos
python: 2.7
- os: macos
python: 3.8
python: 3.11
- os: windows
python: 2.7
- os: windows
python: 3.8
python: 3.11
runs-on: ${{ matrix.os }}-latest
timeout-minutes: 35
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: install
Expand Down Expand Up @@ -94,13 +91,14 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
finish:
if: github.event_name != 'pull_request' || github.repository_owner != 'tqdm'
name: pytest cov
continue-on-error: ${{ github.event_name != 'push' }}
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Coveralls Finished
run: |
pip install -U coveralls
Expand All @@ -117,10 +115,13 @@ jobs:
needs: [check, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v2
token: ${{ secrets.GH_TOKEN || github.token }}
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install
run: |
sudo apt-get install -yqq pandoc
Expand All @@ -136,36 +137,32 @@ jobs:
name: Collect assets
run: |
if [[ $GITHUB_REF == refs/tags/v* ]]; then
echo ::set-output name=docker_tags::latest,${GITHUB_REF/refs\/tags\/v/}
echo ::set-output name=snap_channel::stable,candidate,edge
echo docker_tags=latest,${GITHUB_REF/refs\/tags\/v/} >> $GITHUB_OUTPUT
echo snap_channel=stable,candidate,edge >> $GITHUB_OUTPUT
elif [[ $GITHUB_REF == refs/heads/master ]]; then
echo ::set-output name=docker_tags::master
echo ::set-output name=snap_channel::candidate,edge
echo docker_tags=master >> $GITHUB_OUTPUT
echo snap_channel=candidate,edge >> $GITHUB_OUTPUT
elif [[ $GITHUB_REF == refs/heads/devel ]]; then
echo ::set-output name=docker_tags::devel
echo ::set-output name=snap_channel::edge
echo docker_tags=devel >> $GITHUB_OUTPUT
echo snap_channel=edge >> $GITHUB_OUTPUT
fi
echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
git log --pretty='format:%d%n- %s%n%b---' $(git tag --sort=v:refname | tail -n2 | head -n1)..HEAD > _CHANGES.md
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: softprops/action-gh-release@v1
name: Release
run: |
changelog=$(git log --pretty='format:%d%n- %s%n%b---' $(git tag --sort=v:refname | tail -n2 | head -n1)..HEAD)
tag="${GITHUB_REF#refs/tags/}"
gh release create --title "tqdm $tag stable" --draft --notes "$changelog" "$tag" dist/${{ steps.dist.outputs.whl }} dist/${{ steps.dist.outputs.whl_asc }}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
name: tqdm ${{ steps.collect_assets.outputs.tag }} stable
body_path: _CHANGES.md
draft: true
files: |
dist/${{ steps.dist.outputs.whl }}
dist/${{ steps.dist.outputs.whl_asc }}
GH_TOKEN: ${{ github.token }}
- uses: snapcore/action-build@v1
id: snap_build
- if: github.event_name == 'push' && steps.collect_assets.outputs.snap_channel
uses: snapcore/action-publish@v1
with:
store_login: ${{ secrets.SNAP_TOKEN }}
snap: ${{ steps.snap_build.outputs.snap }}
release: ${{ steps.collect_assets.outputs.snap_channel }}
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_TOKEN }}
- name: Docker build push
uses: elgohr/Publish-Docker-Github-Action@master
with:
Expand Down
11 changes: 4 additions & 7 deletions .meta/.readme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -412,10 +412,7 @@ Returns
"""Registers the current `tqdm` class with `pandas`."""
def trange(*args, **tqdm_kwargs):
"""
A shortcut for `tqdm(xrange(*args), **tqdm_kwargs)`.
On Python3+, `range` is used instead of `xrange`.
"""
"""Shortcut for `tqdm(range(*args), **tqdm_kwargs)`."""
Convenience Functions
~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -518,7 +515,7 @@ with the ``desc`` and ``postfix`` arguments:
sleep(0.1)
with tqdm(total=10, bar_format="{postfix[0]} {postfix[1][value]:>8.2g}",
postfix=["Batch", dict(value=0)]) as t:
postfix=["Batch", {"value": 0}]) as t:
for i in range(10):
sleep(0.1)
t.postfix[1]["value"] = i / 2
Expand Down Expand Up @@ -1223,8 +1220,8 @@ Citation information: |DOI|
:target: https://tqdm.github.io/PyData2019/slides.html
.. |Merch| image:: https://img.tqdm.ml/merch.jpg
:target: https://tqdm.github.io/merch
.. |Build-Status| image:: https://img.shields.io/github/workflow/status/tqdm/tqdm/Test/master?logo=GitHub
:target: https://github.com/tqdm/tqdm/actions?query=workflow%3ATest
.. |Build-Status| image:: https://img.shields.io/github/actions/workflow/status/tqdm/tqdm/test.yml?branch=master&label=tqdm&logo=GitHub
:target: https://github.com/tqdm/tqdm/actions/workflows/test.yml
.. |Coverage-Status| image:: https://img.shields.io/coveralls/github/tqdm/tqdm/master?logo=coveralls
:target: https://coveralls.io/github/tqdm/tqdm
.. |Branch-Coverage-Status| image:: https://codecov.io/gh/tqdm/tqdm/branch/master/graph/badge.svg
Expand Down
2 changes: 0 additions & 2 deletions .meta/mkcompletion.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
"""
Auto-generate tqdm/completion.sh from docstrings.
"""
from __future__ import print_function

import re
import sys
from io import open as io_open
Expand Down
2 changes: 0 additions & 2 deletions .meta/mkdocs.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
"""
Auto-generate README.rst from .meta/.readme.rst and docstrings.
"""
from __future__ import print_function

import sys
from io import open as io_open
from os import path
Expand Down
5 changes: 2 additions & 3 deletions .meta/mksnap.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,18 @@
`line feed \n` control characters.
grade: stable
confinement: strict
base: core18
base: core22
icon: logo.png
version: '{version}'
license: MPL-2.0
parts:
tqdm:
plugin: python
python-packages: [disco-py]
source: .
source-commit: '{commit}'
build-packages: [git]
override-build: |
snapcraftctl build
craftctl default
cp $SNAPCRAFT_PART_BUILD/tqdm/completion.sh $SNAPCRAFT_PART_INSTALL/
apps:
tqdm:
Expand Down
2 changes: 1 addition & 1 deletion .meta/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pre-commit
pytest
pytest-asyncio
pytest-cov
pytest-timeout
nbval
ipywidgets
# py>=37: pytest-asyncio
11 changes: 5 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ default_language_version:
python: python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
rev: v4.4.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand Down Expand Up @@ -38,8 +38,8 @@ repos:
- pandas
- pytest-timeout
- pytest-asyncio
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
hooks:
- id: flake8
args: [-j8]
Expand All @@ -50,13 +50,12 @@ repos:
- flake8-debugger
- flake8-isort
- flake8-string-format
- flake8-type-annotations
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/kynan/nbstripout
rev: 0.5.0
rev: 0.6.1
hooks:
- id: nbstripout
args: [--keep-count, --keep-output]
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ However it would be helpful to bear in mind:
* use two spaces between variable name and colon, specify a type, and most likely state that it's optional: `VAR<space><space>:<space>TYPE[, optional]`
* use [default: ...] for default values of keyword arguments
+ will not break backward compatibility unless there is a very good reason
* e.g. breaking py26 compatibility purely in favour of readability (such as converting `dict(a=1)` to `{'a': 1}`) is not a good enough reason
* e.g. breaking py26 compatibility purely in favour of minor readability changes (such as converting `dict(a=1)` to `{'a': 1}`) is not a good enough reason
+ API changes should be discussed carefully
+ remember, with millions of downloads per month, `tqdm` must be extremely fast and reliable
- Any other kind of change may be included in a (possibly new) submodule
Expand Down
Loading

0 comments on commit 0bb9185

Please sign in to comment.