Skip to content

Commit e3382be

Browse files
committed
Downcase uv where applicable
The project is named uv, not UV. Even at the start of a sentence. -_-
1 parent 93d23eb commit e3382be

File tree

12 files changed

+41
-41
lines changed

12 files changed

+41
-41
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# - Linux: ~/.cache/rattler/cache
1010
# - macOS: ~/Library/Caches/rattler/cache
1111
# - Windows: %LOCALAPPDATA%\rattler\cache
12-
# 4. UV package cache:
12+
# 4. uv package cache:
1313
# - Linux: ~/.cache/uv
1414
# - macOS: ~/.cache/uv
1515
# - Windows: %LOCALAPPDATA%\uv\cache
@@ -79,7 +79,7 @@ jobs:
7979
restore-keys: |
8080
${{ runner.os }}-pixi-pkgs-
8181
82-
- name: Cache UV packages
82+
- name: Cache uv packages
8383
uses: actions/cache@v4
8484
with:
8585
path: |

CLAUDE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ The project provides type-safe builder classes for different environment types:
176176
- Uses `mamba run -p <envDir>` for activation
177177
- Location: `org.apposed.appose.builder.MambaBuilder`
178178

179-
**UvBuilder** - Fast Python virtual environments via UV
179+
**UvBuilder** - Fast Python virtual environments via uv
180180
- Created via `Appose.uv()` or `Appose.uv(source)`
181181
- Type-safe methods: `include(packages...)`, `python(version)`
182182
- Supports `requirements.txt` files
@@ -217,11 +217,11 @@ Environment env = Appose.pixi()
217217
Environment env = Appose.mamba("path/to/environment.yml")
218218
.build();
219219

220-
// UV builder with requirements.txt
220+
// uv builder with requirements.txt
221221
Environment env = Appose.uv("path/to/requirements.txt")
222222
.build();
223223

224-
// UV builder with programmatic packages
224+
// uv builder with programmatic packages
225225
Environment env = Appose.uv()
226226
.python("3.11")
227227
.include("numpy", "pandas", "matplotlib")

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ disk usage and troubleshoot environment issues.
151151
**Location:** `~/.local/share/appose/` (customizable via `appose.envs-dir` system property)
152152

153153
This directory contains:
154-
- **Tool binaries:** Pixi, UV, and Micromamba executables downloaded by Appose
154+
- **Tool binaries:** Pixi, uv, and Micromamba executables downloaded by Appose
155155
- `.pixi/bin/pixi` (v0.39.5)
156156
- `.uv/bin/uv` (v0.5.25)
157157
- `.mamba/bin/micromamba` (latest)
@@ -168,7 +168,7 @@ Each package manager maintains its own cache for downloaded packages:
168168
- Windows: `%LocalAppData%\rattler\cache`
169169
- Check location: `pixi info`
170170

171-
**UV**:
171+
**uv**:
172172
- Environment variable: `UV_CACHE_DIR`
173173
- Linux: `~/.cache/uv`
174174
- macOS: `~/.cache/uv`
@@ -188,7 +188,7 @@ Each package manager maintains its own cache for downloaded packages:
188188
To free up disk space, you can clear individual caches:
189189

