Skip to content

Commit

Permalink
docs: Descriptive Javadoc, Updated README, Fixed workflow to use codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
JigarJoshi committed Apr 20, 2022
1 parent f3d99ea commit 052bbea
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 20 deletions.
20 changes: 4 additions & 16 deletions .github/workflows/java-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,7 @@ jobs:
jacoco-csv-file: client/target/site/jacoco/jacoco.csv
on-missing-report: fail
generate-summary: true
- name: Log coverage percentage
run: |
echo "coverage = ${{ steps.jacoco.outputs.coverage }}"
echo "branch coverage = ${{ steps.jacoco.outputs.branches }}"
- name: Commit the badge (if it changed)
run: |
if [[ `git status --porcelain` ]]; then
git config --global user.name 'Jigar Joshi'
git config --global user.email 'jigarjm@users.noreply.github.com'
git add -A
git commit -m "Autogenerated JaCoCo coverage badge"
git push --force
fi
- name: Check on failures
if: steps.mvn-tests.outcome != 'success'
run: exit 1
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
files: ./client/target/site/jacoco/jacoco.xml
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Java driver for TigrisDB
[![coverage](.github/badges/jacoco.svg)](https://github.com/tigrisdata/tigrisdb-client-java/blob/main/.github/workflows/java-ci.yml) [![branches coverage](.github/badges/branches.svg)](https://github.com/tigrisdata/tigrisdb-client-java/blob/main/.github/workflows/java-ci.yml)
[![Language grade: Java](https://img.shields.io/lgtm/grade/java/g/tigrisdata/tigrisdb-client-java.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/tigrisdata/tigrisdb-client-java/context:java)
![Snyk Vulnerabilities for GitHub Repo](https://img.shields.io/snyk/vulnerabilities/github/tigrisdata/tigrisdb-client-java)
[![javadoc](https://javadoc.io/badge2/com.tigrisdata/tigrisdb-client/javadoc.svg)](https://javadoc.io/doc/com.tigrisdata/tigrisdb-client)
![Maven Central](https://img.shields.io/maven-central/v/com.tigrisdata/tigrisdb-client-java)
[![slack](https://img.shields.io/badge/Slack-4A154B?style=for-the-badge&logo=slack&logoColor=white)](https://join.slack.com/t/tigrisdatacommunity/shared_invite/zt-16fn5ogio-OjxJlgttJIV0ZDywcBItJQ)
[![GitHub](https://img.shields.io/github/license/tigrisdata/tigrisdb-client-java)](https://github.com/tigrisdata/tigrisdb-client-java/blob/main/LICENSE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ private StandardTigrisDBClient(
/**
* Creates a new instance of @{@link StandardTigrisDBClient} with the given inputs
*
* @param authorizationToken
* @param tigrisDBConfiguration
* @param authorizationToken authorization token
* @param tigrisDBConfiguration configuration
* @return a new instance of @{@link StandardTigrisDBClient}
*/
public static StandardTigrisDBClient getInstance(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ CompletableFuture<CreateOrUpdateCollectionsResponse> createOrUpdateCollections(
Class<? extends TigrisCollectionType>... collectionModelTypes);

/**
* Creates or updates collections
* Creates or updates collections by scanning classpath packages and applying user's filter *
* (optionally) The alternate method {@link TigrisDatabase#createOrUpdateCollections(Class[])} is
* recommended where user specifies fixed list of classes to avoid classpath scan at runtime.
*
* @param packagesToScan an array of Java packages to scan for collection model.
* @param filter optional filter to filter out classes from scanned set of classes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ CreateOrUpdateCollectionsResponse createOrUpdateCollections(
Class<? extends TigrisCollectionType>... collectionModelTypes) throws TigrisDBException;

/**
* Creates or updates collections
* Creates or updates collections by scanning classpath packages and applying user's filter
* (optionally) The alternate method {@link TigrisDatabase#createOrUpdateCollections(Class[])} is
* recommended where user specifies fixed list of classes to avoid classpath scan at runtime.
*
* @param packagesToScan an array of Java packages to scan for collection model.
* @param filter optional filter to filter out classes from scanned set of classes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,17 @@
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
public @interface TigrisDBCollection {
/**
* User can specify their collection name here. Default the collection name is derived by
* pluralizing the classname and snake casing the string.
*
* @return collection name
*/
String value() default "";

/**
* Optional collection description for documentation purpose.
* @return description of the collection
*/
String description() default "";
}

0 comments on commit 052bbea

Please sign in to comment.