Skip to content

Comments

Add a "storage" reference document#13976

Open
zanieb wants to merge 1 commit intomainfrom
zb/storage
Open

Add a "storage" reference document#13976
zanieb wants to merge 1 commit intomainfrom
zb/storage

Conversation

@zanieb
Copy link
Member

@zanieb zanieb commented Jun 11, 2025

We're getting questions about this. It seems best to consolidate this information?

@zanieb zanieb added the documentation Improvements or additions to documentation label Jun 11, 2025
Comment on lines +7 to +9
uv follows platform conventions for determining where to store different types of data.

Generally, it's best to configure these rather than each uv-specific storage location.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should mention that we XDG on Unix specifically here, otherwise it's unclear what platform conventions we mean.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do think this becomes clear in the next section, but I think I can add something.


For temporary files and caches:

- `$XDG_CACHE_HOME/uv` or `$HOME/.cache/uv` on Unix systems
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be using either $HOME or ~ throughout the document.


- `$XDG_BIN_HOME`, `$XDG_DATA_HOME/../bin`, or `~/.local/bin` on all platforms

## Cache
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section is duplicated with the "Cache directory" in cache.md

Comment on lines +46 to +48
uv uses a local cache to avoid re-downloading and re-building dependencies. The cache contains
wheels, source distributions, responses from package indexes, Git repositories, and Python
interpreter metadata.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a note that the cache needs to be on the same filesystem as the venv for best performance?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems like a cache.md thing, but yes.

Copy link
Member

@konstin konstin Jun 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When reviewing I've struggled with which information goes here vs. in one of the detailed (concept) pages.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think this page is a bit weird and will be duplicative in some ways. I can spend more time on it though, I put this up very quickly.

uv can install Python applications as tools using `uv tool install`. Each tool gets its own isolated
environment.

By default, tools are installed in the [data home](#data) under a `tools/` subdirectory, e.g.,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In "Tools directory" in tools.md, we call this directory "application state directory" instead.

Copy link
Member Author

@zanieb zanieb Jun 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I didn't look at cache.md or tools.md at all yet, so I'll see what I can do to make the relationship clearer between these documents and use consistent language.


uv follows platform conventions for determining where to store different types of data.

Generally, it's best to configure these rather than each uv-specific storage location.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we have the infrastructure to properly cross-link from the environment variable reference yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants