Skip to content

Commit

Permalink
Merge pull request #1613 from alliance-genome/release/v0.34.0
Browse files Browse the repository at this point in the history
Release v0.34.0
  • Loading branch information
markquintontulloch authored Jul 15, 2024
2 parents df44887 + 05f70cc commit 6894975
Show file tree
Hide file tree
Showing 971 changed files with 35,555 additions and 26,277 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/checkstyle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Checkstyle Action
on: pull_request

jobs:
checkstyle_job:
runs-on: ubuntu-latest
name: Checkstyle Job
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run check style
uses: dbelyaev/action-checkstyle@master
with:
level: 'error'
fail_on_error: 'true'
github_token: ${{ secrets.GH_DEVOPS_PAT }}
reporter: github-pr-review
checkstyle_config: checkstyle.xml
checkstyle_version: "10.17.0"
130 changes: 125 additions & 5 deletions .github/workflows/github-actions-PR-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- production
jobs:
check-branching-rules:
name: Check Branching Rules
runs-on: ubuntu-20.04
steps:
- name: Check out repository code
Expand All @@ -17,7 +18,40 @@ jobs:
- name: Check branching rules
run: |
bash ci-scripts/check-branching.sh ${{ github.base_ref }} ${{ github.head_ref }}
verify-test-api:
checkstyle-api:
name: Checkstyle API
runs-on: ubuntu-20.04
steps:
- name: Report workflow details
run: |
echo "Repository ${{ github.repository }}."
echo "Trigger ref ${{ github.ref }}, base-ref ${{ github.base_ref }}, head_ref ${{ github.head_ref }}."
- name: Check out repository code
uses: actions/checkout@v3
- run: cp src/main/resources/application.properties.defaults src/main/resources/application.properties
- name: Report files updated in PR
run: |
git fetch -q origin ${{ github.base_ref }} ${{ github.head_ref }}
git diff --name-only origin/${{ github.base_ref }} origin/${{ github.head_ref }}
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Report runtime details
run: |
echo "Github runner OS: ${{ runner.os }}"
- name: Report Maven version
run: |
mvn --version
- name: Run Check Styles
run: |
mvn -ntp checkstyle:check
verify-api:
name: Verify API
runs-on: ubuntu-20.04
steps:
- name: Report workflow details
Expand All @@ -36,11 +70,42 @@ jobs:
with:
java-version: '17'
distribution: 'temurin'
- name: Report runtime details
run: |
echo "Github runner OS: ${{ runner.os }}"
- id: install-secret-key
name: Install gpg secret key
run: |
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Report Maven version
run: |
mvn --version
- name: Run Maven verify
run: |
mvn -ntp --batch-mode --update-snapshots verify
test-api:
name: Test API
runs-on: ubuntu-20.04
steps:
- name: Report workflow details
run: |
echo "Repository ${{ github.repository }}."
echo "Trigger ref ${{ github.ref }}, base-ref ${{ github.base_ref }}, head_ref ${{ github.head_ref }}."
- name: Check out repository code
uses: actions/checkout@v3
- run: cp src/main/resources/application.properties.defaults src/main/resources/application.properties
- name: Report files updated in PR
run: |
git fetch -q origin ${{ github.base_ref }} ${{ github.head_ref }}
git diff --name-only origin/${{ github.base_ref }} origin/${{ github.head_ref }}
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Report runtime details
run: |
echo "Github runner OS: ${{ runner.os }}"
Expand All @@ -49,13 +114,65 @@ jobs:
mvn --version
- name: Run Maven test
run: |
mvn --no-transfer-progress test
- name: Run Maven verify
mvn -ntp test
package-api:
name: Package API
runs-on: ubuntu-20.04
steps:
- name: Report workflow details
run: |
echo "Repository ${{ github.repository }}."
echo "Trigger ref ${{ github.ref }}, base-ref ${{ github.base_ref }}, head_ref ${{ github.head_ref }}."
- name: Check out repository code
uses: actions/checkout@v3
- run: cp src/main/resources/application.properties.defaults src/main/resources/application.properties
- name: Report files updated in PR
run: |
mvn --no-transfer-progress --batch-mode --update-snapshots verify
git fetch -q origin ${{ github.base_ref }} ${{ github.head_ref }}
git diff --name-only origin/${{ github.base_ref }} origin/${{ github.head_ref }}
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Report runtime details
run: |
echo "Github runner OS: ${{ runner.os }}"
- name: Report Maven version
run: |
mvn --version
- name: Package API
run: |
mvn clean package -Dquarkus.package.type=uber-jar -ntp
mvn -ntp clean package -Dquarkus.package.type=uber-jar -ntp
integration-test-api:
name: Integration Test API
runs-on: ubuntu-20.04
steps:
- name: Report workflow details
run: |
echo "Repository ${{ github.repository }}."
echo "Trigger ref ${{ github.ref }}, base-ref ${{ github.base_ref }}, head_ref ${{ github.head_ref }}."
- name: Check out repository code
uses: actions/checkout@v3
- run: cp src/main/resources/application.properties.defaults src/main/resources/application.properties
- name: Report files updated in PR
run: |
git fetch -q origin ${{ github.base_ref }} ${{ github.head_ref }}
git diff --name-only origin/${{ github.base_ref }} origin/${{ github.head_ref }}
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Report runtime details
run: |
echo "Github runner OS: ${{ runner.os }}"
- name: Report Maven version
run: |
mvn --version
- name: Create test containers properties file
run: |
touch ~/.testcontainers.properties
Expand All @@ -64,6 +181,7 @@ jobs:
make integration-test
verify-test-ui:
name: Verify Test UI
runs-on: ubuntu-20.04
steps:
- name: Report workflow details
Expand All @@ -87,9 +205,11 @@ jobs:
working-directory: src/main/cliapp
run: |
npm ci
npx prettier --check .
npm test -- --watchAll=false
npm run build
test-build-docker-image:
name: Test Build Docker Image
runs-on: ubuntu-20.04
steps:
- name: Check out repository code
Expand Down
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,22 @@ docker-run:
debug:
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5045 -jar target/agr_curation_api-bootable.jar