190190
```bash
191-
# Clear UV cache
191+
# Clear uv cache
192192
uv cache clean
193193

194194
# Clear Pixi/Rattler cache

src/main/java/org/apposed/appose/Appose.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,8 @@ public static MambaBuilder mamba(String source) throws IOException {
292292
}
293293

294294
/**
295-
* Creates a UV-based virtual environment builder.
296-
* UV is a fast Python package installer and resolver.
295+
* Creates a uv-based virtual environment builder.
296+
* uv is a fast Python package installer and resolver.
297297
*
298298
* @return A new UvBuilder instance.
299299
*/
@@ -302,7 +302,7 @@ public static UvBuilder uv() {
302302
}
303303

304304
/**
305-
* Creates a UV-based virtual environment builder from a requirements.txt file.
305+
* Creates a uv-based virtual environment builder from a requirements.txt file.
306306
*
307307
* @param source Path to requirements.txt file.
308308
* @return A new UvBuilder instance.

src/main/java/org/apposed/appose/Builder.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ default T base(String envDir) {
163163
* Adds channels/repositories to search for packages.
164164
* The interpretation of channels is builder-specific; e.g.:
165165
* - Pixi/Mamba: conda channels (e.g., "conda-forge", "bioconda")
166-
* - UV: PyPI index URLs (e.g., custom package indexes)
166+
* - uv: PyPI index URLs (e.g., custom package indexes)
167167
* - Maven: Maven repository URLs
168168
* - npm: npm registries
169169
*
@@ -178,7 +178,7 @@ default T channels(String... channels) {
178178
* Adds channels/repositories to search for packages.
179179
* The interpretation of channels is builder-specific: e.g.:
180180
* - Pixi/Mamba: conda channels (e.g., "conda-forge", "bioconda")
181-
* - UV: PyPI index URLs (e.g., custom package indexes)
181+
* - uv: PyPI index URLs (e.g., custom package indexes)
182182
* - Maven: Maven repository URLs
183183
* - npm: npm registries
184184
*
@@ -276,7 +276,7 @@ default T url(URL url) throws IOException {
276276
* <ul>
277277
* <li>Pixi: flags like {@code --color=always}, {@code -v}</li>
278278
* <li>Mamba: flags like {@code -vv}, {@code --json}</li>
279-
* <li>UV: flags like {@code --color=always}, {@code --verbose}</li>
279+
* <li>uv: flags like {@code --color=always}, {@code --verbose}</li>
280280
* </ul>
281281
* <p>
282282
* Example usage:

src/main/java/org/apposed/appose/builder/MambaBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public Environment build() throws IOException {
7575
throw new IOException("Cannot use MambaBuilder: environment already managed by Pixi at " + envDir);
7676
}
7777
if (new File(envDir, "pyvenv.cfg").exists()) {
78-
throw new IOException("Cannot use MambaBuilder: environment already managed by UV/venv at " + envDir);
78+
throw new IOException("Cannot use MambaBuilder: environment already managed by uv/venv at " + envDir);
7979
}
8080

8181
// Is this envDir an already-existing conda directory?

src/main/java/org/apposed/appose/builder/Tool.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
import java.util.function.Consumer;
4646

4747
/**
48-
* Base class for external tool helpers (Mamba, Pixi, UV, etc.).
48+
* Base class for external tool helpers (Mamba, Pixi, uv, etc.).
4949
* Provides common functionality for process execution, stream handling,
5050
* and progress tracking.
5151
*

src/main/java/org/apposed/appose/builder/Uv.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
import java.util.List;
4343

4444
/**
45-
* UV-based environment manager.
46-
* UV is a fast Python package installer and resolver written in Rust.
45+
* uv-based environment manager.
46+
* uv is a fast Python package installer and resolver written in Rust.
4747
*
4848
* @author Curtis Rueden
4949
* @author Claude Code
@@ -58,13 +58,13 @@ class Uv extends Tool {
5858
/** Path where Appose installs uv by default ({@code .uv} subdirectory thereof). */
5959
public static final String BASE_PATH = Environments.apposeEnvsDir();
6060

61-
/** UV version to download. */
61+
/** uv version to download. */
6262
private static final String UV_VERSION = "0.9.5";
6363

6464
/** The filename to download for the current platform. */
6565
private static final String UV_BINARY = uvBinary();
6666

67-
/** URL from where UV is downloaded to be installed. */
67+
/** URL from where uv is downloaded to be installed. */
6868
public final static String UV_URL = UV_BINARY == null ? null :
6969
"https://github.com/astral-sh/uv/releases/download/" + UV_VERSION + "/" + UV_BINARY;
7070

@@ -93,10 +93,10 @@ private static String uvBinary() {
9393
}
9494

9595
/**
96-
* Create a new {@link Uv} object. The root dir for the UV installation
96+
* Create a new {@link Uv} object. The root dir for the uv installation
9797
* will be the default base path defined at {@link #BASE_PATH}
9898
* <p>
99-
* It is expected that the UV installation has executable commands as shown below:
99+
* It is expected that the uv installation has executable commands as shown below:
100100
* </p>
101101
* <pre>
102102
* UV_ROOT
@@ -110,10 +110,10 @@ public Uv() {
110110
}
111111

112112
/**
113-
* Create a new Uv object. The root dir for UV installation can be
113+
* Create a new Uv object. The root dir for uv installation can be
114114
* specified as {@code String}.
115115
* <p>
116-
* It is expected that the UV installation has executable commands as shown below:
116+
* It is expected that the uv installation has executable commands as shown below:
117117
* </p>
118118
* <pre>
119119
* UV_ROOT
@@ -123,7 +123,7 @@ public Uv() {
123123
* </pre>
124124
*
125125
* @param rootdir
126-
* The root dir for UV installation.
126+
* The root dir for uv installation.
127127
*/
128128
public Uv(final String rootdir) {
129129
super(
@@ -138,13 +138,13 @@ public Uv(final String rootdir) {
138138
protected void decompress(final File archive) throws IOException, InterruptedException {
139139
File uvBaseDir = new File(rootdir);
140140
if (!uvBaseDir.isDirectory() && !uvBaseDir.mkdirs())
141-
throw new IOException("Failed to create UV default directory " +
141+
throw new IOException("Failed to create uv default directory " +
142142
uvBaseDir.getParentFile().getAbsolutePath() +
143143
". Please try installing it in another directory.");
144144

145145
File uvBinDir = Paths.get(rootdir).resolve(".uv").resolve("bin").toFile();
146146
if (!uvBinDir.exists() && !uvBinDir.mkdirs())
147-
throw new IOException("Failed to create UV bin directory: " + uvBinDir);
147+
throw new IOException("Failed to create uv bin directory: " + uvBinDir);
148148

149149
// Extract archive.
150150
Downloads.unpack(archive, uvBinDir);
@@ -201,13 +201,13 @@ protected void decompress(final File archive) throws IOException, InterruptedExc
201201
}
202202

203203
/**
204-
* Create a virtual environment using UV.
204+
* Create a virtual environment using uv.
205205
*
206206
* @param envDir The directory for the virtual environment.
207207
* @param pythonVersion Optional Python version (e.g., "3.11"). Can be null for default.
208208
* @throws IOException If an I/O error occurs.
209209
* @throws InterruptedException If the current thread is interrupted.
210-
* @throws IllegalStateException if UV has not been installed
210+
* @throws IllegalStateException if uv has not been installed
211211
*/
212212
public void createVenv(final File envDir, String pythonVersion) throws IOException, InterruptedException {
213213
List<String> args = new ArrayList<>();
@@ -227,7 +227,7 @@ public void createVenv(final File envDir, String pythonVersion) throws IOExcepti
227227
* @param packages The packages to install.
228228
* @throws IOException If an I/O error occurs.
229229
* @throws InterruptedException If the current thread is interrupted.
230-
* @throws IllegalStateException if UV has not been installed
230+
* @throws IllegalStateException if uv has not been installed
231231
*/
232232
public void pipInstall(final File envDir, String... packages) throws IOException, InterruptedException {
233233
List<String> args = new ArrayList<>();
@@ -246,7 +246,7 @@ public void pipInstall(final File envDir, String... packages) throws IOException
246246
* @param requirementsFile Path to requirements.txt file.
247247
* @throws IOException If an I/O error occurs.
248248
* @throws InterruptedException If the current thread is interrupted.
249-
* @throws IllegalStateException if UV has not been installed
249+
* @throws IllegalStateException if uv has not been installed
250250
*/
251251
public void pipInstallFromRequirements(final File envDir, String requirementsFile) throws IOException, InterruptedException {
252252
exec("pip", "install", "--python", envDir.getAbsolutePath(), "-r", requirementsFile);
@@ -260,7 +260,7 @@ public void pipInstallFromRequirements(final File envDir, String requirementsFil
260260
* @param pythonVersion Optional Python version (e.g., "3.11"). Can be null for default.
261261
* @throws IOException If an I/O error occurs.
262262
* @throws InterruptedException If the current thread is interrupted.
263-
* @throws IllegalStateException if UV has not been installed
263+
* @throws IllegalStateException if uv has not been installed
264264
*/
265265
public void sync(final File projectDir, String pythonVersion) throws IOException, InterruptedException {
266266
List<String> args = new ArrayList<>();

src/main/java/org/apposed/appose/builder/UvBuilder.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
import java.util.List;
4545

4646
/**
47-
* Type-safe builder for UV-based virtual environments.
47+
* Type-safe builder for uv-based virtual environments.
4848
*
4949
* @author Curtis Rueden
5050
*/
@@ -131,7 +131,7 @@ public Environment build() throws IOException {
131131
try {
132132
uv.install();
133133

134-
// Check if this is already a UV virtual environment.
134+
// Check if this is already a uv virtual environment.
135135
boolean isUvVenv = new File(envDir, "pyvenv.cfg").isFile();
136136

137137
if (isUvVenv && sourceContent == null && packages.isEmpty()) {
@@ -203,7 +203,7 @@ public Environment build() throws IOException {
203203
public Environment wrap(File envDir) throws IOException {
204204
FilePaths.ensureDirectory(envDir);
205205

206-
// Check for pyproject.toml first (preferred for UV projects).
206+
// Check for pyproject.toml first (preferred for uv projects).
207207
File pyprojectToml = new File(envDir, "pyproject.toml");
208208
if (pyprojectToml.exists() && pyprojectToml.isFile()) {
209209
// Read the content so rebuild() will work even after directory is deleted.
@@ -247,7 +247,7 @@ private Environment createEnvironment(File envDir) {
247247
File venvDir = new File(envDir, ".venv");
248248
File actualVenvDir = venvDir.exists() ? venvDir : envDir;
249249

250-
// UV virtual environments use standard venv structure.
250+
// uv virtual environments use standard venv structure.
251251
String binDir = Platforms.isWindows() ? "Scripts" : "bin";
252252
List<String> binPaths = Collections.singletonList(
253253
actualVenvDir.toPath().resolve(binDir).toString()

src/main/java/org/apposed/appose/builder/UvBuilderFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ public double priority() {
8484

8585
@Override
8686
public boolean canWrap(java.io.File envDir) {
87-
// Check for UV/venv environment markers.
88-
// UV creates standard Python venv, so look for pyvenv.cfg,
87+
// Check for uv/venv environment markers.
88+
// uv creates standard Python venv, so look for pyvenv.cfg,
8989
// but exclude conda and pixi environments.
9090
boolean hasPyvenvCfg = new java.io.File(envDir, "pyvenv.cfg").isFile();
9191
boolean isNotPixi = !new java.io.File(envDir, ".pixi").isDirectory() &&

0 commit comments

Comments
 (0)