bump version, merge pull request #1629 from tqdm/fix-gui

misc fixes
This commit is contained in:
Casper da Costa-Luis 2024-11-12 13:35:33 +00:00 committed by Casper da Costa-Luis
commit 0ed5d7f18f
No known key found for this signature in database
GPG Key ID: F5126E5FBD2512AD
6 changed files with 13 additions and 19 deletions

View File

@ -85,6 +85,7 @@ jobs:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
finish:
name: pytest cov
continue-on-error: ${{ github.event_name != 'push' }}

View File

@ -1,7 +1,7 @@
pre-commit
pytest
pytest-asyncio
pytest-asyncio>=0.24
pytest-cov
pytest-timeout
nbval
git+https://github.com/casperdcl/nbval.git@master#egg=nbval
ipywidgets

View File

@ -37,7 +37,7 @@ repos:
- numpy
- pandas
- pytest-timeout
- pytest-asyncio>0.21
- pytest-asyncio>=0.24
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:

View File

@ -20,8 +20,7 @@ dependencies:
- pytest
- pytest-cov
- pytest-timeout
- pytest-asyncio
- nbval
- pytest-asyncio>=0.24
- coverage
# extras
- dask # dask
@ -35,12 +34,13 @@ dependencies:
- rich # rich
- argopt # `cd wiki && pymake`
- twine # `pymake check pypi`
- build # `python -m build`
- python-build # `python -m build`
# `cd docs && pymake`
- mkdocs-material
- pygments
- pymdown-extensions
- pip:
- git+https://github.com/casperdcl/nbval.git@master#egg=nbval # tests (native)
- py-make >=0.1.0 # `make/pymake`
- mkdocs-minify-plugin # `cd docs && pymake`
- git+https://github.com/tqdm/jsmin@fix-pip#egg=jsmin # `cd docs && pymake`

View File

@ -84,7 +84,7 @@ classifiers = [
dependencies = ['colorama; platform_system == "Windows"']
[project.optional-dependencies]
dev = ["pytest>=6", "pytest-cov", "pytest-timeout", "pytest-xdist"]
dev = ["pytest>=6", "pytest-cov", "pytest-timeout", "pytest-asyncio>=0.24", "nbval"]
discord = ["requests"]
slack = ["slack-sdk"]
telegram = ["requests"]

View File

@ -122,6 +122,7 @@ class tqdm_gui(std_tqdm): # pragma: no cover
ax = self.ax
line1 = self.line1
line2 = self.line2
hspan = getattr(self, 'hspan', None)
# instantaneous rate
y = delta_it / delta_t
# overall rate
@ -148,18 +149,10 @@ class tqdm_gui(std_tqdm): # pragma: no cover
if total:
line1.set_data(xdata, ydata)
line2.set_data(xdata, zdata)
try:
poly_lims = self.hspan.get_xy()
except AttributeError:
self.hspan = self.plt.axhspan(0, 0.001, xmin=0, xmax=0, color='g')
poly_lims = self.hspan.get_xy()
poly_lims[0, 1] = ymin
poly_lims[1, 1] = ymax
poly_lims[2] = [n / total, ymax]
poly_lims[3] = [poly_lims[2, 0], ymin]
if len(poly_lims) > 4:
poly_lims[4, 1] = ymin
self.hspan.set_xy(poly_lims)
if hspan:
hspan.set_xy((0, ymin))
hspan.set_height(ymax - ymin)
hspan.set_width(n / total)
else:
t_ago = [cur_t - i for i in xdata]
line1.set_data(t_ago, ydata)