Skip to content

Commit

Permalink
Merge pull request #253 from FAIRDataTeam/release/1.13.0
Browse files Browse the repository at this point in the history
Release 1.13.0
  • Loading branch information
MarekSuchanek authored Mar 4, 2022
2 parents 293b11c + 030840c commit 6c276ce
Show file tree
Hide file tree
Showing 103 changed files with 2,030 additions and 1,302 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,13 @@ updates:
schedule:
interval: "daily"
target-branch: "develop"
labels:
- "dependencies"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
target-branch: "develop"
labels:
- "dependencies"
37 changes: 23 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ jobs:
env:
PUBLIC_IMAGE: fairdata/fairdatapoint
PRIVATE_IMAGE: ${{ secrets.PRIVATE_REGISTRY_URL }}/fairdatapoint
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
PRIVATE_REGISTRY_URL: ${{ secrets.PRIVATE_REGISTRY_URL }}
TAG_DEVELOP: develop
TAG_LATEST: latest
JDK_VERSION: 16
JDK_FILE: openjdk-16.0.1_linux-x64_bin.tar.gz
JDK_URL: https://download.java.net/java/GA/jdk16.0.1/7147401fd7354114ac51ef3e1328291f/9/GPL/openjdk-16.0.1_linux-x64_bin.tar.gz
JDK_VERSION: 17
JDK_FILE: openjdk-17_linux-x64_bin.tar.gz
JDK_URL: https://download.java.net/java/GA/jdk17/0d483333a00540d886896bac774ff48b/35/GPL/openjdk-17_linux-x64_bin.tar.gz

services:
mongo:
Expand All @@ -36,13 +38,13 @@ jobs:

# (1) -> Prepare cache and Java
- name: Cache ~/.m2
uses: actions/cache@v1
uses: actions/cache@v2.1.7
with:
path: ~/.m2
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}

- name: Cache JDK folder
uses: actions/cache@v1
uses: actions/cache@v2.1.7
with:
path: ~/jdk
key: ${{ env.JDK_FILE }}
Expand All @@ -56,10 +58,12 @@ jobs:
cp ~/jdk/$JDK_FILE .
- name: Setup Java
uses: actions/setup-java@v1
uses: actions/setup-java@v2.5.0
with:
distribution: 'jdkfile'
java-version: ${{ env.JDK_VERSION }}
jdkFile: ${{ env.JDK_FILE }}
architecture: x64

- name: Verify Maven and Java
run: |
Expand Down Expand Up @@ -88,28 +92,33 @@ jobs:
- name: Docker build
run: |
docker pull $PUBLIC_IMAGE:$TAG_DEVELOP
docker build --cache-from $PUBLIC_IMAGE:$TAG_DEVELOP -t $PRIVATE_IMAGE:$GITHUB_SHA .
docker build --cache-from $PUBLIC_IMAGE:$TAG_DEVELOP -t ${PRIVATE_IMAGE#/}:$GITHUB_SHA .
# (5) -> Docker image tagging
- name: Docker login
if: github.event_name == 'push'
- name: Docker login (private)
if: github.event_name == 'push' && env.PRIVATE_REGISTRY_URL != ''
run: |
docker login -u "$DOCKER_HUB_USERNAME" -p "$DOCKER_HUB_PASSWORD"
docker login -u "$PRIVATE_REGISTRY_USERNAME" -p "$PRIVATE_REGISTRY_PASSWORD" "$PRIVATE_REGISTRY_URL"
env:
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
PRIVATE_REGISTRY_URL: ${{ secrets.PRIVATE_REGISTRY_URL }}
PRIVATE_REGISTRY_USERNAME: ${{ secrets.PRIVATE_REGISTRY_USERNAME }}
PRIVATE_REGISTRY_PASSWORD: ${{ secrets.PRIVATE_REGISTRY_PASSWORD }}

- name: Docker login (public)
if: github.event_name == 'push' && env.DOCKER_HUB_USERNAME != ''
run: |
docker login -u "$DOCKER_HUB_USERNAME" -p "$DOCKER_HUB_PASSWORD"
env:
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}

- name: Docker push - commit SHA (private)
if: github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/')
if: github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/') && env.PRIVATE_REGISTRY_URL != ''
run: |
docker push $PRIVATE_IMAGE:$GITHUB_SHA
- name: Docker tag and push - branch (private)
if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/') && !contains(github.ref, 'release')
if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/') && !contains(github.ref, 'release') && env.PRIVATE_REGISTRY_URL != ''
run: |
GITHUB_BRANCH=`echo $GITHUB_REF | cut -d/ -f3- | sed 's#/#-#g'`
docker image tag $PRIVATE_IMAGE:$GITHUB_SHA $PRIVATE_IMAGE:$GITHUB_BRANCH
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,24 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]


## [1.13.0]

### Added

- Profile resources contain `rdfs:label` with Shape name

### Changed

- Replaced `**` wildcards with safer pattern
- Added restriction to URL prefixes of Resource Definitions (`[a-zA-Z_-]*`)
- Upgrade Java JDK from 16 to 17
- Updated SpringDoc OpenAPI UI and several other dependencies
- Compliance with FDP-O ontology (`fdp-o:FAIRDataPoint`)

### Fixed

- Missing `xsd` prefix in some default shapes

## [1.12.4]

### Changed
Expand Down Expand Up @@ -268,3 +286,4 @@ The first release of reference FAIR Data Point implementation.
[1.12.2]: /../../tree/v1.12.2
[1.12.3]: /../../tree/v1.12.3
[1.12.4]: /../../tree/v1.12.4
[1.13.0]: /../../tree/v1.13.0
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# THE SOFTWARE.
#

FROM openjdk:16-jdk-slim
FROM openjdk:17-jdk-slim

WORKDIR /fdp

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#
################################################################################
# BUILD STAGE
FROM maven:3-openjdk-16 as builder
FROM maven:3-openjdk-17-slim as builder

WORKDIR /builder

Expand All @@ -32,7 +32,7 @@ RUN mvn --quiet -B -U --fail-fast -DskipTests package

################################################################################
# RUN STAGE
FROM openjdk:16-jdk-slim
FROM openjdk:17-jdk-slim

