Skip to content

Commit

Permalink
Merge branch 'release/0.3.11'
Browse files Browse the repository at this point in the history
  • Loading branch information
AndydeCleyre committed Nov 12, 2024
2 parents 71db770 + 0ea3d75 commit c5b5a28
Show file tree
Hide file tree
Showing 10 changed files with 134 additions and 128 deletions.
17 changes: 17 additions & 0 deletions NEWS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@
News
====

0.3.11
======

Changed
-------

- Use uv for pipcheckold instead of installing pip (requires uv >=0.5.0)
- Replace Zsh-text-parsing fallbacks with Python-json-parsing (slower but more reliable)
- Remove jello for JSON handling, as it's slower than the Python fallbacks
- Auto create a temporary venv for pypc's tomlkit needs
- Add diffr as optional diff-highlighter
- Show pypc's pyproject.toml diff BEFORE asking to replace it
- Remove useless double-zsh-invocation during fzf/skim preview
- Exclude wheel from pipcheckold listings
- Use new wheezy.template feature (``__args__``) to reduce shell-manipulation of JSON
- If using the wheezy.template JSON-reading backend, upgrade it (``pipz upgrade wheezy.template``)!

0.3.10
======

Expand Down
17 changes: 9 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
zpy
===
-------------------------------------------------------
Manage Python Environments in Zsh, with uv or pip-tools
Manage Python environments in Zsh, with uv or pip-tools
-------------------------------------------------------

|ghpages| |reqs-ci| |container-ci|
Expand All @@ -15,8 +15,9 @@ Manage Python Environments in Zsh, with uv or pip-tools

``zpy`` is a set of Zsh functions
wrapping
or uv__, or
pip-tools__
and Python's venv module (or uv__),
and Python's venv module,
for the *simple* and *interactive* management of
Python **virtual environments**,
**dependency specifications**,
Expand All @@ -25,10 +26,10 @@ and **isolated Python app installations**.
None of them should get in your way.
All have **thorough tab completion**.

__ https://github.com/jazzband/pip-tools

__ https://github.com/astral-sh/uv

__ https://github.com/jazzband/pip-tools

They can generally replace pipenv, poetry, pipx, pipsi, virtualenvwrapper, etc.

.. contents::
Expand All @@ -45,9 +46,9 @@ The short version of installation:

__ https://github.com/junegunn/fzf

Check out zpy.rtfd.io__ for installation, explanation, and usage docs!
Check out `the docs`__ for installation, explanation, and usage docs!

__ https://zpy.rtfd.io
__ https://andydecleyre.github.io/zpy/

Examples
--------
Expand Down Expand Up @@ -92,9 +93,9 @@ There are about 25 user-facing functions in total.
For details,
see the reference__ and the short guide__.

__ https://zpy.readthedocs.io/en/latest/help_all/
__ https://andydecleyre.github.io/zpy/help_all/

__ https://zpy.readthedocs.io/en/latest/start/
__ https://andydecleyre.github.io/zpy/start/

