From ecf8576eef0021c388e071131417412b47d5da68 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 27 Aug 2024 20:44:58 +0300 Subject: [PATCH 01/16] Feat(GHActions): Update workflow Python 3.12, setup-miniconda, PyPy 3.9. --- .../.github/workflows/test-publish.yaml | 97 +++++++++++++------ 1 file changed, 69 insertions(+), 28 deletions(-) diff --git a/project_template/.github/workflows/test-publish.yaml b/project_template/.github/workflows/test-publish.yaml index 5c4ae12..b42167a 100644 --- a/project_template/.github/workflows/test-publish.yaml +++ b/project_template/.github/workflows/test-publish.yaml @@ -8,17 +8,32 @@ on: [push, pull_request] jobs: run-tests: env: - not_in_conda: "['3.11', 'pypy-3.7']" + not_in_conda: "[]" strategy: matrix: - os: [ubuntu-latest, macos-11, windows-latest] - python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "pypy-3.7"] + os: [ubuntu-latest, macos-latest, windows-latest] + python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "=3.9[build=*_pypy]"] + exclude: + - os: windows-latest + python-version: "2.7" + - os: macos-latest + python-version: "2.7" + - os: macos-latest + python-version: "3.5" + - os: macos-latest + python-version: "3.6" + - os: macos-latest + python-version: "3.7" + - os: macos-latest + python-version: "=3.9[build=*_pypy]" + - os: windows-latest + python-version: "=3.9[build=*_pypy]" include: - os: ubuntu-latest os-name: Linux pip-cache-path: ~/.cache/pip - - os: macos-11 + - os: macos-latest os-name: MacOS pip-cache-path: ~/Library/Caches/pip - os: windows-latest @@ -29,63 +44,89 @@ jobs: runs-on: ${{ matrix.os }} steps: - # Setup Python/pip - - uses: s-weigand/setup-conda@v1 + - uses: actions/checkout@v4 + - uses: conda-incubator/setup-miniconda@v3 with: + miniforge-version: latest python-version: ${{ matrix.python-version }} - if: ${{ runner.os == 'Linux' && !contains(fromJSON(env.not_in_conda), matrix.python-version) }} + if: ${{ !contains(fromJSON(env.not_in_conda), matrix.python-version) }} + # Python 3.7 is needed for ghactions-release script + - name: Install additional Python 3.7 + run: | + conda create -n py37 --yes python=3.7 + py37_prefix="`echo $CONDA_PREFIX | sed 's/__setup_conda/py37/'`" + ln -s "$py37_prefix/bin/python" "$CONDA_PREFIX/bin/python3.7" + ln -s "$py37_prefix/bin/pip" "$CONDA_PREFIX/bin/pip3.7" + python3.7 --version + pip3.7 --version + shell: bash + if: ${{ matrix.python-version == '2.7' && runner.os != 'Windows' && startsWith(github.ref, 'refs/tags/') }} - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - if: ${{ runner.os != 'Linux' || contains(fromJSON(env.not_in_conda), matrix.python-version) }} + if: ${{ contains(fromJSON(env.not_in_conda), matrix.python-version) }} + - uses: actions/cache@v3 + with: + path: ~/conda_pkgs_dir + key: ${{ runner.os }}-conda - name: Cache pip uses: actions/cache@v3 with: path: ${{ matrix.pip-cache-path }} key: ${{ runner.os }}-pip - # Setup tox - name: Install dependencies run: | python --version + python -m pip || python -m ensurepip --default-pip --upgrade python -m pip install --upgrade pip setuptools wheel pip --version - pip install --upgrade virtualenv tox + pip install --upgrade virtualenv "tox >= 3.15, < 4" + shell: bash -el {0} - name: Set TOXENV run: | + python -c " import os, sys ld_library_path = None if hasattr(sys, 'pypy_version_info'): - toxenv = 'pypy3' + toxenv = 'pypy3' else: - pyver = '%d%d' % tuple(sys.version_info[:2]) - if os.name == 'posix': - if pyver == '27': # Python 2.7 on Linux requires `$LD_LIBRARY_PATH` - ld_library_path = os.path.join( - os.path.dirname(os.path.dirname(sys.executable)), 'lib') - toxenv = 'py%s' % pyver - if os.name == 'posix': - toxenv += ',py%s-flake8' % pyver + pyver = '%d%d' % tuple(sys.version_info[:2]) + if (pyver == '27') and (os.name == 'posix'): # Python 2.7 on Linux requires `$LD_LIBRARY_PATH` + ld_library_path = os.path.join( + os.path.dirname(os.path.dirname(sys.executable)), 'lib') + toxenv = 'py%s' % pyver + if os.name == 'posix': + toxenv += ',py%s-flake8' % pyver with open(os.environ['GITHUB_ENV'], 'a') as f: - if ld_library_path: - f.write('LD_LIBRARY_PATH=' + ld_library_path + '\n') - f.write('TOXENV=' + toxenv + '\n') - print(toxenv) - shell: python + if ld_library_path: + f.write('LD_LIBRARY_PATH=' + ld_library_path + '\n') + f.write('TOXENV=' + toxenv + '\n') + " + shell: bash -el {0} - name: Run tox run: | python -c "import os; print(os.environ['TOXENV'])" tox --version tox + shell: bash -el {0} - - name: Build and publish wheel + - name: Build and publish sdist and wheel on Unix + run: | + pip install -U --ignore-installed certifi # Replace conda-installed + devscripts/CI/ghactions-release + env: + TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} + TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} + if: ${{ !startsWith(matrix.python-version, 'pypy') && runner.os != 'Windows' && startsWith(github.ref, 'refs/tags/') }} + - name: Build and publish wheel on w32 run: | pip install -U pip setuptools twine wheel python setup.py bdist_wheel twine upload --disable-progress-bar --skip-existing dist\* - if: ${{ startsWith(github.ref, 'refs/tags/') }} + if: ${{ !startsWith(matrix.python-version, 'pypy') && runner.os == 'Windows' && startsWith(github.ref, 'refs/tags/') }} env: TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} @@ -98,8 +139,8 @@ jobs: omitBodyDuringUpdate: true omitNameDuringUpdate: true omitPrereleaseDuringUpdate: true - prerelease: false + prerelease: true replacesArtifacts: false skipIfReleaseExists: false updateOnlyUnreleased: false - if: ${{ startsWith(github.ref, 'refs/tags/') }} + if: ${{ !startsWith(matrix.python-version, 'pypy') && startsWith(github.ref, 'refs/tags/') }} -- 2.39.5 From 4158067c6f31b388a93fb76715bd9dfe404826c2 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 27 Aug 2024 20:45:54 +0300 Subject: [PATCH 02/16] Feat(build,tests): Python 3.12 --- project_template/setup.py | 1 + project_template/tox.ini | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/project_template/setup.py b/project_template/setup.py index cff05a0..332acf7 100755 --- a/project_template/setup.py +++ b/project_template/setup.py @@ -65,6 +65,7 @@ setup( 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', ], packages=['{project}'], package_data={'{project}': []}, diff --git a/project_template/tox.ini b/project_template/tox.ini index 827f970..ed5581f 100644 --- a/project_template/tox.ini +++ b/project_template/tox.ini @@ -1,6 +1,6 @@ [tox] minversion = 3.15 -envlist = py27,py3{4,5,6,7,8,9,10,11},pypy,pypy3,py{27,36,311}-flake8 +envlist = py27,py3{4,5,6,7,8,9,10,11,12},pypy,pypy3,py{27,37,312}-flake8 [testenv] commands = @@ -11,12 +11,12 @@ passenv = CI DISTUTILS_USE_SDK MSSdk INCLUDE LIB WINDIR deps = -rdevscripts/requirements/requirements_tests.txt -[testenv:py{27,34,35,36,37,38,39,310,311,py,py3}] +[testenv:py27,py3{4,5,6,7,8,9,10,11,12}] commands = {[testenv]commands} {envpython} -m pytest -[testenv:py{27,34,35,36,37,38,39,310,311}-flake8] +[testenv:py27,py3{4,5,6,7,8,9,10,11,12}-flake8] deps = flake8 pytest < 7.0 -- 2.39.5 From dc8f648dac72fbe3f65b64cd9aff64179ef9dcb2 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 27 Aug 2024 20:46:39 +0300 Subject: [PATCH 03/16] Feat: Update project --- project_template/ChangeLog | 2 +- project_template/README.rst | 2 +- project_template/devscripts/requirements/requirements.txt | 1 - project_template/docs/install.rst | 4 ++-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/project_template/ChangeLog b/project_template/ChangeLog index e45d3d1..a2c8ff4 100644 --- a/project_template/ChangeLog +++ b/project_template/ChangeLog @@ -1 +1 @@ -Version 0.0.1 (2018-04-01) +Version 0.0.1 (2024-08-01) diff --git a/project_template/README.rst b/project_template/README.rst index 749389f..0ace782 100644 --- a/project_template/README.rst +++ b/project_template/README.rst @@ -4,7 +4,7 @@ Author: Oleg Broytman . -Copyright (C) 2018 PhiloSoft Design. +Copyright (C) 2024 PhiloSoft Design. License: GPL. diff --git a/project_template/devscripts/requirements/requirements.txt b/project_template/devscripts/requirements/requirements.txt index 06736f7..627fa17 100644 --- a/project_template/devscripts/requirements/requirements.txt +++ b/project_template/devscripts/requirements/requirements.txt @@ -1,6 +1,5 @@ --trusted-host phdru.name --find-links=https://phdru.name/Software/Python/ ---install-option=-O2 m_lib.defenc >= 1.0 m_lib >= 2.0; python_version >= '2.7' and python_version < '3.0' diff --git a/project_template/docs/install.rst b/project_template/docs/install.rst index cfaf935..e52a390 100644 --- a/project_template/docs/install.rst +++ b/project_template/docs/install.rst @@ -6,14 +6,14 @@ System-wide :: - sudo pip install --find-links=https://phdru.name/Software/Python/ --no-index --install-option='-O2' {project} + sudo pip install --find-links=https://phdru.name/Software/Python/ --no-index {project} User mode --------- :: - pip install --find-links=https://phdru.name/Software/Python/ --no-index --install-option='-O2' --user {project} + pip install --find-links=https://phdru.name/Software/Python/ --no-index --user {project} Installation from sources ========================= -- 2.39.5 From 85c1eb99f4c6c18ac53f370fe7c2c0df3cae1353 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Wed, 2 Oct 2024 09:08:11 +0300 Subject: [PATCH 04/16] Feat: Run `tox` with Python 3.13 --- project_template/tox.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/project_template/tox.ini b/project_template/tox.ini index ed5581f..9124a44 100644 --- a/project_template/tox.ini +++ b/project_template/tox.ini @@ -1,6 +1,6 @@ [tox] minversion = 3.15 -envlist = py27,py3{4,5,6,7,8,9,10,11,12},pypy,pypy3,py{27,37,312}-flake8 +envlist = py27,py3{4,5,6,7,8,9,10,11,12,13},pypy,pypy3,py{27,37,312}-flake8 [testenv] commands = @@ -11,12 +11,12 @@ passenv = CI DISTUTILS_USE_SDK MSSdk INCLUDE LIB WINDIR deps = -rdevscripts/requirements/requirements_tests.txt -[testenv:py27,py3{4,5,6,7,8,9,10,11,12}] +[testenv:py27,py3{4,5,6,7,8,9,10,11,12,13}] commands = {[testenv]commands} {envpython} -m pytest -[testenv:py27,py3{4,5,6,7,8,9,10,11,12}-flake8] +[testenv:py27,py3{4,5,6,7,8,9,10,11,12,13}-flake8] deps = flake8 pytest < 7.0 -- 2.39.5 From 56051c4ef5f492832835647454022f961e801085 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 9 Dec 2024 18:11:47 +0300 Subject: [PATCH 05/16] Feat(clone2current): Set commit date --- clone2current | 1 + 1 file changed, 1 insertion(+) diff --git a/clone2current b/clone2current index a769ad0..737ccbf 100755 --- a/clone2current +++ b/clone2current @@ -33,6 +33,7 @@ then else cp -p "$source_dir"/.git/description .git fi && +"$HOME"/prog/git-scripts/set-commit-date-recursive && cd "$source_dir" && if [ -n "$directories" ]; then -- 2.39.5 From e5d5c67a30dd8535111c8d8039c7d29635afef1a Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 9 Dec 2024 19:50:34 +0300 Subject: [PATCH 06/16] Fix: Add remote `current` or set path if it exists --- clone2current | 5 ++++- publish2web | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/clone2current b/clone2current index 737ccbf..9ec08df 100755 --- a/clone2current +++ b/clone2current @@ -39,4 +39,7 @@ cd "$source_dir" && if [ -n "$directories" ]; then dest_dir="$directories/$dest_dir" fi && -exec git remote add current "$HOME"/current/projects/"$dest_dir" +{ + git remote add current "$HOME"/current/projects/"$dest_dir" || + exec git remote set-url current "$HOME"/current/projects/"$dest_dir" +} diff --git a/publish2web b/publish2web index b0898f1..933227c 100755 --- a/publish2web +++ b/publish2web @@ -52,5 +52,8 @@ cd "$source_dir" && if [ -n "$directories" ]; then dest_dir="$directories/$dest_dir" fi && -git remote add web "$HOME"/Internet/WWW/htdocs/git.phdru.name/"$dest_dir" && +{ + git remote add web "$HOME"/Internet/WWW/htdocs/git.phdru.name/"$dest_dir" || + git remote set-url web "$HOME"/Internet/WWW/htdocs/git.phdru.name/"$dest_dir" +} && exec git push --set-upstream web master -- 2.39.5 From 9537c40a6d70359caaa893d44291702c5223f82c Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 12 Jan 2025 23:47:16 +0300 Subject: [PATCH 07/16] Rename `move-project` -> `admin2prog` --- move-project => admin2prog | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename move-project => admin2prog (100%) diff --git a/move-project b/admin2prog similarity index 100% rename from move-project rename to admin2prog -- 2.39.5 From c57a1c85a1d77d18e48a341572e4469573c3a286 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 13 Jan 2025 00:20:10 +0300 Subject: [PATCH 08/16] Add `move-project` Move a project into a subdirectory. --- move-project | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100755 move-project diff --git a/move-project b/move-project new file mode 100755 index 0000000..d932b07 --- /dev/null +++ b/move-project @@ -0,0 +1,60 @@ +#! /bin/sh + +if [ $# -ne 2 ]; then + echo "Usage: $0 project_name dir" >&2 + exit 1 +fi + +project_name="$1" +dir="$2" + +if [ "$project_name" = "$dir" ]; then + echo "Error: The script $0 cannot yet move a project into a subdirectory of the same name" >&2 + exit 1 +fi + +fix_path() { + config_option="$1" + path="`git config --get $config_option`" + new_path="`echo \"$path\" | sed \"s@$project_name@$dir/$project_name@\"`" + git config "$config_option" "$new_path" +} + +for project_dir in "$HOME"/current/projects "$HOME"/prog/Python \ + "$HOME"/Internet/WWW/htdocs/git.phdru.name; do + if [ "$project_dir" = "$HOME"/Internet/WWW/htdocs/git.phdru.name ]; then + pname="$project_name".git + else + pname="$project_name" + fi + + if [ ! -d "$project_dir/$pname" ]; then + echo "Error: $project_dir/$pname does not exist" >&2 + exit 1 + fi + + if [ -d "$project_dir/$dir" ]; then + echo "Error: $project_dir/$dir already exists" >&2 + exit 1 + fi +done + +for project_dir in "$HOME"/current/projects "$HOME"/prog/Python \ + "$HOME"/Internet/WWW/htdocs/git.phdru.name; do + if [ "$project_dir" = "$HOME"/Internet/WWW/htdocs/git.phdru.name ]; then + pname="$project_name".git + else + pname="$project_name" + fi + + cd "$project_dir" && + mkdir -p "$dir" && + if [ "$project_dir" = "$HOME"/Internet/WWW/htdocs/git.phdru.name ]; then + chmod u=rwX,go=rX "$dir" + fi && + mv "$pname" "$dir" && + cd "$dir/$pname" && + for remote in `git remote`; do + fix_path "remote.$remote.url" + done +done -- 2.39.5 From 2d3146fe0900d74b276174df4c7aa5ff8133fb5a Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 13 Jan 2025 00:45:42 +0300 Subject: [PATCH 09/16] Update year to 2025 --- project_template/ChangeLog | 2 +- project_template/README.rst | 2 +- project_template/docs/news.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/project_template/ChangeLog b/project_template/ChangeLog index a2c8ff4..d0c23da 100644 --- a/project_template/ChangeLog +++ b/project_template/ChangeLog @@ -1 +1 @@ -Version 0.0.1 (2024-08-01) +Version 0.0.1 (2025-01-01) diff --git a/project_template/README.rst b/project_template/README.rst index 0ace782..0073610 100644 --- a/project_template/README.rst +++ b/project_template/README.rst @@ -4,7 +4,7 @@ Author: Oleg Broytman . -Copyright (C) 2024 PhiloSoft Design. +Copyright (C) 2025 PhiloSoft Design. License: GPL. diff --git a/project_template/docs/news.rst b/project_template/docs/news.rst index 4056354..3ff807b 100644 --- a/project_template/docs/news.rst +++ b/project_template/docs/news.rst @@ -1,7 +1,7 @@ News ==== -Version 0.0.1 (2018-04-??) +Version 0.0.1 (2025-01-01) --------------------------- * -- 2.39.5 From 593fa8e76ca664c1e05588d7011df200b6cfa65c Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 13 Jan 2025 01:18:47 +0300 Subject: [PATCH 10/16] Add Python 3.13 --- project_template/.github/workflows/test-publish.yaml | 2 +- project_template/setup.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/project_template/.github/workflows/test-publish.yaml b/project_template/.github/workflows/test-publish.yaml index b42167a..72ebac9 100644 --- a/project_template/.github/workflows/test-publish.yaml +++ b/project_template/.github/workflows/test-publish.yaml @@ -13,7 +13,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "=3.9[build=*_pypy]"] + python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "=3.9[build=*_pypy]"] exclude: - os: windows-latest python-version: "2.7" diff --git a/project_template/setup.py b/project_template/setup.py index 332acf7..7066def 100755 --- a/project_template/setup.py +++ b/project_template/setup.py @@ -66,6 +66,7 @@ setup( 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', ], packages=['{project}'], package_data={'{project}': []}, -- 2.39.5 From a68952490a56465ac197d6e60cb34300ad3b8948 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 13 Jan 2025 16:04:29 +0300 Subject: [PATCH 11/16] Fix(tox.ini): Fix syntax --- project_template/tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project_template/tox.ini b/project_template/tox.ini index 9124a44..2a93037 100644 --- a/project_template/tox.ini +++ b/project_template/tox.ini @@ -11,12 +11,12 @@ passenv = CI DISTUTILS_USE_SDK MSSdk INCLUDE LIB WINDIR deps = -rdevscripts/requirements/requirements_tests.txt -[testenv:py27,py3{4,5,6,7,8,9,10,11,12,13}] +[testenv:py{27,34,35,36,37,38,39,310,311,312,313,py,py3}] commands = {[testenv]commands} {envpython} -m pytest -[testenv:py27,py3{4,5,6,7,8,9,10,11,12,13}-flake8] +[testenv:py{27,34,35,36,37,38,39,310,311,312,313,py,py3}-flake8] deps = flake8 pytest < 7.0 -- 2.39.5 From 65fbd1d95d1edc2c9d935f02a47364979f7195f5 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 13 Jan 2025 16:21:22 +0300 Subject: [PATCH 12/16] Feat(clone2current): Configure `publish-docs` and `update-remotes` --- clone2current | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/clone2current b/clone2current index 9ec08df..b7cb5d0 100755 --- a/clone2current +++ b/clone2current @@ -35,6 +35,11 @@ else fi && "$HOME"/prog/git-scripts/set-commit-date-recursive && +echo /publish-docs >>.git/info/exclude && +echo /update-remotes >>.git/info/exclude && +git config update-remotes.files publish-docs && +cp -p "$HOME"/current/projects/m_lib/update-remotes . && + cd "$source_dir" && if [ -n "$directories" ]; then dest_dir="$directories/$dest_dir" -- 2.39.5 From 37d10659360414f9f655c89a6834ee1ecca321f4 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 14 Jan 2025 00:42:05 +0300 Subject: [PATCH 13/16] CI(GHActions): Upgrade `setup-python` and `cache` actions --- project_template/.github/workflows/test-publish.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/project_template/.github/workflows/test-publish.yaml b/project_template/.github/workflows/test-publish.yaml index 72ebac9..2772576 100644 --- a/project_template/.github/workflows/test-publish.yaml +++ b/project_template/.github/workflows/test-publish.yaml @@ -62,16 +62,16 @@ jobs: pip3.7 --version shell: bash if: ${{ matrix.python-version == '2.7' && runner.os != 'Windows' && startsWith(github.ref, 'refs/tags/') }} - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} if: ${{ contains(fromJSON(env.not_in_conda), matrix.python-version) }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/conda_pkgs_dir key: ${{ runner.os }}-conda - name: Cache pip - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ matrix.pip-cache-path }} key: ${{ runner.os }}-pip -- 2.39.5 From 125cb30475a479dceff50a27f069346d508db85f Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 14 Jan 2025 00:58:31 +0300 Subject: [PATCH 14/16] Tests(tox): Change syntax for `envlist` `[testenv:]` doesn't allow lists like `[testenv:py27,py3{4,5}]`; it only allows syntax like `[testenv:py{27,34,35}]`. This commit changes syntax for `envlist` to make it closer to `[testenv:]`. --- project_template/tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project_template/tox.ini b/project_template/tox.ini index 2a93037..2c88fcd 100644 --- a/project_template/tox.ini +++ b/project_template/tox.ini @@ -1,6 +1,6 @@ [tox] minversion = 3.15 -envlist = py27,py3{4,5,6,7,8,9,10,11,12,13},pypy,pypy3,py{27,37,312}-flake8 +envlist = py{27,34,35,36,37,38,39,310,311,312,313,py,py3},py{27,37,312}-flake8 [testenv] commands = -- 2.39.5 From 01d3bf899b626444b4d928d555563f11ceefe5d2 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 28 Jan 2025 14:27:28 +0300 Subject: [PATCH 15/16] Fix minor misspelling --- clone2current | 4 ++-- publish2web | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/clone2current b/clone2current index b7cb5d0..8ffff7c 100755 --- a/clone2current +++ b/clone2current @@ -1,7 +1,7 @@ #! /bin/sh if [ ! -d ".git" -a -z "$1" ]; then - echo "Usage: $0 repoistory [directories]" >&2 + echo "Usage: $0 repository [directories]" >&2 exit 1 fi @@ -11,7 +11,7 @@ fi && source_dir="`pwd`" && if [ ! -d ".git" ]; then - echo "$source_dir is not a repoistory (.git isn't found)" >&2 + echo "$source_dir is not a repository (.git isn't found)" >&2 exit 1 fi && diff --git a/publish2web b/publish2web index 933227c..1590b82 100755 --- a/publish2web +++ b/publish2web @@ -1,7 +1,7 @@ #! /bin/sh if [ ! -d ".git" -a -z "$1" ]; then - echo "Usage: $0 repoistory [directories]" >&2 + echo "Usage: $0 repository [directories]" >&2 exit 1 fi @@ -12,7 +12,7 @@ fi && source_dir="`pwd`" && if [ ! -d ".git" ]; then - echo "$source_dir is not a repoistory (.git isn't found)" >&2 + echo "$source_dir is not a repository (.git isn't found)" >&2 exit 1 fi && -- 2.39.5 From c0decdc2e08ad123e7c5b80877b920dca16b0b54 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 28 Jan 2025 14:32:46 +0300 Subject: [PATCH 16/16] Add script `add-remote` --- add-remote | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 add-remote diff --git a/add-remote b/add-remote new file mode 100755 index 0000000..c6f96e2 --- /dev/null +++ b/add-remote @@ -0,0 +1,10 @@ +#! /bin/sh + +if [ -z "$1" -o -z "$2" ]; then + echo "Usage: $0 remote_name URL " >&2 + echo "Example: $0 gh https://github.com/phdru/cookiecutter.git" + exit 1 +fi + +git remote add "$1" "$2" && +exec git config --add update-remotes.remotes "$1" -- 2.39.5