Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

up #88

Merged
merged 46 commits into from
May 1, 2024
Merged

up #88

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
4e19ffa
Merge pull request #72 from brenoepics/dev
brenoepics Mar 2, 2024
0bcb4fc
ci: fix qodana.yml path
brenoepics Mar 2, 2024
db72c25
ci(qodana): fix args
brenoepics Mar 2, 2024
3c8bf83
ci: Update qodana.yml
brenoepics Mar 2, 2024
4933942
build(deps-dev): bump org.mockito:mockito-core from 5.10.0 to 5.11.0
dependabot[bot] Mar 4, 2024
e69b7b8
build(deps): bump org.sonatype.central:central-publishing-maven-plugin
dependabot[bot] Mar 4, 2024
219e776
Merge pull request #74 from brenoepics/dependabot/maven/org.sonatype.…
brenoepics Mar 4, 2024
bbf44d6
Merge pull request #73 from brenoepics/dependabot/maven/org.mockito-m…
brenoepics Mar 4, 2024
ce90253
docs(theme): bump vitepress-carbon
brenoepics Mar 4, 2024
f0dc9ac
ci(maven-publish): add publish profile
brenoepics Mar 4, 2024
92e3a0a
build(deps): bump com.fasterxml.jackson.core:jackson-databind
dependabot[bot] Mar 11, 2024
87e1a4f
build(deps): bump org.apache.logging.log4j:log4j-api
dependabot[bot] Mar 11, 2024
de1b162
chore: move distribution management
brenoepics Mar 11, 2024
6289e75
chore: move distribution management to settings.xml
brenoepics Mar 11, 2024
b388edc
Revert "chore: move distribution management"
brenoepics Mar 11, 2024
37ce31b
Revert "chore: move distribution management to settings.xml"
brenoepics Mar 11, 2024
f9739db
Merge pull request #76 from brenoepics/dependabot/maven/com.fasterxml…
brenoepics Mar 12, 2024
45206e3
Merge pull request #77 from brenoepics/dependabot/maven/org.apache.lo…
brenoepics Mar 12, 2024
55c1b59
build(deps): bump com.fasterxml.jackson.core:jackson-databind
dependabot[bot] Mar 18, 2024
2e92c7c
build(deps): bump org.jacoco:jacoco-maven-plugin from 0.8.11 to 0.8.12
dependabot[bot] Apr 8, 2024
102d7ec
build(deps): bump org.apache.maven.plugins:maven-source-plugin
dependabot[bot] Apr 8, 2024
15b9e1a
build(deps): bump org.apache.maven.plugins:maven-jar-plugin
dependabot[bot] Apr 22, 2024
ee82056
build(deps): bump org.apache.maven.plugins:maven-gpg-plugin
dependabot[bot] Apr 22, 2024
aa5f44a
Merge pull request #87 from brenoepics/dependabot/maven/org.apache.ma…
brenoepics Apr 30, 2024
724a9c9
Merge pull request #86 from brenoepics/dependabot/maven/org.apache.ma…
brenoepics Apr 30, 2024
5d9ed17
Merge pull request #84 from brenoepics/dependabot/maven/org.apache.ma…
brenoepics Apr 30, 2024
a1bb2f7
Merge pull request #83 from brenoepics/dependabot/maven/org.jacoco-ja…
brenoepics Apr 30, 2024
25a0889
Merge pull request #80 from brenoepics/dependabot/maven/com.fasterxml…
brenoepics Apr 30, 2024
48b0052
ci: cleanup
brenoepics Apr 30, 2024
d05deff
docs: fix common errors highlight color
brenoepics Apr 30, 2024
baf6344
chore: cleanup readme
brenoepics Apr 30, 2024
bad4e06
docs: table caption
brenoepics Apr 30, 2024
5883131
test: add httpResponseCode test case
brenoepics Apr 30, 2024
088360b
chore: bump version
brenoepics Apr 30, 2024
f0c682e
Google Java Format
Apr 30, 2024
97cb23f
refactor: log4j-api to slf4j-api
brenoepics Apr 30, 2024
2a32a98
Merge branch 'main' of https://github.com/brenoepics/at4j
brenoepics Apr 30, 2024
ea90695
Google Java Format
Apr 30, 2024
9d7c006
feat: optional thread executor
brenoepics Apr 30, 2024
d1a8936
Merge branch 'main' of https://github.com/brenoepics/at4j
brenoepics Apr 30, 2024
b11b40f
Google Java Format
Apr 30, 2024
7e8ed37
docs: update carbon
brenoepics Apr 30, 2024
c8a9620
Merge branch 'main' of https://github.com/brenoepics/at4j
brenoepics Apr 30, 2024
610c7b4
tests: add executorService test
brenoepics Apr 30, 2024
3ab9a91
Google Java Format
Apr 30, 2024
8ff73cb
ci: check licenses
brenoepics May 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions .github/workflows/greetings.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

