Open lwasser opened 9 months ago
@lwasser hey! Sorry for being off line for so long! I'm working on a reduced guide for diataxis so new contributions can get up to speed when they wish to contribute to any kind of documentation! (Instead of letting them figure this out themselves which can be a turnoff for some; the diataxis official guide is wordy and repetitive IMO!) I will link this here today (I hope!) your review and comments will be appreciated ❤️
looking forward to seeing what you pull together @DahanDv !
It would be good to document advice on usage within Docker (this was requested in the past).
Is just installing hatch
via curl and running hatch --version
expected to add over 400MB in disk usage? If python is available, one can install pipx
to get hatch
which is less heavy, but uv
seems to be pulled with these two install methods too regardless if you'd use it? (IIRC in one case it was about 30MB while the other had about 90MB of data related to uv
).
I had seen in the docs a brief note/admonition about standalone/installers not being able to detect/use an existing python install, thus pulling in a standalone version of python? (I had attempted to avoid this with a config.toml
, but it didn't seem to help reduce weight)
If 150-400MB is to be expected, it might be worthwhile to raise some awareness there. At least with an endorsed approach for using hatch
within a container, that expectation of disk weight would be clearer :)
i am not sure if i can help here or not but chiming in. i just played with this quickly locally. when i created a docker container with python / pip in it it automatically increased the container size but about 330mb.
my question: if python is not installed on a user's system and you install hatch, will it by default now try to install python now that it supports uv?
i wonder if this should be another issue where folks chime in but also i wonder if anyone has worked with a docker container with some version of python already installed to see if there is a difference in the size of the container when running hatch --version (as a way to potentially tease out the need for python to be installed and how is't setup most efficiently in a container vs. hatch's default behavior).
please excuse this comment if it's totally off base. it does seem like docs around this would be useful!
I will respond to a few comments at the same time:
hatch --version
would not invoke UV at all.@ofek to clarify
the example above referred to this issue comment.
which had this docker setup:
$ docker run -it ubuntu:22.04 bash
$ apt update && apt install -y curl
$ curl -sSfL https://github.com/pypa/hatch/releases/download/hatch-v1.10.0/hatch-1.10.0-x86_64-unknown-linux-gnu.tar.gz | tar -xz
$ mv hatch-1.10.0-x86_64-unknown-linux-gnu/usr/local/bin/hatch
$ du -shx /
144M /
$ hatch --version
Hatch, version 1.10.0
$ du -shx /
558M /
in this case a user is
So nothing is run - yet. Then the hatch binaries are moved into a new location so hatch can be called.
To me it makes sense based on what you wrote above that in this specific case, when you run hatch --version
it will first download python. And that Python download accounts for the increase in size of the container.
The alternative approach would be for someone to create a docker container that first installs python or inherits from another container on dockerhub that contains python.
Is that interpretation correct? and if it is, would it make sense to create a small how to (or add doc enhancements elsewhere)? i'm happy to help create a very basic example of this that others could enhance / build off of.
here is a repro example. i definitely saw it install python and hatch when i ran hatch --version
. NOTE: i'm on a mac so using a different release distro below compared to the example referred to above! But a small cleanup step did reduce the size.
$docker run -it ubuntu:22.04 bash
root@bd1bf5df743c:/# apt update && apt install -y curl
root@bd1bf5df743c:/# mv hatch-1.10.0-aarch64-unknown-linux-gnu /usr/local/bin/hatch
root@bd1bf5df743c:/# du -shx
131M .
root@bd1bf5df743c:/# hatch --version
Hatch, version 1.10.0
root@bd1bf5df743c:/# du -shx
361M .
root@bd1bf5df743c:/# rm -rf /var/lib/apt/lists/*
root@bd1bf5df743c:/# du -shx
316M .
Yes that is actually expected as I mention in my first bullet point. Hatch binaries are built with PyApp and bootstraps itself on the first run. If you already have Python available and want to cut down on disk space then I would recommend installing manually.
I might be able to shave some MBs off given a new release of the binaries and docs on enabling the option.
fantastic. Ofek would a small "how to" or tutorial about creating a docker environment be useful in the docs? i am not a docker expert but i could atleast capture the information here for folks to use.
maybe @polarathene (if you are up for it) could review and provide input as well?
Yes that would be quite helpful! I wouldn't have time to add that new feature until after PyCon though.
I looked into it a bit, here's my findings, hope it's helpful 👍
FWIW, keeping it simple and focused/familiar for most Docker users (that is those less experienced) is probably best. I wouldn't stress too much on size as you can see in the examples below you won't save too much with the added effort, but it's possible 👍
If you write something up and contribute a PR feel free to ping me and I'll try provide a review if I have the time :)
TL;DR:
hatch
already, but they're only providing 1.9 right now. Might take a while before 1.10 is available to benefit from uv
. These should be the lightest install option when available.pipx install
is fairly simple and easy to do via any distro as an alternative, with the benefit of the latest hatch
+ uv
(bundled). You'll need to either install uv
via pipx
to get it available easily, or alternatively configure hatch
to provide it per environment, otherwise the symlink (ln -s
command below) approach works easy enough (most users may be more comfortable with just adjusting PATH
).There's also the route of having a Dockerfile
added to this repo, and optionally a GH Actions workflow that automates publishing images to DockerHub / GHCR with the release CI. Most users would likely be happy using a base image with hatch
, unless they need to install system packages and have a particular preference (often this is ubuntu or debian for the familiar apt
command they'll come across online on sites like StackExchange/StackOverflow).
NOTE: du -shx
reports the total size of the location in MiB (1024^2
, not MB: 1000^2
, which would be -sx --si
_). So the M
value in output is MiB.
-x
excludes any other potential filesystem boundaries (unlikely in this case).uv
) the content will only be counted once. Thus two separate venv folders with hardlinks to uv
package store (cache) would not report duplicates, while you can query individual venv folder in isolation it does not represent that some data is shared (hardlinks are to an inode, unlike a symlink there is no specific location as owner).$ docker run --rm -it quay.io/fedora/fedora-minimal:41 bash
$ du -shx /
126M /
$ dnf5 install -y --setopt=install_weak_deps=0 hatch
Transaction Summary:
Installing: 75 packages
Upgrading: 5 packages
Replacing: 5 packages
Total size of inbound packages is 33 MiB. Need to download 33 MiB.
After this operation 122 MiB will be used (install 124 MiB, remove 2 MiB).
# Extra is from package manager cache:
$ du -shx /
297M /
# Clean up package manager cache:
$ dnf5 clean all
Removed 12 files, 7 directories. 0 errors occurred.
# Thus total 122 MiB added weight:
$ du -shx /
248M /
$ docker run --rm -it quay.io/fedora/fedora-minimal:41 bash
# Fedora image already has curl, just needs tar + gzip to extract:
$ dnf5 install -y tar gzip && dnf5 clean all
# As the tar.gz contains only a single file, we can write the output to the preferred location directly:
$ curl -sSfL https://github.com/pypa/hatch/releases/download/hatch-v1.10.0/hatch-1.10.0-x86_64-unknown-linux-gnu.tar.gz \
| tar -xzO > /usr/local/bin/hatch && chmod +x /usr/local/bin/hatch
# Before triggering install:
$ du -shx /
131M /
# 410+ MiB added weight from install:
$ hatch --version && du -shx /
544M /
Now as a Dockerfile
, build the image for better insight into layer for hatch --version
via the dive
CLI tool to see where all that weight is coming from:
FROM quay.io/fedora/fedora-minimal:41
RUN dnf5 install -y tar gzip && dnf5 clean all
RUN curl -sSfL https://github.com/pypa/hatch/releases/download/hatch-v1.10.0/hatch-1.10.0-x86_64-unknown-linux-gnu.tar.gz \
| tar -xzO > /usr/local/bin/hatch && chmod +x /usr/local/bin/hatch
RUN hatch --version
# In dir with `Dockerfile` above:
docker build --tag local/hatch .
docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock wagoodman/dive local/hatch
# Overview of the biggest sources of that weight:
61MB => /root/.cache/pyapp/distributions/14656550572188801628
32MB => /root/.cache/pyapp/uv
229MB => /root/.cache/pyapp/distributions/_14656550572188801628/python/lib/
- 189 MB => libpython3.12.so.1.0
- 26 MB => python3.12
91MB => /root/.cache/uv
Considering that's all in the /root/.cache
dir and nowhere else, it's not obvious what is safe to remove without breaking any assumptions from hatch
?
uv
is still optional and could be removed if not needed. Not sure why there are two instances there?
/root/.cache/uv
(91MB) looks like it's a python package for uv
?/root/.cache/pyapp/uv
(32MB) is the actual uv
binary./root/.cache/pyapp/distributions/_14656550572188801628/python
can be removedhatch
breaks, as /root/.local/share/pyapp/hatch/14656550572188801628/1.10.0/bin/hatch
is reliant upon it.hatch --version
as above), it is disregarded and the pyapp
python build is still pulled in, this hatch
is fully self-contained... Thus likely the same for the uv
dependency?pipx install hatch
(165 MiB, 48 MiB for pipx
, 117 MiB for hatch
+ bundled uv
)$ docker run --rm -it quay.io/fedora/fedora-minimal:41 bash
# Install pipx with python3:
$ dnf5 install -y pipx && dnf5 clean all
Transaction Summary:
Installing: 17 packages
Total size of inbound packages is 13 MiB. Need to download 13 MiB.
After this operation 48 MiB will be used (install 48 MiB, remove 0 B).
# Pre-install weight (ignoring pipx 48 MiB):
$ du -shx /
184M /
$ pipx install hatch uv
$ export PATH="${PATH}:/root/.local/bin"
# Post-install weight:
$ du -shx /
365M /
$ hatch --version
Hatch, version 1.10.0
$ uv --version
uv 0.1.42
# No change, huzzah!
$ du -shx /
365M /
/root/.cache/
, specifically pip
. The entire cache folder at this point can be emptied. Using pipx install
it brings in it's own copy of pip
, thus no value from adding pip
via the package manager.uv
that hatch
has bundled in it's virtual environment at /root/.local/share/pipx/venvs/hatch/bin/uv
. This allows hatch
to use uv
when configured (eg: installer = "uv"
in hatch.toml
), but is otherwise not available to you, even within hatch run
/ hatch shell
(so uv pip list
isn't available to inspect what uv
has installed implicitly via hatch
)You could of course make uv
available a few ways:
ln -s /root/.local/share/pipx/venvs/hatch/bin/uv /usr/local/bin/uv
PATH
ENV export PATH="${PATH}:/root/.local/share/pipx/venvs/hatch/bin/uv" (_**NOTE:** within a
hatchenvironment this location is available via
HATCHUV` ENV)pip
or uv
to alias HATCH_UV
environment variable via "Extra Scripts" (as shown in the docs). But this would need to be per environment AFAIK?uv
again via pipx
if you don't mind the extra space since pipx
does not de-duplicate via hardlinks from what I can tell.FROM quay.io/fedora/fedora-minimal:41
RUN dnf5 install -y pipx && dnf5 clean all
# Hatch bundles uv:
RUN pipx install hatch && rm -rf /root/.cache/
# Effectively what `pipx ensurepath` accomplishes to make the hatch command available:
ENV PATH="${PATH}:/root/.local/bin"
# One of many ways to use the internal uv installed with hatch:
RUN ln -s /root/.local/share/pipx/venvs/hatch/bin/uv /usr/local/bin/uv
# Verify both commands work:
RUN hatch --version && uv --version
FROM scratch
multi-stage (roughly 210 MiB total image size)dnf
has a feature that can create a new base image with only the minimal packages you need, which we've established is hatch
(197 MiB total base image) or pipx
(109 MiB total base image + 117 MiB after pip install hatch
). zypper
(openSUSE) also has this feature where python311-hatch
base will be 179 MiB and python311-pipx
87 MiB (+117 MiB after pipx install hatch
). Any extra commands can still be run in that new root location via chroot
if needed, such as running pipx install hatch
, then you can switch to the next stage with scratch
and COPY
that over for a minimal image size.# syntax=docker.io/docker/dockerfile:1
FROM quay.io/fedora/fedora-minimal:41 AS base-stage
# The <<EOF (start) and later EOF (end) markers are HereDoc syntax
# Allows for a RUN directive to more nicely run multiple commands in a single layer
RUN <<EOF
dnf5 --installroot /rootfs --use-host-config --setopt=install_weak_deps=0 install -y pipx
dnf5 --installroot /rootfs --use-host-config --setopt=install_weak_deps=0 clean all
# This works since bash was implicitly installed into the new root fs
# NOTE: DNF was not included, so it is not available once we switch via chroot.
# For DNS lookups like `pipx install` needs, we'll also need to provide `/etc/resolv.conf`
cp /etc/resolv.conf /rootfs/etc/resolv.conf
# chroot is a bit awkward in a Dockerfile, using SHELL directive or after the COPY on scratch
# may be more convenient?
chroot /rootfs bash -c 'pipx install hatch && rm -rf /root/.cache/'
chroot /rootfs ln -s /root/.local/share/pipx/venvs/hatch/bin/uv /usr/local/bin/uv
EOF
FROM scratch
ENV PATH="${PATH}:/root/.local/bin"
COPY --link --from=base-stage /rootfs /
RUN hatch --version && uv --version
Throughout my examples I've used quay.io/fedora/fedora-minimal:41
, this is a beta image where dnf5
is built-in. Previously on minimal images it'd be microdnf
, but once Fedora 41 is released both the minimal image and regular fedora (eg: fedora:41
) will have dnf5 as the usual dnf
command (finally!). fedora-minimal
has a smaller base, but it does make some compromises (for example try running btop
, it needs a little extra nudge on your part), I think the UX (at least interactively?) goes down a bit, so I'd generally suggest the regular fedora
images, and it should make little difference with this --installroot
approach.
Like Fedora, the openSUSE TumbleWeed image is still on hatch 1.9.x
, thus both hatch
packages are 30 MiB shy of what they'd actually be with uv
involved. When that lands you'll get a more minimal/simpler scratch
, but honestly the size isn't that big of a win here:
# syntax=docker.io/docker/dockerfile:1
FROM opensuse/tumbleweed AS base-stage
RUN <<EOF
zypper --releasever tumbleweed --installroot /rootfs --gpg-auto-import-keys refresh
zypper --releasever tumbleweed --installroot /rootfs --non-interactive install --download-in-advance --no-recommends python311-pipx
# Cleanup doesn't make a difference in this case (zypper keeps most cache on the main root), but this is how you'd do it:
# NOTE: If you care about this base-stage image layers you could clear the main root cache without the `--releasever --installroot` args
# zypper --releasever tumbleweed --installroot /rootfs-h --non-interactive clean --all
# No need to worry about the /etc/resolv.conf if you're not doing any network stuff via chroot
# At runtime of the container Docker will replace it to manage networking itself.
EOF
FROM scratch
COPY --link --from=base-stage /rootfs /
RUN hatch --version
NOTE: If you try to do the pipx
install with the opensuse image you'll find that it fails with the rm
and ln
commands not existing. Those are packages that weren't needed for pipx
, but are required to do those extra steps so you'd need to add them. Fedora on the other hand still installs those basic utility commands.
Smallest by about 30-40 MiB, fairly simple but Alpine with musl
does have some caveats to be mindful of.
# syntax=docker.io/docker/dockerfile:1
FROM alpine
RUN <<EOF
apk add --no-cache pipx
pipx install hatch && rm -rf /root/.cache
ln -s /root/.local/share/pipx/venvs/hatch/bin/uv /usr/local/bin/uv
EOF
ENV PATH="${PATH}:/root/.local/bin"
RUN hatch --version && uv --version
pyapp
(Standalone installer via curl
) => Perhaps there is something you can remove from above, but it's not clear what will break (or change over time like the addition of uv
).1.10.0
release yet to enjoy uv
). As can be seen above the size is much less and with uv
it should only go up by about roughly 30MB (another issue has the package maintainer discussing it, where they might not make uv
a weak dependency.. which may enforce that uv
to be bundled even if you don't need it).pipx
=> This is also reasonably lightweight (approx 150MiB) uv
separately to hatch
( which you can do through the same tool for 30MiB more)hatch
bundles uv
, you can technically use it directly too_). So slightly more weight, but much more broadly accessible 👍 FROM scratch
(210 MiB for the whole image) => The smallest of all all, but a bit more involved. You can achieve similar size with a much simpler alpine
+ pipx
equivalent without the --installroot
multi-stage trick (183 MiB).. However Alpine being musl
based has some drawbacks (you'll find some articles specifically about issues with Python, but there can be quite a few gotchas), thus I generally discourage it, especially since glibc based distros like fedora and suse can compete reasonably close size wise (210 MiB) with a few extra lines, but much better performance and compatibility.Thank you for the fantastic writeup!
As of https://github.com/pypa/hatch/releases/tag/hatch-v1.11.0, the binaries pull down distributions that already have Hatch installed which is about as small as I can make that. This is what the official GitHub action to install Hatch will use when I have time to do so.
There is also a new self cache
command so after installation you would want to run hatch self cache dist --remove
and now all that will exist will be the distribution with Hatch that is tied to the binary. The following is an example:
❯ docker run --rm -it ubuntu bash
root@c8f3aacf6229:/# apt update && apt install -y --no-install-recommends curl ca-certificates
root@c8f3aacf6229:/# du -shx
127M .
root@c8f3aacf6229:/# curl -LO https://github.com/pypa/hatch/releases/latest/download/hatch-x86_64-unknown-linux-gnu.tar.gz
root@c8f3aacf6229:/# tar xzf hatch-x86_64-unknown-linux-gnu.tar.gz
root@c8f3aacf6229:/# ./hatch self restore
root@c8f3aacf6229:/# rm hatch-x86_64-unknown-linux-gnu.tar.gz
root@c8f3aacf6229:/# ./hatch self cache dist -r
root@c8f3aacf6229:/# du -shx
470M .
Actually forget what I said please, I'm about to reduce that substantially.
Done!
amazing!! ofek, with pycon travel coming up i won't be able to start a tutorial / how to until after i'm back! but also @polarathene you've provided an INCREDIBLE amount of information above and i suspect / know :) that you know a lot more about this topic than i do. would you like to start a tutorial and i can perhaps contribute? or would you like for me to start / try my best to reflect what you have found and then you can review/ contribute / add that way?
it just seems to me that there is so much information in this thread now, that we should capture it and turn it into a documentation page for others to discover!
ofek that is a considerable reduction in image size!! so so awesome!!
Cheers for the improvement @ofek ! 🥳 (EDIT: It seems there are some gotchas to consider vs a pipx install hatch
)
The below notes are mostly for my benefit to come back to, but sharing with others if helpful. I'll summarize with a TLDR in a follow-up comment.
Still a tad long, see the prior message for more details.
GH Releases:
hatch
instead of the filename without .tar.gz
.dist
additions that appear to be 150MB of content similar to the standalone?).-gnu
(glibc) is available for ARM64, -musl
only offers AMD64 (x86_64
), it also seems to be broken (fails to install properly, but so does v1.10.0
).Standalone installer depends on external python despite bundling it's own:
pipx
, distro package), while the PyApp could use the one that hatch seems to bundle regardless of install method?hatch python install
). Unless you use HATCH_PYTHON=self
as a workaround, expect an extra 150MB once you use hatch shell
/ hatch env
or similar.Standalone installer prepends it's bin location to PATH
ENV:
uv
available in the environment without extra config, this overrides the hatch
binary with the hatch
python script from it's PyApp install.hatch
command within a Hatch managed environment. Unlike other install methods where this is a non-issue by only prepending the venv to PATH.Docs (Web / CLI help) need love:
hatch shell
especially has --help
output that is not explaining the --name
and --path
options. There's overlap with these elsewhere but it's not treated the same. Meanwhile the web docs for this command are equally vague.hatch python find
+ hatch python install
are examples where the CLI output is not very good at communicating what is expected. NAME
must be understood that it's a Python distribution (as per the web docs venv section on the topic).
hatch python show
which outputs a Name
column that can be inferred as what sibling commands want.NAME
implies (eg: 3.12
). While the web docs could link to an appropriate section that already covers what is supported (venv plugin page)HATCH_PYTHON
are briefly mentioned (venv plugin page) so that you can learn about the HATCH_PYTHON=self
, this ENV and others like it don't appear to be documented on the web docs?hatch config show
has:
python = "isolated"
)U.N. Owen
appears to be a pun for "unknown" and used as the alias of a muderer from a novel?void@some.where
doesn't appear to be a reference, it could just be user@example.com
?@lwasser I've got a bit to juggle elsewhere, but I'd be happy to review a PR when I can spare the time.
I am not that experienced with Python, but I know Linux and Docker very well! If you've got any questions feel free to reach out 👍
I think most of the info I've covered above doesn't really need to go into the docs. It was more about exploring what options were available and the tradeoffs 😎
Dockerfile
for you below, it's documented well and should convey what's necessary to get a basic image with hatch setup.Dockerfile
exampleDecisions made:
pipx
is only 5MB larger than the curl
install approach
pipx
provides a simpler UX? (especially for supportnig both AMD64 + ARM64 builds)pipx
image does take 90s on my system to build, vs 45s for the curl
approach (or 17s via fedora-minimal
, while it's pipx
equivalent takes 36s). This shouldn't be too much of a concern provided the layer isn't invalidated in future builds (cache mounts can alleviate that if needed).Dockerfile
below with the HereDoc
feature is easier to grok, I'd encourage choosing that.
RUN
layer.DOCKER_BUILDKIT=1
may have been required.uv
seemed most convenient to manage, while avoiding an extra 30MB.
uv
in hatch
if I could, and pipx install uv
with the HATCH_UV
ENV set.uv
, but that just swaps ln
for rm
thus no improvement to the Dockerfile
?# syntax=docker.io/docker/dockerfile:1
FROM ubuntu:24.04
RUN <<HEREDOC
# Install pipx, then empty the apt cache:
apt update && apt install -y --no-install-recommends pipx
rm -rf /var/lib/apt/lists/*
# Updates the USER `.bashrc` and `.profile` to append `${HOME}/.local/bin` to $PATH
pipx ensurepath
# Install hatch, then empty the pip cache:
pipx install hatch && rm -rf "${HOME}/.cache/pip"
# Hatch bundles UV, symlink to it to avoid needing `pipx install uv`:
ln -s "${HOME}/.local/share/pipx/venvs/hatch/bin/uv" /usr/local/bin/uv
HEREDOC
As the type of user that'd be interested in such docs when I was looking into Hatch, but also as a user new to Python that wants to run some Github projects in Docker containers - I wanted to know what install process for hatch was going to work best to minimize disk space vs plain pip install
.
pipx
install is still the best choice right now (standalone installer has some caveats remaining, while distro packages are behind in releases to enjoy uv
support).pipx
or Python, so I might have tried it anyway to compare (and then get confused once actually using hatch due to the present issues outlined above). The docs could try emphasize pipx
has the least amount of friction / surprises? 🤷♂️ An unresolved concern I have is going to be how to handle PyTorch. Deps in hatch.toml
/ pyproject.toml
don't have a clear command to install/sync but instead require hatch shell
/ hatch env run
to trigger that implicitly?
RUN
layer (or image/stage) before other deps to prevent this data being discarded when something else in the project is updated (hatch.toml
, project source files) which could invalidate the layer.hatch.toml
to be present without layer invalidation concerns) - this would prevent using hard links, thus incurring a copy across the mount boundary introduced. Not really a problem when the image is only being built for a single virtual environment using PyTorch, but if I want to have several that may be a concern.hatch.toml
environment to bring these in (or directly run uv venv + uv pip install
, without hatch involved?). The hardlinking feature should take care of the rest I think (if I manage a hatch.toml
for each project, I think they can inherit the same PyTorch environment?). I'll try it when I can :)# Related UV issue as below will need to handle different "local identifiers":
# https://github.com/astral-sh/uv/issues/3437#issuecomment-2102125794
[envs.default]
type = "virtual"
path = "venv-pytorch"
dependencies = [
"torch==2.3+cu121",
"torchvision",
"torchaudio"
]
installer = "uv"
[envs.default.env-vars]
UV_INDEX_URL = "https://download.pytorch.org/whl/cu121"
I just wanted to check back in here, y'all. I've been swamped with other volunteer commitments, and I won't be able to follow through with the docker PR. I hope that someone else can hop in and work on this, as this issue contains a lot of great information. We are having good success with using and teaching Hatch over at pyOpenSci, so I hope to continue to see the use of and documentation for Hatch grow!
Hi all! I wanted to introduce myself to this topic as Ofek kindly pointed me here when I mentioned I would be interested in helping out with some documentation.
I work as a data scientist at a small company in Austin, TX and we adopted hatch as our project manager earlier this year after some research. We had been using conda but I ran into some major headaches when trying to deploy using conda + docker + AWS services. Since these AWS services were going to be a big part of how we deployed our solutions, we decided to switch our project manager.
Since I don't want to write an essay here, I will try to keep it short 😁. We decided on hatch and I have been experimenting with it ever since and really enjoy the features though I think documentation could be improved and so I am here to help.
I have not read this entire thread yet but I look forward to catching up and helping as I can (I also volunteer for too many projects 😬).
Following the discussion here, we discussed with @ofek @dahandv upgrading the hatch docs to include more how-to and tutorial style elements to help users get started with hatch.
This also related to this issue opened by @pfmoore about using the Diátaxis framework.
In this issue we can iterate around what the structure of tutorials vs how-tos should look like and what we wish to create / develop further to help hatch users. I'll attempt to track comments below and update the main outline here as the discussion progresses.
I'll also try to here and there scan issues and discussions to identify pain points and get users involved in the upgraded content reviews :) @dahandv
Note that we also are working on tutorials at pyOpenSci which we could link to / use as needed here. Here is a tutorial on publishing to PyPI using hatch.
I'm starting the discussion here but probably can't work out a full outline now. Please add comments about other tutorials / how to's that you'd like to see and i will update this header comment as needed. (or @ofek obviously you can always edit it too!).
Hatch How To's
Hatch Tutorials