Skip to content

Commit f9b6657

Browse files
committed
Add missing period terminators to line comments
1 parent 99e5900 commit f9b6657

29 files changed

+240
-239
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,9 @@ public static void main(String... args) {
183183
Binding binding = new Binding();
184184
GroovyShell shell = new GroovyShell(binding);
185185
shell.evaluate(initCode);
186-
// Store all variables from the init script for use in tasks
186+
// Store all variables from the init script for use in tasks.
187187
initVars.putAll(binding.getVariables());
188-
// Clean up the temp file
188+
// Clean up the temp file.
189189
initFile.delete();
190190
}
191191
catch (Exception e) {

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public String name() {
7070
public Environment build() throws IOException {
7171
File envDir = envDir();
7272

73-
// Check for incompatible existing environments
73+
// Check for incompatible existing environments.
7474
if (new File(envDir, ".pixi").isDirectory()) {
7575
throw new IOException("Cannot use MambaBuilder: environment already managed by Pixi at " + envDir);
7676
}
@@ -81,16 +81,16 @@ public Environment build() throws IOException {
8181
// Is this envDir an already-existing conda directory?
8282
boolean isCondaDir = new File(envDir, "conda-meta").isDirectory();
8383
if (isCondaDir) {
84-
// Environment already exists, just wrap it
84+
// Environment already exists, just wrap it.
8585
return createEnvironment(envDir);
8686
}
8787

88-
// Building a new environment - config content is required
88+
// Building a new environment - config content is required.
8989
if (sourceContent == null) {
9090
throw new IllegalStateException("No source specified for MambaBuilder. Use .file() or .content()");
9191
}
9292

93-
// Infer scheme if not explicitly set
93+
// Infer scheme if not explicitly set.
9494
if (scheme == null) scheme = Schemes.fromContent(sourceContent).name();
9595

9696
if (!"environment.yml".equals(scheme)) {
@@ -110,7 +110,7 @@ public Environment build() throws IOException {
110110
mamba.setEnvVars(envVars);
111111
mamba.setFlags(flags);
112112

113-
// Check for unsupported features
113+
// Check for unsupported features.
114114
if (!channels.isEmpty()) {
115115
throw new UnsupportedOperationException(
116116
"MambaBuilder does not yet support programmatic channel configuration. " +
@@ -120,15 +120,15 @@ public Environment build() throws IOException {
120120
try {
121121
mamba.install();
122122

123-
// Two-step build: create empty env, write config, then update
124-
// Step 1: Create empty environment
123+
// Two-step build: create empty env, write config, then update.
124+
// Step 1: Create empty environment.
125125
mamba.create(envDir);
126126

127-
// Step 2: Write environment.yml to envDir
127+
// Step 2: Write environment.yml to envDir.
128128
File envYaml = new File(envDir, "environment.yml");
129129
Files.write(envYaml.toPath(), sourceContent.getBytes(StandardCharsets.UTF_8));
130130

131-
// Step 3: Update environment from yml
131+
// Step 3: Update environment from yml.
132132
mamba.update(envDir, envYaml);
133133

134134
return createEnvironment(envDir);
@@ -141,14 +141,14 @@ public Environment build() throws IOException {
141141
public Environment wrap(File envDir) throws IOException {
142142
FilePaths.ensureDirectory(envDir);
143143

144-
// Look for environment.yml configuration file
144+
// Look for environment.yml configuration file.
145145
File envYaml = new File(envDir, "environment.yml");
146146
if (envYaml.exists() && envYaml.isFile()) {
147-
// Read the content so rebuild() will work even after directory is deleted
147+
// Read the content so rebuild() will work even after directory is deleted.
148148
sourceContent = new String(Files.readAllBytes(envYaml.toPath()), StandardCharsets.UTF_8);
149149
}
150150

151-
// Set the base directory and build (which will detect existing env)
151+
// Set the base directory and build (which will detect existing env).
152152
base(envDir);
153153
return build();
154154
}

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
* @author Curtis Rueden
4141
*/
4242
public class MambaBuilderFactory implements BuilderFactory {
43+
4344
@Override
4445
public Builder<?> createBuilder() {
4546
return new MambaBuilder();
@@ -67,7 +68,7 @@ public boolean supportsScheme(String scheme) {
6768

6869
@Override
6970
public boolean supportsSource(String source) {
70-
// Support YAML environment files
71+
// Support YAML environment files.
7172
return source.endsWith(".yml") || source.endsWith(".yaml");
7273
}
7374

@@ -78,7 +79,7 @@ public double priority() {
7879

7980
@Override
8081
public boolean canWrap(java.io.File envDir) {
81-
// Check for conda/mamba environment marker
82+
// Check for conda/mamba environment marker.
8283
return new java.io.File(envDir, "conda-meta").isDirectory();
8384
}
8485
}

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

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public String name() {
9898
public Environment build() throws IOException {
9999
File envDir = envDir();
100100

101-
// Check for incompatible existing environments
101+
// Check for incompatible existing environments.
102102
if (new File(envDir, "conda-meta").exists() && !new File(envDir, ".pixi").exists()) {
103103
throw new IOException("Cannot use PixiBuilder: environment already managed by Mamba/Conda at " + envDir);
104104
}
@@ -122,53 +122,53 @@ public Environment build() throws IOException {
122122
try {
123123
pixi.install();
124124

125-
// Check if this is already a pixi project
125+
// Check if this is already a pixi project.
126126
boolean isPixiDir = new File(envDir, "pixi.toml").isFile() ||
127127
new File(envDir, "pyproject.toml").isFile() ||
128128
new File(envDir, ".pixi").isDirectory();
129129

130130
if (isPixiDir && sourceContent == null && condaPackages.isEmpty() && pypiPackages.isEmpty()) {
131-
// Environment already exists, just use it
131+
// Environment already exists, just use it.
132132
return createEnvironment(pixi, envDir);
133133
}
134134

135-
// Handle source-based build (file or content)
135+
// Handle source-based build (file or content).
136136
if (sourceContent != null) {
137137
if (isPixiDir) {
138-
// Already initialized, just use it
138+
// Already initialized, just use it.
139139
return createEnvironment(pixi, envDir);
140140
}
141141

142-
// Infer scheme if not explicitly set
142+
// Infer scheme if not explicitly set.
143143
if (scheme == null) scheme = Schemes.fromContent(sourceContent).name();
144144

145145
if (!envDir.exists() && !envDir.mkdirs()) {
146146
throw new IOException("Failed to create environment directory: " + envDir);
147147
}
148148

149149
if ("pixi.toml".equals(scheme)) {
150-
// Write pixi.toml to envDir
150+
// Write pixi.toml to envDir.
151151
File pixiTomlFile = new File(envDir, "pixi.toml");
152152
Files.write(pixiTomlFile.toPath(), sourceContent.getBytes(StandardCharsets.UTF_8));
153153
} else if ("pyproject.toml".equals(scheme)) {
154-
// Write pyproject.toml to envDir (Pixi natively supports it)
154+
// Write pyproject.toml to envDir (Pixi natively supports it).
155155
File pyprojectTomlFile = new File(envDir, "pyproject.toml");
156156
Files.write(pyprojectTomlFile.toPath(), sourceContent.getBytes(StandardCharsets.UTF_8));
157157
} else if ("environment.yml".equals(scheme)) {
158-
// Write environment.yml and import
158+
// Write environment.yml and import.
159159
File environmentYamlFile = new File(envDir, "environment.yml");
160160
Files.write(environmentYamlFile.toPath(), sourceContent.getBytes(StandardCharsets.UTF_8));
161161
pixi.exec("init", "--import", environmentYamlFile.getAbsolutePath(), envDir.getAbsolutePath());
162162
}
163163

164-
// Add any programmatic channels to augment source file
164+
// Add any programmatic channels to augment source file.
165165
if (!channels.isEmpty()) {
166166
pixi.addChannels(envDir, channels.toArray(new String[0]));
167167
}
168168
} else {
169-
// Programmatic package building
169+
// Programmatic package building.
170170
if (isPixiDir) {
171-
// Already initialized, just use it
171+
// Already initialized, just use it.
172172
return createEnvironment(pixi, envDir);
173173
}
174174

@@ -178,7 +178,7 @@ public Environment build() throws IOException {
178178

179179
pixi.init(envDir);
180180

181-
// Fail fast for vacuous environments
181+
// Fail fast for vacuous environments.
182182
if (condaPackages.isEmpty() && pypiPackages.isEmpty()) {
183183
throw new IllegalStateException(
184184
"Cannot build empty environment programmatically. " +
@@ -226,23 +226,23 @@ public Environment build() throws IOException {
226226
public Environment wrap(File envDir) throws IOException {
227227
FilePaths.ensureDirectory(envDir);
228228

229-
// Look for pixi.toml configuration file first
229+
// Look for pixi.toml configuration file first.
230230
File pixiToml = new File(envDir, "pixi.toml");
231231
if (pixiToml.exists() && pixiToml.isFile()) {
232-
// Read the content so rebuild() will work even after directory is deleted
232+
// Read the content so rebuild() will work even after directory is deleted.
233233
sourceContent = new String(Files.readAllBytes(pixiToml.toPath()), StandardCharsets.UTF_8);
234234
scheme = "pixi.toml";
235235
} else {
236-
// Check for pyproject.toml
236+
// Check for pyproject.toml.
237237
File pyprojectToml = new File(envDir, "pyproject.toml");
238238
if (pyprojectToml.exists() && pyprojectToml.isFile()) {
239-
// Read the content so rebuild() will work even after directory is deleted
239+
// Read the content so rebuild() will work even after directory is deleted.
240240
sourceContent = new String(Files.readAllBytes(pyprojectToml.toPath()), StandardCharsets.UTF_8);
241241
scheme = "pyproject.toml";
242242
}
243243
}
244244

245-
// Set the base directory and build (which will detect existing env)
245+
// Set the base directory and build (which will detect existing env).
246246
base(envDir);
247247
return build();
248248
}
@@ -262,7 +262,7 @@ public PixiBuilder channels(String... channels) {
262262

263263
private Environment createEnvironment(Pixi pixi, File envDir) {
264264
String base = envDir.getAbsolutePath();
265-
// Check which manifest file exists (pyproject.toml takes precedence)
265+
// Check which manifest file exists (pyproject.toml takes precedence).
266266
File manifestFile = new File(envDir, "pyproject.toml");
267267
if (!manifestFile.exists()) manifestFile = new File(envDir, "pixi.toml");
268268
List<String> launchArgs = Arrays.asList(

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public boolean supportsScheme(String scheme) {
7575

7676
@Override
7777
public boolean supportsSource(String source) {
78-
// Support pixi.toml and YAML environment files
78+
// Support pixi.toml and YAML environment files.
7979
return source.endsWith("pixi.toml") ||
8080
source.endsWith(".yml") ||
8181
source.endsWith(".yaml");
@@ -88,7 +88,7 @@ public double priority() {
8888

8989
@Override
9090
public boolean canWrap(java.io.File envDir) {
91-
// Check for pixi environment markers
91+
// Check for pixi environment markers.
9292
return new java.io.File(envDir, ".pixi").isDirectory() ||
9393
new java.io.File(envDir, "pixi.toml").isFile();
9494
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public SimpleBuilder inheritRunningJava() {
107107
if (javaHome != null) {
108108
File javaHomeBin = new File(javaHome, "bin");
109109
if (javaHomeBin.isDirectory()) {
110-
// Prepend to beginning of list for highest priority
110+
// Prepend to beginning of list for highest priority.
111111
customBinPaths.add(0, javaHomeBin.getAbsolutePath());
112112
}
113113
envVars.put("JAVA_HOME", javaHome);
@@ -127,7 +127,7 @@ public Environment build() throws IOException {
127127
File base = envDir();
128128
if (base == null) base = new File(".");
129129

130-
// Create directory if it doesn't exist
130+
// Create directory if it doesn't exist.
131131
if (!base.exists() && !base.mkdirs()) {
132132
throw new IOException("Failed to create base directory: " + base);
133133
}
@@ -136,13 +136,13 @@ public Environment build() throws IOException {
136136
List<String> launchArgs = new ArrayList<>();
137137
List<String> binPaths = new ArrayList<>();
138138

139-
// Add bin directory from the environment itself (highest priority)
139+
// Add bin directory from the environment itself (highest priority).
140140
File binDir = new File(base, "bin");
141141
if (binDir.isDirectory()) {
142142
binPaths.add(binDir.getAbsolutePath());
143143
}
144144

145-
// Add custom binary paths configured via builder methods
145+
// Add custom binary paths configured via builder methods.
146146
binPaths.addAll(customBinPaths);
147147

148148
Map<String, String> environmentVars = new HashMap<>(envVars);

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -146,46 +146,46 @@ protected void decompress(final File archive) throws IOException, InterruptedExc
146146
if (!uvBinDir.exists() && !uvBinDir.mkdirs())
147147
throw new IOException("Failed to create UV bin directory: " + uvBinDir);
148148

149-
// Extract archive
149+
// Extract archive.
150150
Downloads.unpack(archive, uvBinDir);
151151

152152
String uvBinaryName = Platforms.isWindows() ? "uv.exe" : "uv";
153153
File uvDest = new File(command);
154154

155-
// Check if uv binary is directly in bin dir (Windows ZIP case)
155+
// Check if uv binary is directly in bin dir (Windows ZIP case).
156156
File uvDirectly = new File(uvBinDir, uvBinaryName);
157157
if (uvDirectly.exists()) {
158-
// Windows case: binaries are directly in uvBinDir
159-
// Just ensure uv.exe is in the right place (uvCommand)
158+
// Windows case: binaries are directly in uvBinDir.
159+
// Just ensure uv.exe is in the right place (uvCommand).
160160
if (!uvDirectly.equals(uvDest) && !uvDirectly.renameTo(uvDest)) {
161161
throw new IOException("Failed to move uv binary from " + uvDirectly + " to " + uvDest);
162162
}
163-
// uvw.exe and uvx.exe are already in the right place (uvBinDir)
163+
// uvw.exe and uvx.exe are already in the right place (uvBinDir).
164164
} else {
165-
// Linux/macOS case: binaries are in uv-<platform>/ subdirectory
165+
// Linux/macOS case: binaries are in uv-<platform>/ subdirectory.
166166
File[] platformDirs = uvBinDir.listFiles(f -> f.isDirectory() && f.getName().startsWith("uv-"));
167167
if (platformDirs == null || platformDirs.length == 0) {
168168
throw new IOException("Expected uv binary or uv-<platform> directory not found in: " + uvBinDir);
169169
}
170170

171171
File platformDir = platformDirs[0];
172172

173-
// Move all binaries from platform subdirectory to bin directory
173+
// Move all binaries from platform subdirectory to bin directory.
174174
File[] binaries = platformDir.listFiles();
175175
if (binaries != null) {
176176
for (File binary : binaries) {
177177
File dest = new File(uvBinDir, binary.getName());
178178
if (!binary.renameTo(dest)) {
179179
throw new IOException("Failed to move " + binary.getName() + " from " + binary + " to " + dest);
180180
}
181-
// Set executable permission
181+
// Set executable permission.
182182
if (!dest.canExecute()) {
183183
dest.setExecutable(true);
184184
}
185185
}
186186
}
187187

188-
// Clean up the now-empty platform directory
188+
// Clean up the now-empty platform directory.
189189
if (!platformDir.delete()) {
190190
throw new IOException("Failed to delete platform directory: " + platformDir);
191191
}

0 commit comments

Comments
 (0)