- name: Release With Maven
run: |
mvn -s settings.xml -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} --batch-mode deploy -DskipTests
mvn -s settings.xml -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} --batch-mode deploy -DskipTests -P publish
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
45 changes: 0 additions & 45 deletions .github/workflows/qodana.yml

This file was deleted.

11 changes: 11 additions & 0 deletions .licrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[licenses]
accepted = ["Apache-2.0", "MIT", "MSC", "BSD"]

[dependencies]
ignored=["ignored_dep1", "ignored_dep2"]
ignore_dev_dependencies = true
ignore_optional_dependencies = true

[behavior]
run_only_on_dependency_modification = true
do_not_block_pr = false
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,8 @@ libraryDependencies += "io.github.brenoepics" % "at4j" % "1.0.0"

**A:** You can access your Azure Translator Keys through your Azure portal. Remember to keep your keys secure and refrain from sharing them publicly. If you suspect a key has been compromised, it's crucial to regenerate it promptly. For detailed instructions on generating your own keys, refer to [this guide](https://brenoepics.github.io/at4j/guide/azure-subscription.html#azure-subscription). Additionally, you can explore the [Azure Free Tier](https://brenoepics.github.io/at4j/guide/azure-subscription.html#azure-free-tier) for more information.

Optional Logger Dependency
**Q:** Is there a recommended logger dependency for the project?