They are also available as subcommands to the "supercommand" ``zpy``;
``envin`` is equivalent to ``zpy envin``, etc.
Expand Down
2 changes: 1 addition & 1 deletion doc/mkdocs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ theme:
logo: material/ticket-percent
font:
text: Lexend
code: JetBrains Mono
code: Martian Mono
features:
- navigation.instant
- navigation.sections
Expand Down
12 changes: 6 additions & 6 deletions doc/mkdocs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ ghp-import==2.1.0 # via mkdocs
idna==3.10 # via requests
jinja2==3.1.4 # via mkdocs, mkdocs-material
markdown==3.7 # via mkdocs, mkdocs-material, pymdown-extensions
markupsafe==3.0.1 # via jinja2, mkdocs
markupsafe==3.0.2 # via jinja2, mkdocs
mergedeep==1.3.4 # via mkdocs, mkdocs-get-deps
mkdocs==1.6.1 # via -r requirements.in, mkdocs-material
mkdocs-get-deps==0.2.0 # via mkdocs
mkdocs-material==9.5.41 # via -r requirements.in
mkdocs-material==9.5.44 # via -r requirements.in
mkdocs-material-extensions==1.3.1 # via mkdocs-material
packaging==24.1 # via mkdocs
packaging==24.2 # via mkdocs
paginate==0.5.7 # via mkdocs-material
pathspec==0.12.1 # via mkdocs
platformdirs==4.3.6 # via mkdocs-get-deps
pygments==2.18.0 # via mkdocs-material
pymdown-extensions==10.11.2 # via mkdocs-material
pymdown-extensions==10.12 # via mkdocs-material
python-dateutil==2.9.0.post0 # via ghp-import
pyyaml==6.0.2 # via mkdocs, mkdocs-get-deps, pymdown-extensions, pyyaml-env-tag
pyyaml-env-tag==0.1 # via mkdocs
regex==2024.9.11 # via mkdocs-material
regex==2024.11.6 # via mkdocs-material
requests==2.32.3 # via mkdocs-material
six==1.16.0 # via python-dateutil
urllib3==2.2.3 # via requests
watchdog==5.0.3 # via mkdocs
watchdog==6.0.0 # via mkdocs
10 changes: 7 additions & 3 deletions doc/src/deps.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,17 @@ with optional additions for more colorful output, alternative json parsers, and
*or* [rich-cli](https://github.com/Textualize/rich-cli)
-- for pretty syntax highlighting; rich-cli adds fancy tables
- [riff](https://github.com/walles/riff)
*or* [diffr](https://github.com/mookid/diffr)
*or* [delta](https://github.com/dandavison/delta)
*or* [diff-so-fancy](https://github.com/so-fancy/diff-so-fancy)
*or* [colordiff](https://repology.org/project/colordiff/versions)
-- for more pretty syntax highlighting
- [jq](https://repology.org/project/jq/versions)
*or* [jello](https://pypi.org/project/jello/)
-- for theoretically more reliable parsing
*or* [wheezy.template](https://github.com/akornatskyy/wheezy.template)
-- for faster JSON parsing
- [jq](https://repology.org/project/jq/versions)
*or* [dasel](https://github.com/TomWright/dasel)
-- for faster JSON writing
- [zsh-defer](https://github.com/romkatv/zsh-defer)
-- for caching help content to eliminate a small delay in the first help message

Expand All @@ -74,7 +78,7 @@ with optional additions for more colorful output, alternative json parsers, and
Some of these can be installed after installing zpy, with zpy's `pipz` command:

```console
% pipz install uv rich-cli jello
% pipz install uv rich-cli wheezy.template
```

=== "The ones you already have anyway, probably"
Expand Down
2 changes: 1 addition & 1 deletion doc/templates/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
plumbum==1.9.0 # via -r requirements.in
wheezy-template==3.2.2 # via -r requirements.in
wheezy-template==3.2.3 # via -r requirements.in
6 changes: 5 additions & 1 deletion doc/templates/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@ def zpy_help(*funcs, indentation=0, indent_first_line=False):
first, rest = content.split("\n", 1)
except ValueError:
return content
return f"{first}\n{indent(rest, ' ' * indentation)}"
return (
f"{' ' * (indentation if indent_first_line else 0)}"
f"{first}\n"
f"{indent(rest, ' ' * indentation)}"
)
4 changes: 2 additions & 2 deletions mk/ctnr/zcomet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pkgs=zsh # ca-certificates git less sudo wget
fat="/home/${user}/.zcomet/repos/*/*/.git"
case $distro in
fedora)
basetag=${2:-40}
basetag=${2:-41}
pkgs="$pkgs git-core"
fat="$fat /var/cache/* /var/log/* /usr/lib*/python3.*/__pycache__"
alias ctnr_pkg="ctnr_run dnf -yq --setopt=install_weak_deps=False"
Expand All @@ -41,7 +41,7 @@ case $distro in
alias ctnr_mkuser="ctnr_run adduser -D -s /bin/zsh"
;;
ubuntu)
basetag=${2:-22.04}
basetag=${2:-24.10}
pkgs="$pkgs ca-certificates less git sudo wget"
fat="$fat /var/cache/* /var/lib/apt/lists/*"
alias ctnr_pkg="ctnr_run apt -yqq --no-install-recommends"
Expand Down
3 changes: 1 addition & 2 deletions mk/doc/templates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ fi
pip install -qr requirements.txt

for wz in *.wz; do
md="$(printf '%s\n' "$wz" | sed -E 's/\.wz$//')"
PYTHONPATH="$templates" wheezy.template "$wz" '{}' >"../src/${md}"
PYTHONPATH="$templates" wheezy.template "$wz" '{}' >"../src/${wz%.wz}"
done
Loading

0 comments on commit c5b5a28

Please sign in to comment.