Skip to content

Commit

Permalink
Add support for recipe licenses
Browse files Browse the repository at this point in the history
Reworks how all recipe details are shown depending on what license the recipe has.
  • Loading branch information
mike-solomon committed Dec 19, 2024
1 parent ff4853b commit 085693d
Show file tree
Hide file tree
Showing 2,922 changed files with 20,790 additions and 7,458 deletions.
8 changes: 6 additions & 2 deletions docs/recipes/ai/findcommentslanguage.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@ _Finds all comments and uses AI to predict which language the comment is in._

## Recipe source

[GitHub](https://github.com/openrewrite/rewrite-ai-search/blob/main/src/main/java/io/moderne/ai/FindCommentsLanguage.java), [Issue Tracker](https://github.com/openrewrite/rewrite-ai-search/issues), [Maven Central](https://central.sonatype.com/artifact/org.openrewrite.recipe/rewrite-ai-search/)
This recipe is only available to users of [Moderne](https://docs.moderne.io/).

## License

This recipe is available under the [Moderne Proprietary License](https://docs.moderne.io/licensing/overview/).


## Usage

This recipe has no required configuration options. It can be activated by adding a dependency on `org.openrewrite.recipe:rewrite-ai-search` in your build file or by running a shell command (in which case no build changes are needed):
This recipe has no required configuration options. Moderne users can run it via the Moderne CLI:
<Tabs groupId="projectType">


Expand Down
11 changes: 6 additions & 5 deletions docs/recipes/ai/fixmisencodedcommentsinfrench.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@ _Fixes mis-encoded French comments in your code, javadocs and in your pom.xml fi

## Recipe source

[GitHub](https://github.com/openrewrite/rewrite-ai-search/blob/main/src/main/resources/META-INF/rewrite/misencoded-french.yml), [Issue Tracker](https://github.com/openrewrite/rewrite-ai-search/issues), [Maven Central](https://central.sonatype.com/artifact/org.openrewrite.recipe/rewrite-ai-search/)
This recipe is only available to users of [Moderne](https://docs.moderne.io/).

## License

This recipe is available under the [Moderne Proprietary License](https://docs.moderne.io/licensing/overview/).

:::info
This recipe is composed of more than one recipe. If you want to customize the set of recipes this is composed of, you can find and copy the GitHub source for the recipe from the link above.
:::

## Usage

This recipe has no required configuration options. It can be activated by adding a dependency on `org.openrewrite.recipe:rewrite-ai-search` in your build file or by running a shell command (in which case no build changes are needed):
This recipe has no required configuration options. Moderne users can run it via the Moderne CLI:
<Tabs groupId="projectType">


Expand Down
8 changes: 6 additions & 2 deletions docs/recipes/ai/listallmethodsused.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@ _List all methods used in any Java source file._

## Recipe source

[GitHub](https://github.com/openrewrite/rewrite-ai-search/blob/main/src/main/java/io/moderne/ai/ListAllMethodsUsed.java), [Issue Tracker](https://github.com/openrewrite/rewrite-ai-search/issues), [Maven Central](https://central.sonatype.com/artifact/org.openrewrite.recipe/rewrite-ai-search/)
This recipe is only available to users of [Moderne](https://docs.moderne.io/).

## License

This recipe is available under the [Moderne Proprietary License](https://docs.moderne.io/licensing/overview/).


## Usage

This recipe has no required configuration options. It can be activated by adding a dependency on `org.openrewrite.recipe:rewrite-ai-search` in your build file or by running a shell command (in which case no build changes are needed):
This recipe has no required configuration options. Moderne users can run it via the Moderne CLI:
<Tabs groupId="projectType">


Expand Down
17 changes: 10 additions & 7 deletions docs/recipes/ai/research/findcodethatresembles.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ _This recipe uses two phase AI approach to find a method invocation that resembl

## Recipe source

[GitHub](https://github.com/openrewrite/rewrite-ai-search/blob/main/src/main/java/io/moderne/ai/research/FindCodeThatResembles.java), [Issue Tracker](https://github.com/openrewrite/rewrite-ai-search/issues), [Maven Central](https://central.sonatype.com/artifact/org.openrewrite.recipe/rewrite-ai-search/)
This recipe is only available to users of [Moderne](https://docs.moderne.io/).

## Options

Expand All @@ -22,26 +22,29 @@ _This recipe uses two phase AI approach to find a method invocation that resembl
| `String` | resembles | The text, either a natural language description or a code sample, that you are looking for. | `HTTP request with Content-Type application/json` |
| `int` | k | Since AI based matching has a higher latency than rules based matching, we do a first pass to find the top k methods using embeddings. To narrow the scope, you can specify the top k methods as method filters. | `5` |

## License

This recipe is available under the [Moderne Proprietary License](https://docs.moderne.io/licensing/overview/).


## Usage

This recipe has required configuration parameters. Recipes with required configuration parameters cannot be activated directly. To activate this recipe you must create a new recipe which fills in the required parameters. In your `rewrite.yml` create a new recipe with a unique name. For example: `com.yourorg.FindCodeThatResemblesExample`.
Here's how you can define and customize such a recipe within your rewrite.yml:
This recipe has required configuration parameters and can only be run by users of Moderne.
To run this recipe, you will need to provide the Moderne CLI run command with the required options.
Or, if you'd like to create a declarative recipe, please see the below example of a `rewrite.yml` file:

```yaml title="rewrite.yml"
---
type: specs.openrewrite.org/v1beta/recipe
name: com.yourorg.FindCodeThatResemblesExample
displayName: Find method invocations that resemble a pattern example
recipeList:
- io.moderne.ai.research.FindCodeThatResembles:
- io.moderne.ai.research.FindCodeThatResembles:
resembles: HTTP request with Content-Type application/json
k: 5
```
Now that `com.yourorg.FindCodeThatResemblesExample` has been defined, activate it and take a dependency on `org.openrewrite.recipe:rewrite-ai-search:{{VERSION_REWRITE_AI_SEARCH}}` in your build file:
<Tabs groupId="projectType">


<TabItem value="moderne-cli" label="Moderne CLI">
You will need to have configured the [Moderne CLI](https://docs.moderne.io/user-documentation/moderne-cli/getting-started/cli-intro) on your machine before you can run the following command.
Expand Down
17 changes: 10 additions & 7 deletions docs/recipes/ai/research/getcodeembedding.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,36 @@ _This recipe calls an AI model to get an embedding for either classes or methods

## Recipe source

[GitHub](https://github.com/openrewrite/rewrite-ai-search/blob/main/src/main/java/io/moderne/ai/research/GetCodeEmbedding.java), [Issue Tracker](https://github.com/openrewrite/rewrite-ai-search/issues), [Maven Central](https://central.sonatype.com/artifact/org.openrewrite.recipe/rewrite-ai-search/)
This recipe is only available to users of [Moderne](https://docs.moderne.io/).

## Options

| Type | Name | Description | Example |
| -- | -- | -- | -- |
| `String` | codeSnippetType | Choose whether you want to get an embedding for the classes or methods. Valid options: `methods`, `classes` | `methods` |

## License

This recipe is available under the [Moderne Proprietary License](https://docs.moderne.io/licensing/overview/).


## Usage

This recipe has required configuration parameters. Recipes with required configuration parameters cannot be activated directly. To activate this recipe you must create a new recipe which fills in the required parameters. In your `rewrite.yml` create a new recipe with a unique name. For example: `com.yourorg.GetCodeEmbeddingExample`.
Here's how you can define and customize such a recipe within your rewrite.yml:
This recipe has required configuration parameters and can only be run by users of Moderne.
To run this recipe, you will need to provide the Moderne CLI run command with the required options.
Or, if you'd like to create a declarative recipe, please see the below example of a `rewrite.yml` file:

```yaml title="rewrite.yml"
---
type: specs.openrewrite.org/v1beta/recipe
name: com.yourorg.GetCodeEmbeddingExample
displayName: Get embeddings for code snippets in code example
recipeList:
- io.moderne.ai.research.GetCodeEmbedding:
- io.moderne.ai.research.GetCodeEmbedding:
codeSnippetType: methods
```
Now that `com.yourorg.GetCodeEmbeddingExample` has been defined, activate it and take a dependency on `org.openrewrite.recipe:rewrite-ai-search:{{VERSION_REWRITE_AI_SEARCH}}` in your build file:
<Tabs groupId="projectType">


<TabItem value="moderne-cli" label="Moderne CLI">
You will need to have configured the [Moderne CLI](https://docs.moderne.io/user-documentation/moderne-cli/getting-started/cli-intro) on your machine before you can run the following command.
Expand Down
17 changes: 10 additions & 7 deletions docs/recipes/ai/research/getrecommendations.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ _This recipe calls an AI model to get recommendations for modernizing the code b

## Recipe source

[GitHub](https://github.com/openrewrite/rewrite-ai-search/blob/main/src/main/java/io/moderne/ai/research/GetRecommendations.java), [Issue Tracker](https://github.com/openrewrite/rewrite-ai-search/issues), [Maven Central](https://central.sonatype.com/artifact/org.openrewrite.recipe/rewrite-ai-search/)
This recipe is only available to users of [Moderne](https://docs.moderne.io/).

## Options

Expand All @@ -22,26 +22,29 @@ _This recipe calls an AI model to get recommendations for modernizing the code b
| `Boolean` | randomSampling | Do random sampling or use clusters based on embeddings to sample. | |
| `int` | numberOfCenters | *Optional*. Number of diverse centers to sample if you don't do random sampling per repository. | `3` |

## License

This recipe is available under the [Moderne Proprietary License](https://docs.moderne.io/licensing/overview/).


## Usage

This recipe has required configuration parameters. Recipes with required configuration parameters cannot be activated directly. To activate this recipe you must create a new recipe which fills in the required parameters. In your `rewrite.yml` create a new recipe with a unique name. For example: `com.yourorg.GetRecommendationsExample`.
Here's how you can define and customize such a recipe within your rewrite.yml:
This recipe has required configuration parameters and can only be run by users of Moderne.
To run this recipe, you will need to provide the Moderne CLI run command with the required options.
Or, if you'd like to create a declarative recipe, please see the below example of a `rewrite.yml` file:

```yaml title="rewrite.yml"
---
type: specs.openrewrite.org/v1beta/recipe
name: com.yourorg.GetRecommendationsExample
displayName: Get recommendations example
recipeList:
- io.moderne.ai.research.GetRecommendations:
- io.moderne.ai.research.GetRecommendations:
randomSampling: null
numberOfCenters: 3
```
Now that `com.yourorg.GetRecommendationsExample` has been defined, activate it and take a dependency on `org.openrewrite.recipe:rewrite-ai-search:{{VERSION_REWRITE_AI_SEARCH}}` in your build file:
<Tabs groupId="projectType">


<TabItem value="moderne-cli" label="Moderne CLI">
You will need to have configured the [Moderne CLI](https://docs.moderne.io/user-documentation/moderne-cli/getting-started/cli-intro) on your machine before you can run the following command.
Expand Down
8 changes: 6 additions & 2 deletions docs/recipes/ai/spellcheckcommentsinfrench.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@ _Use spellchecker to fix mis-encoded French comments. Mis-encoded comments will

## Recipe source

[GitHub](https://github.com/openrewrite/rewrite-ai-search/blob/main/src/main/java/io/moderne/ai/SpellCheckCommentsInFrench.java), [Issue Tracker](https://github.com/openrewrite/rewrite-ai-search/issues), [Maven Central](https://central.sonatype.com/artifact/org.openrewrite.recipe/rewrite-ai-search/)
This recipe is only available to users of [Moderne](https://docs.moderne.io/).

## License

This recipe is available under the [Moderne Proprietary License](https://docs.moderne.io/licensing/overview/).


## Usage

This recipe has no required configuration options. It can be activated by adding a dependency on `org.openrewrite.recipe:rewrite-ai-search` in your build file or by running a shell command (in which case no build changes are needed):
This recipe has no required configuration options. Moderne users can run it via the Moderne CLI:
<Tabs groupId="projectType">


Expand Down
8 changes: 6 additions & 2 deletions docs/recipes/ai/spellcheckcommentsinfrenchpomxml.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@ _Use spellchecker to fix mis-encoded French comments in pom.xml files. Mis-encod

## Recipe source

[GitHub](https://github.com/openrewrite/rewrite-ai-search/blob/main/src/main/java/io/moderne/ai/SpellCheckCommentsInFrenchPomXml.java), [Issue Tracker](https://github.com/openrewrite/rewrite-ai-search/issues), [Maven Central](https://central.sonatype.com/artifact/org.openrewrite.recipe/rewrite-ai-search/)
This recipe is only available to users of [Moderne](https://docs.moderne.io/).

## License

This recipe is available under the [Moderne Proprietary License](https://docs.moderne.io/licensing/overview/).


## Usage

This recipe has no required configuration options. It can be activated by adding a dependency on `org.openrewrite.recipe:rewrite-ai-search` in your build file or by running a shell command (in which case no build changes are needed):
This recipe has no required configuration options. Moderne users can run it via the Moderne CLI:
<Tabs groupId="projectType">


Expand Down
11 changes: 8 additions & 3 deletions docs/recipes/ai/timefold/solver/migration/changeversion.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,16 @@ _Replaces the version of Timefold_

## Recipe source

[GitHub](https://github.com/search?type=code&q=ai.timefold.solver.migration.ChangeVersion), [Issue Tracker](https://github.com/openrewrite/rewrite-third-party/issues), [Maven Central](https://central.sonatype.com/artifact/org.openrewrite.recipe/rewrite-third-party/)

[GitHub](https://github.com/search?type=code&q=ai.timefold.solver.migration.ChangeVersion),
[Issue Tracker](https://github.com/openrewrite/rewrite-third-party/issues),
[Maven Central](https://central.sonatype.com/artifact/org.openrewrite.recipe/rewrite-third-party/)
:::info
This recipe is composed of more than one recipe. If you want to customize the set of recipes this is composed of, you can find and copy the GitHub source for the recipe from the link above.
:::
## License

This recipe is available under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).


## Definition

Expand Down Expand Up @@ -92,7 +97,7 @@ recipeList:

## Usage

This recipe has no required configuration options. It can be activated by adding a dependency on `org.openrewrite.recipe:rewrite-third-party` in your build file or by running a shell command (in which case no build changes are needed):
This recipe has no required configuration options. It can be activated by adding a dependency on `org.openrewrite.recipe:rewrite-third-party` in your build file or by running a shell command (in which case no build changes are needed):
<Tabs groupId="projectType">
<TabItem value="gradle" label="Gradle">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,16 @@ _Migrate all Maven and Gradle groupIds and artifactIds from OptaPlanner to Timef

## Recipe source

[GitHub](https://github.com/search?type=code&q=ai.timefold.solver.migration.fork.TimefoldChangeDependencies), [Issue Tracker](https://github.com/openrewrite/rewrite-third-party/issues), [Maven Central](https://central.sonatype.com/artifact/org.openrewrite.recipe/rewrite-third-party/)

[GitHub](https://github.com/search?type=code&q=ai.timefold.solver.migration.fork.TimefoldChangeDependencies),
[Issue Tracker](https://github.com/openrewrite/rewrite-third-party/issues),
[Maven Central](https://central.sonatype.com/artifact/org.openrewrite.recipe/rewrite-third-party/)
:::info
This recipe is composed of more than one recipe. If you want to customize the set of recipes this is composed of, you can find and copy the GitHub source for the recipe from the link above.
:::
## License

This recipe is available under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).


## Definition

Expand Down Expand Up @@ -1522,7 +1527,7 @@ recipeList:

## Usage

This recipe has no required configuration options. It can be activated by adding a dependency on `org.openrewrite.recipe:rewrite-third-party` in your build file or by running a shell command (in which case no build changes are needed):
This recipe has no required configuration options. It can be activated by adding a dependency on `org.openrewrite.recipe:rewrite-third-party` in your build file or by running a shell command (in which case no build changes are needed):
<Tabs groupId="projectType">
<TabItem value="gradle" label="Gradle">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,16 @@ _Replaces your method/field calls, GAVs, etc. To replace deprecated methods too,

## Recipe source

[GitHub](https://github.com/search?type=code&q=ai.timefold.solver.migration.FromOptaPlannerToTimefoldSolver), [Issue Tracker](https://github.com/openrewrite/rewrite-third-party/issues), [Maven Central](https://central.sonatype.com/artifact/org.openrewrite.recipe/rewrite-third-party/)

[GitHub](https://github.com/search?type=code&q=ai.timefold.solver.migration.FromOptaPlannerToTimefoldSolver),
[Issue Tracker](https://github.com/openrewrite/rewrite-third-party/issues),
[Maven Central](https://central.sonatype.com/artifact/org.openrewrite.recipe/rewrite-third-party/)
:::info
This recipe is composed of more than one recipe. If you want to customize the set of recipes this is composed of, you can find and copy the GitHub source for the recipe from the link above.
:::
## License

This recipe is available under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).


## Definition

Expand Down Expand Up @@ -240,7 +245,7 @@ recipeList:

## Usage

This recipe has no required configuration options. It can be activated by adding a dependency on `org.openrewrite.recipe:rewrite-third-party` in your build file or by running a shell command (in which case no build changes are needed):
This recipe has no required configuration options. It can be activated by adding a dependency on `org.openrewrite.recipe:rewrite-third-party` in your build file or by running a shell command (in which case no build changes are needed):
<Tabs groupId="projectType">
<TabItem value="gradle" label="Gradle">

Expand Down
11 changes: 8 additions & 3 deletions docs/recipes/ai/timefold/solver/migration/tolatest.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,16 @@ _Replace all your calls to deleted/deprecated types and methods of Timefold Solv

## Recipe source

[GitHub](https://github.com/search?type=code&q=ai.timefold.solver.migration.ToLatest), [Issue Tracker](https://github.com/openrewrite/rewrite-third-party/issues), [Maven Central](https://central.sonatype.com/artifact/org.openrewrite.recipe/rewrite-third-party/)

[GitHub](https://github.com/search?type=code&q=ai.timefold.solver.migration.ToLatest),
[Issue Tracker](https://github.com/openrewrite/rewrite-third-party/issues),
[Maven Central](https://central.sonatype.com/artifact/org.openrewrite.recipe/rewrite-third-party/)
:::info
This recipe is composed of more than one recipe. If you want to customize the set of recipes this is composed of, you can find and copy the GitHub source for the recipe from the link above.
:::
## License

This recipe is available under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).


## Definition

Expand Down Expand Up @@ -104,7 +109,7 @@ recipeList:

## Usage

This recipe has no required configuration options. It can be activated by adding a dependency on `org.openrewrite.recipe:rewrite-third-party` in your build file or by running a shell command (in which case no build changes are needed):
This recipe has no required configuration options. It can be activated by adding a dependency on `org.openrewrite.recipe:rewrite-third-party` in your build file or by running a shell command (in which case no build changes are needed):
<Tabs groupId="projectType">
<TabItem value="gradle" label="Gradle">

Expand Down
Loading

0 comments on commit 085693d

Please sign in to comment.