**A:** While our project is compatible with any Log4j-2-compatible logging framework, integrating one can enhance your logging experience significantly. This allows you to configure log format, log targets (console, file, database, etc.), log levels per class, and more. For further details, please visit our [Docs](https://brenoepics.github.io/at4j/guide/installation.html#logger-dependency).

## 🤝 Thank You!
- **Microsoft Azure**: Supporting our project with a generous grant of $10,000+ in Azure credits, enabling us to utilize virtual machines, document translation and other essential cloud resources for our development needs.
- **Microsoft Azure**: Supporting our project with a generous grant of $10,000+ in Azure credits, enabling us to use virtual machines, document translation and other essential cloud resources for our development needs.
- We extend our sincere thanks to all contributors for their invaluable contributions.

## 🧑‍💻 Contributing
Expand Down
34 changes: 19 additions & 15 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
import { defineConfigWithTheme } from 'vitepress'
import type { ThemeConfig } from 'vitepress-carbon'
import {defineConfigWithTheme} from 'vitepress'
import type {ThemeConfig} from 'vitepress-carbon'
import baseConfig from 'vitepress-carbon/config'

const nav = [
{
text: 'Docs',
activeMatch: `^/(guide|examples)/`,
items: [
{ text: 'Guide', link: '/guide/introduction' },
{ text: 'Examples', link: '/examples/' },
{ text: 'Error Reference', link: '/error-reference/' },
{ text: 'JavaDoc', link: 'https://brenoepics.github.io/at4j/javadoc/' }
{text: 'Guide', link: '/guide/introduction'},
{text: 'Examples', link: '/examples/'},
{text: 'Error Reference', link: '/error-reference/'},
{text: 'JavaDoc', link: 'https://brenoepics.github.io/at4j/javadoc/'}
]
},
{
text: 'About',
activeMatch: `^/about/`,
items: [
{ text: 'FAQ', link: '/about/faq' },
{ text: 'Releases', link: '/about/releases' },
{ text: 'Code of Conduct', link: '/about/coc' }
{text: 'FAQ', link: '/about/faq'},
{text: 'Releases', link: '/about/releases'},
{text: 'Code of Conduct', link: '/about/coc'}
]
},
]
Expand All @@ -28,7 +28,7 @@ const sidebar = {
{
text: 'Getting Started',
items: [
{ text: 'Introduction', link: '/guide/introduction' },
{text: 'Introduction', link: '/guide/introduction'},
{
text: 'Download/Installation',
link: '/guide/installation'
Expand All @@ -41,6 +41,10 @@ const sidebar = {
text: 'Basic Usage',
link: '/guide/basic-usage'
},
{
text: 'Threading',
link: '/guide/threading'
},
{
text: 'Examples',
link: '/examples/'
Expand Down Expand Up @@ -79,10 +83,10 @@ export default defineConfigWithTheme<ThemeConfig>({
base: '/at4j/',

head: [
['meta', { name: 'theme-color', content: '#3c8772' }],
['meta', { property: 'og:url', content: 'https://github.com/brenoepics/at4j' }],
['meta', { property: 'og:type', content: 'Repository' }],
['meta', { property: 'og:title', content: 'AT4J' }],
['meta', {name: 'theme-color', content: '#3c8772'}],
['meta', {property: 'og:url', content: 'https://github.com/brenoepics/at4j'}],
['meta', {property: 'og:type', content: 'Repository'}],
['meta', {property: 'og:title', content: 'AT4J'}],
[
'meta',
{
Expand All @@ -109,7 +113,7 @@ export default defineConfigWithTheme<ThemeConfig>({
},
link: 'https://www.postman.com/maintenance-astronaut-2993290/workspace/brenoepics/collection/18589822-dfe7a640-9b94-47a8-b19f-46cb9cc8843e?action=share&creator=18589822'
},
{ icon: 'github', link: 'https://github.com/brenoepics/at4j' }
{icon: 'github', link: 'https://github.com/brenoepics/at4j'}

],

Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"preview": "vitepress preview"
},
"dependencies": {
"vitepress-carbon": "1.0.2"
"vitepress-carbon": "latest"
}
}
3 changes: 2 additions & 1 deletion docs/src/error-reference/ErrorsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ defineProps<{

<template>
<table>
<caption>Error Codes</caption>
<thead>
<tr>
<th>Code</th>
Expand All @@ -28,7 +29,7 @@ defineProps<{

<style scoped>
.highlight {
color: var(--vp-c-yellow-soft);
color: var(--vp-c-brand-1);
font-weight: bold;
}
</style>
1 change: 1 addition & 0 deletions docs/src/examples/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,4 @@ public class ExampleDetector {
}
}
```

47 changes: 0 additions & 47 deletions docs/src/guide/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,50 +25,3 @@ implementation group: 'io.github.brenoepics', name: 'at4j', version: 'AT4J-VERSI
libraryDependencies += "io.github.brenoepics" % "at4j" % "AT4J-VERSION"
```
:::

## Optional Logger Dependency {#logger-dependency}

In addition to AT4J, it is also recommended to install a Log4j-2-compatible logging framework.
A logging framework can be used to provide a more sophisticated logging experience with being able to configure log format,
log targets (console, file, database, Discord direct message, ...), log levels per class, and much more.

For example, Log4j Core:

::: code-group
```groovy [Gradle]
dependencies { runtimeOnly 'org.apache.logging.log4j:log4j-core:2.17.0' }
```

```xml [Maven]
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.17.0</version>
</dependency>
```

```scala [Sbt]
libraryDependencies ++= Seq("org.apache.logging.log4j" % "log4j-core" % "2.17.0")
```
:::

Or Log4j to Slf4j:

::: code-group
```groovy [Gradle]
dependencies { runtimeOnly 'org.apache.logging.log4j:log4j-to-slf4j:2.22.1' }
```

```xml [Maven]
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
<version>2.22.1</version>
</dependency>
```
```scala [Sbt]
libraryDependencies ++= Seq("org.apache.logging.log4j" % "log4j-to-slf4j" % "2.22.1")
```
:::

Take a look at the logger configuration doc for further information.
31 changes: 31 additions & 0 deletions docs/src/guide/threading.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Creating an AzureApi with a Custom ExecutorService

This guide will walk you through the process of creating an `AzureApiBuilder` with a custom `ExecutorService`.

## Steps

1. **Create a custom ExecutorService**

For this example, we'll create a custom `ExecutorService` using the Virtual Threads API introduced in Java 21:

```java
ExecutorService customExecutorService = Executors.newVirtualThreadPerTaskExecutor();
```

2. **Create an AzureApiBuilder**

You can create an `AzureApi` by using the `AzureApiBuilder` class. Here's an example:

```java
String azureKey = "<Your Azure Subscription Key>";
String azureRegion = "<Your Azure Subscription Region>";

AzureApi azureApi = new AzureApiBuilder()
.setKey(azureKey)
.region(azureRegion)
.executorService(customExecutorService).build();
```
This will create an `AzureApi` with the settings you specified in the `AzureApiBuilder`.

That's it! You've successfully created an `AzureApi` with a custom `ExecutorService`. You can now use this `AzureApi` to
make requests to the Azure API.
24 changes: 12 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.brenoepics</groupId>
<artifactId>at4j</artifactId>
<version>1.1.0</version>
<version>1.1.1</version>

<name>Azure Translator For Java</name>
<description>
Expand All @@ -23,7 +23,7 @@
<developers>
<developer>
<name>Breno Andrade</name>
<email>ibreno076@gmail.com</email>
<email>git@breno.tech</email>
</developer>
</developers>
<scm>
Expand Down Expand Up @@ -52,14 +52,14 @@
</properties>
<dependencies>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.23.0</version>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.13</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.16.1</version>
<version>2.17.0</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand All @@ -69,7 +69,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.10.0</version>
<version>5.11.0</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -93,7 +93,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<version>3.4.1</version>
<executions>
<execution>
<id>default-jar</id>
Expand All @@ -107,7 +107,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.1.0</version>
<version>3.2.4</version>
<configuration>
<skip>true</skip>
</configuration>
Expand Down Expand Up @@ -148,7 +148,7 @@
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.3.1</version>
<version>0.4.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
Expand All @@ -158,7 +158,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.0</version>
<version>3.3.1</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -177,7 +177,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.11</version>
<version>0.8.12</version>
<executions>
<execution>
<id>prepare-agent</id>
Expand Down
Loading
Loading