Skip to content

Commit

Permalink
bump version, merge pull request #1490 from tqdm/devel
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Aug 8, 2023
2 parents 0bb9185 + 29bfd66 commit a6c9a21
Show file tree
Hide file tree
Showing 19 changed files with 193 additions and 218 deletions.
2 changes: 0 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Expand Up @@ -6,8 +6,6 @@ LICENCE @tqdm/maintainers
.github/* @github/pages
# @mention if >= 30%
DEMO.ipynb @casperdcl @martinzugnoni
demo.yml @casperdcl @martinzugnoni
codecov.yml @lrq3000
setup.py @casperdcl @lrq3000
tqdm/_tqdm_notebook.py @lrq3000 @casperdcl
tests/tests_pandas.py @casperdcl @chengs
6 changes: 3 additions & 3 deletions .github/workflows/check.yml
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
TOXENV:
- setup.py
- check
- perf
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
git checkout master && git checkout -
asv machine --machine github-actions --yes
- name: Restore previous results
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: .asv
key: asv-${{ runner.os }}
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
git checkout master && git checkout -
asv machine --machine github-actions --yes
- name: Restore previous results
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: .asv
key: asv-${{ runner.os }}
Expand Down
1 change: 1 addition & 0 deletions .meta/mksnap.py
Expand Up @@ -55,6 +55,7 @@
plugin: python
source: .
source-commit: '{commit}'
python-packages: [.]
build-packages: [git]
override-build: |
craftctl default
Expand Down
9 changes: 9 additions & 0 deletions .meta/nbval.ini
@@ -0,0 +1,9 @@
[regex1]
regex: (?<= )[?\s\d.]+(it/s|s/it)
replace: ?it/s
[regex2]
regex: 00:0[01]<(00:0[01]|\?)
replace: 00:00<00:00
[regex3]
regex: \|███▍ \|
replace: |███▎ |
2 changes: 1 addition & 1 deletion .meta/requirements-build.txt
@@ -1,3 +1,3 @@
py-make>=0.1.0
twine
wheel
build
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Expand Up @@ -39,7 +39,7 @@ repos:
- pytest-timeout
- pytest-asyncio
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
rev: 6.1.0
hooks:
- id: flake8
args: [-j8]
Expand All @@ -49,6 +49,7 @@ repos:
- flake8-comprehensions
- flake8-debugger
- flake8-isort
- flake8-pyproject
- flake8-string-format
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
Expand Down
40 changes: 20 additions & 20 deletions CONTRIBUTING.md
Expand Up @@ -12,7 +12,7 @@ Makefile:

```
make [<alias>] # on UNIX-like environments
python setup.py make [<alias>] # if make is unavailable
python -m pymake [<alias>] # if make is unavailable
```

The latter depends on [`py-make>=0.1.0`](https://github.com/tqdm/py-make).
Expand Down Expand Up @@ -85,7 +85,7 @@ The standard way to run the tests:
- run the following command:

```
[python setup.py] make test
[python -m py]make test
# or:
tox --skip-missing-interpreters
```
Expand All @@ -105,11 +105,11 @@ that each distribution has an alias to call the Python interpreter:

Alternatively, use `pytest` to run the tests just for the current Python version:

- install test requirements: `[python setup.py] make install_test`
- install test requirements: `[python -m py]make install_test`
- run the following command:

```
[python setup.py] make alltests
[python -m py]make alltests
```


Expand All @@ -118,9 +118,9 @@ Alternatively, use `pytest` to run the tests just for the current Python version

This section is intended for the project's maintainers and describes
how to build and upload a new release. Once again,
`[python setup.py] make [<alias>]` will help.
`[python -m py]make [<alias>]` will help.
Also consider `pip install`ing development utilities:
`[python setup.py] make install_build` at a minimum, or a more thorough `conda env create`.
`[python -m py]make install_build` at a minimum, or a more thorough `conda env create`.


## Pre-commit Hook
Expand All @@ -137,20 +137,20 @@ The `tqdm` repository managers should:
- follow the [Semantic Versioning](https://semver.org) convention for tagging


## Checking setup.py
## Checking `pyproject.toml`

To check that the `setup.py`/`setup.cfg`/`pyproject.toml` file is compliant with PyPI
To check that the `pyproject.toml` file is compliant with PyPI
requirements (e.g. version number; reStructuredText in `README.rst`) use:

```
[python setup.py] make testsetup
[python -m py]make testsetup
```

To upload just metadata (including overwriting mistakenly uploaded metadata)
to PyPI, use:

```
[python setup.py] make pypimeta
[python -m py]make pypimeta
```


Expand Down Expand Up @@ -199,7 +199,7 @@ git merge --no-ff pr-branch-name
### 4 Test

```
[python setup.py] make alltests
[python -m py]make alltests
```

### 5 Push to master
Expand Down Expand Up @@ -233,7 +233,7 @@ Manual instructions are given below in case of failure.
Build `tqdm` into a distributable python package:

```
[python setup.py] make build
[python -m py]make build
```

This will generate several builds in the `dist/` folder. On non-windows
Expand All @@ -243,13 +243,13 @@ Finally, upload everything to PyPI. This can be done easily using the
[twine](https://github.com/pypa/twine) module:

```
[python setup.py] make pypi
[python -m py]make pypi
```

Also, the new release can (should) be added to GitHub by creating a new
release from the [web interface](https://github.com/tqdm/tqdm/releases);
uploading packages from the `dist/` folder
created by `[python setup.py] make build`.
created by `[python -m py]make build`.
The [wiki] can be automatically updated with GitHub release notes by
running `make` within the wiki repository.

Expand Down Expand Up @@ -282,7 +282,7 @@ before the real deployment
- in case of a mistake, you can delete an uploaded release on PyPI, but you
cannot re-upload another with the same version number
- in case of a mistake in the metadata on PyPI (e.g. bad README),
updating just the metadata is possible: `[python setup.py] make pypimeta`
updating just the metadata is possible: `[python -m py]make pypimeta`


## Updating Websites
Expand Down Expand Up @@ -333,16 +333,16 @@ to assist with maintenance.
For experienced devs, once happy with local master, follow the steps below.
Much is automated so really it's steps 1-5, then 11(a).

1. test (`[python setup.py] make alltests` or rely on `pre-commit`)
1. test (`[python -m py]make alltests` or rely on `pre-commit`)
2. `git commit [--amend] # -m "bump version"`
3. `git push`
4. wait for tests to pass
a) in case of failure, fix and go back to (1)
5. `git tag vM.m.p && git push --tags` or comment `/tag vM.m.p commit_hash`
6. **`[AUTO:GHA]`** `[python setup.py] make distclean`
7. **`[AUTO:GHA]`** `[python setup.py] make build`
6. **`[AUTO:GHA]`** `[python -m py]make distclean`
7. **`[AUTO:GHA]`** `[python -m py]make build`
8. **`[AUTO:GHA]`** upload to PyPI. either:
a) `[python setup.py] make pypi`, or
a) `[python -m py]make pypi`, or
b) `twine upload -s -i $(git config user.signingkey) dist/tqdm-*`
9. **`[AUTO:GHA]`** upload to docker hub:
a) `make -B docker`
Expand All @@ -359,7 +359,7 @@ Much is automated so really it's steps 1-5, then 11(a).
13. **`[SUB][AUTO:GHA-rel]`** run `make deploy` in the `docs` submodule to update website
14. **`[SUB][AUTO:GHA-rel]`** accept the automated PR in the `feedstock` submodule to update conda
15. **`[AUTO:GHA-rel]`** update the [gh-pages project] benchmarks
a) `[python setup.py] make testasvfull`
a) `[python -m py]make testasvfull`
b) `asv gh-pages`

Key:
Expand Down
4 changes: 2 additions & 2 deletions LICENCE
Expand Up @@ -7,11 +7,11 @@ Exceptions or notable authors are listed below
in reverse chronological order:

* files: *
MPLv2.0 2015-2023 (c) Casper da Costa-Luis
MPL-2.0 2015-2023 (c) Casper da Costa-Luis
[casperdcl](https://github.com/casperdcl).
* files: tqdm/_tqdm.py
MIT 2016 (c) [PR #96] on behalf of Google Inc.
* files: tqdm/_tqdm.py setup.py README.rst MANIFEST.in .gitignore
* files: tqdm/_tqdm.py README.rst .gitignore
MIT 2013 (c) Noam Yorav-Raphael, original author.

[PR #96]: https://github.com/tqdm/tqdm/pull/96
Expand Down
24 changes: 11 additions & 13 deletions Makefile
@@ -1,4 +1,4 @@
# IMPORTANT: for compatibility with `python setup.py make [alias]`, ensure:
# IMPORTANT: for compatibility with `python -m pymake [alias]`, ensure:
# 1. Every alias is preceded by @[+]make (eg: @make alias)
# 2. A maximum of one @make alias or command per line
# see: https://github.com/tqdm/py-make/issues/1
Expand Down Expand Up @@ -31,7 +31,7 @@
run

help:
@python setup.py make -p
@python -m pymake -p

alltests:
@+make testcoverage
Expand All @@ -58,15 +58,14 @@ testsetup:
@make README.rst
@make tqdm/tqdm.1
@make tqdm/completion.sh
python setup.py check --metadata --restructuredtext --strict
python setup.py make none
@make help

testnb:
pytest tests_notebook.ipynb --nbval --nbval-current-env -W=ignore --nbval-sanitize-with=setup.cfg --cov=tqdm.notebook --cov-report=term
pytest tests_notebook.ipynb --cov=tqdm.notebook --cov-report=term -W=ignore --nbval --current-env --sanitize-with=.meta/nbval.ini

testcoverage:
@make coverclean
pytest tests_notebook.ipynb --cov=tqdm --cov-report= --nbval --nbval-current-env --nbval-sanitize-with=setup.cfg -W=ignore
pytest tests_notebook.ipynb --cov=tqdm --cov-report= -W=ignore --nbval --current-env --sanitize-with=.meta/nbval.ini
pytest -k "not perf" --cov=tqdm --cov-report=xml --cov-report=term --cov-append --cov-fail-under=80

testperf:
Expand Down Expand Up @@ -152,24 +151,23 @@ submodules:
cd feedstock && git remote add autotick-bot [email protected]:regro-cf-autotick-bot/tqdm-feedstock

install:
python setup.py install
python -m pip install .
install_dev:
python setup.py develop --uninstall
python setup.py develop
python -m pip install -e .
install_build:
python -m pip install -r .meta/requirements-dev.txt
python -m pip install -r .meta/requirements-build.txt
install_test:
python -m pip install -r .meta/requirements-test.txt
pre-commit install

build:
@make prebuildclean
@make testsetup
python setup.py sdist bdist_wheel
# python setup.py bdist_wininst
python -m build
python -m twine check dist/*

pypi:
twine upload dist/*
python -m twine upload dist/*

buildupload:
@make build
Expand Down
1 change: 1 addition & 0 deletions asv.conf.json
Expand Up @@ -4,6 +4,7 @@
"project_url": "https://github.com/tqdm/tqdm/",
"repo": ".",
"environment_type": "virtualenv",
"build_command": ["PIP_NO_BUILD_ISOLATION=false python -mpip wheel --no-deps --no-index -w {build_cache_dir} ."],
"show_commit_url": "https://github.com/tqdm/tqdm/commit/",
// "pythons": ["2.7", "3.6"],
// "conda_channels": ["conda-forge", "defaults"],
Expand Down
6 changes: 3 additions & 3 deletions environment.yml
Expand Up @@ -33,14 +33,14 @@ dependencies:
- requests # contrib.telegram
- rich # rich
- argopt # `cd wiki && pymake`
- twine # `pymake pypi`
- wheel # `setup.py bdist_wheel`
- twine # `pymake check pypi`
- build # `python -m build`
# `cd docs && pymake`
- mkdocs-material
- pydoc-markdown
- pygments
- pymdown-extensions
- pip:
- py-make >=0.1.0 # `setup.py make/pymake`
- py-make >=0.1.0 # `make/pymake`
- mkdocs-minify-plugin # `cd docs && pymake`
- git+https://github.com/tqdm/jsmin@python3-only#egg=jsmin # `cd docs && pymake`

0 comments on commit a6c9a21

Please sign in to comment.