checkstyle:
mvn checkstyle:check

prettier-check:
npx prettier 'src/main/cliapp/**/*.js' --check

prettier-write:
npx prettier 'src/main/cliapp/**/*.js' --write

test:
mvn test

integration-test:
mvn clean package
mvn -ntp clean package
mvn -ntp failsafe:integration-test -Dokta.authentication=false
mvn failsafe:verify
mvn -ntp failsafe:verify

verify:
mvn verify
Expand Down
97 changes: 97 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ These instructions will get you a copy of the project and the API up and running
* [Postgres](#postgres)
* [OpenSearch](#opensearch-elastic-search-alternative)
* [Cerebro](#cerebro)
- [Code Style](#codestyle)
* [Running Checkstyle](#running-checkstyle)
* [Checkstyle Links](#checkstyle-links)
- [Building](#building)
* [Building Docker Image](#building-docker-image)
- [Running](#running)
Expand Down Expand Up @@ -239,6 +242,100 @@ CONTAINER ID IMAGE COMMAND
7de3cf028e9c postgres:13 "docker-entrypoint.s…" 3 days ago Up 3 days 0.0.0.0:5432->5432/tcp, :::5432->5432/tcp postgres
```

## Code Style

This repository uses checkstyle to validate formatting of code to a coding standard. [Checkstyle](https://checkstyle.sourceforge.io/) is a development tool to help programmers write Java code that adheres to a coding standard. It automates the process of checking Java code to spare humans of this boring (but important) task. This makes it ideal for projects that want to enforce a coding standard.

This repository also uses [Prettier](https://prettier.io/) to validate and update the formatting of code in the frontend codebase.

### Running Checkstyle

To run checkstyle locally in order to check your code before committing run the following:

```bash
> mvn checkstyle:check
```

Or the make target:

```bash
> make checkstyle
```

This will check all the style of the code and report any issues that it finds with the code. Here is an example output:

```bash
> make checkstyle
[INFO] Scanning for projects...
[INFO] Inspecting build with total of 1 modules...
[INFO] Installing Nexus Staging features:
[INFO] ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin
[INFO]
[INFO] ----------------< org.alliancegenome:agr_curation_api >-----------------
[INFO] Building AGR Curation :: API 0.0.0
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- checkstyle:3.3.1:check (default-cli) @ agr_curation_api ---
[INFO] There is 1 error reported by Checkstyle 10.17.0 with checkstyle.xml ruleset.
[ERROR] src/main/java/org/alliancegenome/curation_api/main/Main.java:[9] (regexp) RegexpSinglelineJava: Indent must use tab characters
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.107 s
[INFO] Finished at: 2024-05-29T05:23:33-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.3.1:check (default-cli) on project agr_curation_api: You have 1 Checkstyle violation. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
make: *** [checkstyle] Error 1
```

Checkstyle can be configured via the checkstyle.xml file in the root of the project, this file can also be used by IDE's to keep code in line with the ruleset.
### Running Prettier
To validate formatting on JavaScript files locally with Prettier:
```bash
> npx prettier --check **/*.js
```
Or the make target:
```bash
> make prettier-check
```
To update formatting on JavaScript files locally with Prettier:
```bash
> npx prettier --write **/*.js
```
Or the make target:
```bash
> make prettier-write
```
Prettier can be configured via the .prettierrc.yaml file in the src/main/cliapp director of this project, this file can also be used by IDE's to keep code in line with the ruleset.

### Checkstyle Links

* Checkstyle for vscode: [https://marketplace.visualstudio.com/items?itemName=shengchen.vscode-checkstyle](https://marketplace.visualstudio.com/items?itemName=shengchen.vscode-checkstyle)
* Checkstyle for Intellij: [https://stackoverflow.com/questions/26955766/intellij-idea-checkstyle](https://stackoverflow.com/questions/26955766/intellij-idea-checkstyle)
* Checkstyle for Eclipse: [https://www.youtube.com/watch?v=H90QoBp2NSQ](https://www.youtube.com/watch?v=H90QoBp2NSQ) or [https://checkstyle.org/eclipse-cs/#!/](https://checkstyle.org/eclipse-cs/#!/)

### Prettier Links

* Prettier for vscode: [https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
* Prettier for Intellij: [https://www.jetbrains.com/help/idea/prettier.html](https://www.jetbrains.com/help/idea/prettier.html)

## Building

Before building locally, make sure and create a copy of the application.properties file
Expand Down
20 changes: 20 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@

https://agr-jira.atlassian.net/wiki/spaces/ATEAM/overview

## v0.34.0
* New features
* Paralogy annotations loaded into persistent store (SCRUM-4086, SCRUM-4088, SCRUM-4089, SCRUM-4090)
* Expression annotations loaded into persistent store (SCRUM-3708)
* HTPTags loaded into persistent store (SCRUM-4221)
* Data load file history sorted by Load Started timestamp (SCRUM-4204)
* Data loads stopped if error rate exceeds cutoff threshold (SCRUM-3871)
* SGD strain background added to defining fields of disease/phenotype annotations (SCRUM-4137)
* Turned off cleanup of associated annotations/associations (SCRUM-4107)
* Fixes and maintenance
* Fixed reporting of out-of-date errors in data loads tooltip (SCRUM-4210)
* Fixed loading of genes with duplicate cross-references (SCRUM-4160)
* Fixed lading of interactions via NCBI_Gene cross-references (SCRUM-4159)
* Fixed orthology load cleanup (SCRUM-4146)
* Fixed duplicate references on interactions (SCRUM-4114)
* Fixed subject filter on disease annotations table (SCRUM-4113)
* Fixed association of secondary phenotype annotations with primary annotations that have condition relations (SCRUM-4062)
* Fixed downloads of large exception lists (SCRUM-3871)
* Fixed missing exception messages in downloads (SCRUM-4162)

## v0.33.0
* New features
* Importing gene interactions into the persistent store (phase 2) (SCRUM-3809)
Expand Down
Loading

0 comments on commit 6894975

Please sign in to comment.