Skip to content

Commit

Permalink
Rename op.yaml -> ops.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
gselzer committed Apr 8, 2024
1 parent 6f99a25 commit a0e2abd
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/ops/doc/WritingYourOwnOpPackage.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The recommended way to declare your Ops is through Javadoc. This approach requir

### Adding the SciJava Ops Indexer to your POM

Ops written through Javadoc are discovered by the SciJava Ops Indexer, which creates a file `op.yaml` containing all of the data needed to import each Op you declare.
Ops written through Javadoc are discovered by the SciJava Ops Indexer, which creates a file `ops.yaml` containing all of the data needed to import each Op you declare.

Until the SciJava Ops annotation processor is integrated into [pom-scijava](https://github.com/scijava/pom-scijava), developers must add the following block of code to the `build` section of their project POM:

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
end

# Read in main and test scope plugin annotations.
['op.yaml', 'META-INF/json/org.scijava.plugin.Plugin'].each do |pluginsPath|
['ops.yaml', 'META-INF/json/org.scijava.plugin.Plugin'].each do |pluginsPath|
mainPluginsPath = "#{basedir}/target/classes/#{pluginsPath}"
testPluginsPath = "#{basedir}/target/test-classes/#{pluginsPath}"
mainPlugins = read_plugins(mainPluginsPath)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public <U> List<U> discover(Class<U> c) {
*/
private List<URL> getOpYAML() {
try {
Enumeration<URL> e = Classes.classLoader().getResources("op.yaml");
Enumeration<URL> e = Classes.classLoader().getResources("ops.yaml");
return Collections.list(e);
}
catch (IOException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ private static List<String> getListHelper(String key,
* @param methodName The method within the base class that will be the Op's
* source
* @param parameterTypes The array of parameters for the given method
* @return A source string that can be written as part of an op.yaml
* @return A source string that can be written as part of an ops.yaml
*/
private static String parseOpSource(String className, String methodName,
Class<?>[] parameterTypes)
Expand Down Expand Up @@ -320,10 +320,10 @@ private static int compareParamCount(Method m1, Method m2) {
}

/**
* Helper method to write an {@link OpData} list to an {@code op.yaml} file.
* Helper method to write an {@link OpData} list to an {@code ops.yaml} file.
*/
private static void outputYamlDoc(String opYaml) throws IOException {
File f = new File("op.yaml");
File f = new File("ops.yaml");
try (OutputStream os = new FileOutputStream(f)) {
os.write(opYaml.getBytes(UTF_8));
}
Expand Down
2 changes: 1 addition & 1 deletion scijava-ops-indexer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public static Double add(final Double d1, final Double d2) {
}
```

This annotation processor might create the following file `op.yaml` within the JAR build by Maven:
This annotation processor might create the following file `ops.yaml` within the JAR build by Maven:

```yaml
- op:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ private void outputYamlDoc(List<OpImplData> collectedData)
FileObject resource = processingEnv.getFiler().createResource( //
StandardLocation.CLASS_OUTPUT, //
"", //
"op.yaml" //
"ops.yaml" //
);
try (OutputStream os = resource.openOutputStream()) {
os.write(doc.getBytes(UTF_8));
Expand Down

0 comments on commit a0e2abd

Please sign in to comment.