WORKDIR /fdp

Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ the [FAIR Data Point software specification](https://specs.fairdatapoint.org) do
## Usage

More information about FDP, how to deploy it and use it can be found in
the [FDP Deployment Documentation](https://fairdatapoint.readthedocs.io/).
the [FDP Deployment and REST API usage Documentation](https://fairdatapoint.readthedocs.io/).

## Related GitHub Projects

Expand All @@ -33,16 +33,16 @@ details of API calls can be found there. It also allows trying out API calls dir
document please visit the following url via web
browser [localhost:8080/swagger-ui.html](http://localhost:8080/swagger-ui.html) (for local deployment)
or `https://your.domain.tld/swagger-ui.html` for your deployment (
e.g. [app.fairdatapoint.org/swagger-ui.html](https://app.fairdatapoint.org/swagger-ui.html)).
e.g. [app.fairdatapoint.org/swagger-ui.html](https://app.fairdatapoint.org/swagger-ui.html)). More detailed descriptions and examples of these API calls is available in the [Deployment and Usage instructions](https://fairdatapoint.readthedocs.io/)

## Development

### Technology Stack

- **Java** (JDK 16)
- **Java** (JDK 17)
- **MongoDB** (4.2)
- **Maven** (3.2.5 or higher)
- **Docker** (17.09.0-ce or higher) - *for building Docker image only*
- **Docker** (19.03.0-ce or higher) - *for building Docker image only*

### Build & Run

Expand Down Expand Up @@ -114,8 +114,7 @@ documentation.
## Contributing

We maintain a [CHANGELOG](CHANGELOG.md), you should also take a look at our [Contributing guidelines](CONTRIBUTING.md)
and
[Code of Conduct](CODE_OF_CONDUCT.md).
and [Code of Conduct](CODE_OF_CONDUCT.md).

## License

Expand Down
36 changes: 15 additions & 21 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.3</version>
<version>2.6.3</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>nl.dtls</groupId>
<artifactId>fairdatapoint</artifactId>
<version>1.12.4</version>
<version>1.13.0</version>
<packaging>jar</packaging>

<name>FairDataPoint</name>
Expand Down Expand Up @@ -47,22 +47,21 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<!-- Maven -->
<maven.compiler.source>16</maven.compiler.source>
<maven.compiler.target>16</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>

<!-- Project related -->
<spring.rdf.migration.version>1.1.0.RELEASE</spring.rdf.migration.version>
<spring.security.acl.mongo.version>5.2.4.RELEASE</spring.security.acl.mongo.version>

<!-- Core -->
<springdoc.version>1.5.2</springdoc.version>
<mongock.version>4.3.8</mongock.version>
<mongodb.driver-sync.version>4.2.3</mongodb.driver-sync.version>
<mongodb.spring-data.v3.version>3.2.3</mongodb.spring-data.v3.version>
<rdf4j.version>3.7.2</rdf4j.version>
<springdoc.version>1.6.5</springdoc.version>
<mongock.version>5.0.35</mongock.version>
<mongodb.spring-data.v3.version>3.3.1</mongodb.spring-data.v3.version>
<rdf4j.version>3.7.4</rdf4j.version>
<unirest.version>1.4.9</unirest.version>
<jwt.version>0.11.2</jwt.version>
<lombok.version>1.18.20</lombok.version>
<lombok.version>1.18.22</lombok.version>
<rdf-resolver.version>0.1.2-SNAPSHOT</rdf-resolver.version>
<log4j2.version>2.17.1</log4j2.version>

Expand Down Expand Up @@ -105,7 +104,7 @@
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.github.cloudyrock.mongock</groupId>
<groupId>io.mongock</groupId>
<artifactId>mongock-bom</artifactId>
<version>${mongock.version}</version>
<type>pom</type>
Expand Down Expand Up @@ -180,18 +179,13 @@
<!-- Mongock -->
<!-- ////////////////// -->
<dependency>
<groupId>com.github.cloudyrock.mongock</groupId>
<artifactId>mongock-spring-v5</artifactId>
<groupId>io.mongock</groupId>
<artifactId>mongock-springboot</artifactId>
</dependency>
<dependency>
<groupId>com.github.cloudyrock.mongock</groupId>
<groupId>io.mongock</groupId>
<artifactId>mongodb-springdata-v3-driver</artifactId>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver-sync</artifactId>
<version>${mongodb.driver-sync.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb</artifactId>
Expand Down Expand Up @@ -417,8 +411,8 @@
<url>https://raw.githubusercontent.com/re3data/ontology/master/r3dOntology.ttl</url>
</vocabulary>
<vocabulary>
<url>https://raw.githubusercontent.com/DTL-FAIRData/FDP-O/develop/fdp-ontology.owl</url>
<namespace>http://rdf.biosemantics.org/ontologies/fdp-o#</namespace>
<url>https://raw.githubusercontent.com/FAIRDataTeam/FDP-O/v1.1/fdp-ontology.owl</url>
<namespace>https://w3id.org/fdp/fdp-o#</namespace>
<prefix>fdp</prefix>
</vocabulary>
<vocabulary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ public class DashboardController {
@GetMapping(produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<List<DashboardItemDTO>> getDashboard(HttpServletRequest request) throws MetadataServiceException {
IRI uri = i(getRequestURL(request, persistentUrl));
IRI repositoryUri = removeLastPartOfIRI(uri);
List<DashboardItemDTO> dto = dashboardService.getDashboard(repositoryUri);
IRI fdpUri = removeLastPartOfIRI(uri);
List<DashboardItemDTO> dto = dashboardService.getDashboard(fdpUri);
return new ResponseEntity<>(dto, HttpStatus.OK);
}

Expand Down
Loading

0 comments on commit 6c276ce

Please sign in to comment.