Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 8 additions & 7 deletions .github/workflows/build-test-with-registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
- uses: actions/checkout@v7
- name: Set up JDK 21
uses: actions/setup-java@v6
with:
java-version: '11'
distribution: 'adopt'
java-version: '21'
distribution: 'temurin'
cache: gradle
- name: Install local registry
run: |
/bin/bash -c "$(curl -fsSL https://data.scrc.uk/static/localregistry.sh)"
/bin/bash -c "$(curl -fsSL https://data.fairdatapipeline.org/static/localregistry.sh)"
~/.fair/registry/scripts/start_fair_registry
- name: Grant execute permission for gradlew
run: chmod +x gradlew
Expand All @@ -34,6 +34,7 @@ jobs:
export REGTOKEN=`cat ~/.fair/registry/token`
export LOCALREG=FRESHASADAISY
./gradlew build
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./api/build/reports/jacoco/test/jacocoTestReport.xml,./dataregistry/build/reports/jacoco/test/jacocoTestReport.xml
10 changes: 5 additions & 5 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
- uses: actions/checkout@v7
- name: Set up JDK 21
uses: actions/setup-java@v6
with:
java-version: '11'
distribution: 'adopt'
java-version: '21'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
packages: write

steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
- uses: actions/checkout@v7
- name: Set up JDK 21
uses: actions/setup-java@v6
with:
java-version: '11'
distribution: 'adopt'
java-version: '21'
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/javadoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: actions/setup-java@v3
- uses: actions/setup-java@v6
with:
distribution: 'adopt'
java-version: '11'
distribution: 'temurin'
java-version: '21'
cache: 'gradle'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ gradle
build

.idea
api/bin
dataregistry/bin
dataregistry/build
graphify-out
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "interactive"
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ Documentation can be found on https://www.fairdatapipeline.org/docs/API/Java/

JavaDocs are automatically published on https://www.fairdatapipeline.org/javaDataPipeline/

To use a release version (latest: 1.0.0-rc3) include the following dependency (available from mavenCentral):
To use a release version (latest: 1.0.0-rc4) include the following dependency (available from mavenCentral):

```gradle
group: 'org.fairdatapipeline',
name: 'api',
version: '1.0.0-rc3'
version: '1.0.0-rc4'
```

## javaSimpleModel
Expand Down
32 changes: 17 additions & 15 deletions api/build.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
plugins {
id 'java'
id "com.diffplug.gradle.spotless" version "4.4.0"
id "com.diffplug.spotless" version "8.10.2"
id "maven-publish"
id "signing"
id "jacoco"
}

group 'org.fairdatapipeline'
version '1.0.0-rc3'
group = 'org.fairdatapipeline'
version = '1.0.0-rc4'

repositories {
mavenCentral()
}

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
withJavadocJar()
withSourcesJar()
}
Expand All @@ -32,12 +33,12 @@ dependencies {
implementation 'com.google.guava:guava:31.1-jre'
implementation 'com.moandjiezana.toml:toml4j:0.7.2'
implementation 'commons-io:commons-io:2.11.0'
implementation 'jakarta.ws.rs:jakarta.ws.rs-api:3.0.0'
implementation 'jakarta.ws.rs:jakarta.ws.rs-api:3.1.0'
implementation 'org.apache.commons:commons-math3:3.6.1'
implementation 'org.apache.maven:maven-artifact:3.8.4'
implementation 'org.glassfish.jersey.core:jersey-client:3.0.4'
implementation 'org.glassfish.jersey.inject:jersey-hk2:3.0.4'
implementation 'org.glassfish.jersey:jersey-bom:3.0.4'
implementation 'org.glassfish.jersey.core:jersey-client:3.1.12'
implementation 'org.glassfish.jersey.inject:jersey-hk2:3.1.12'
implementation 'org.glassfish.jersey:jersey-bom:3.1.12'
implementation 'org.immutables:value-annotations:2.9.0'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.15.2'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.15.2'
Expand All @@ -49,9 +50,10 @@ dependencies {
implementation 'org.slf4j:slf4j-simple:1.7.36'
testAnnotationProcessor 'org.immutables:value:2.9.0'
testImplementation(platform('org.junit:junit-bom:5.8.1'))
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testImplementation('org.junit.jupiter:junit-jupiter:5.8.2')
testImplementation 'org.skyscreamer:jsonassert:1.5.0'
testImplementation 'org.mockito:mockito-core:4.3.1'
testImplementation 'org.mockito:mockito-core:5.11.0'
testImplementation 'org.assertj:assertj-core:3.22.0'
testImplementation 'org.javatuples:javatuples:1.2'
}
Expand All @@ -67,14 +69,14 @@ test {
jacocoTestReport {
dependsOn test
reports {
xml.enabled true
html.enabled false
xml.required = true
html.required = false
}
}

spotless {
java {
googleJavaFormat()
googleJavaFormat("1.36.1")
}
}

Expand Down Expand Up @@ -126,8 +128,8 @@ publishing {
maven {
url = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
credentials {
username findProperty('ossrhUsername')
password findProperty('ossrhPassword')
username = findProperty('ossrhUsername')
password = findProperty('ossrhPassword')
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions api/src/main/java/org/fairdatapipeline/api/Coderun.java
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ private void prepare_code_run() {
String remote_repo = this.config.run_metadata().remote_repo().orElse("");
URL remote_repo_url;
try {
remote_repo_url = new URL(remote_repo);
} catch (MalformedURLException e) {
remote_repo_url = URI.create(remote_repo).toURL();
} catch (MalformedURLException | IllegalArgumentException e) {
throw (new ConfigException(
"Remote repo must be a valid URL; (" + remote_repo + " isn't)", e));
}
Expand Down
2 changes: 2 additions & 0 deletions api/src/main/java/org/fairdatapipeline/api/Data_product.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ public abstract class Data_product implements AutoCloseable {
Path filePath;
CleanableFileChannel filechannel;
Object_component whole_obj_oc;

/** the name given by the user (asked for in the FileApi.get_dp_for_xxx() call) */
final String givenDataProduct_name;

/**
* usually the same as the given name, unless the config use section has given an alternative data
* product name to open.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
@JsonDeserialize
@JsonSerialize
public interface Estimate extends Component {
/** @return Number - the value that is stored in this component */
/**
* @return Number - the value that is stored in this component
*/
@JsonProperty("value")
Number internalValue();

Expand Down
33 changes: 18 additions & 15 deletions dataregistry/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
plugins {
id 'java'
id "com.diffplug.gradle.spotless" version "4.4.0"
id "com.diffplug.spotless" version "8.10.2"
id "maven-publish"
id "signing"
id "jacoco"
}

group 'org.fairdatapipeline'
version '1.0.0-rc3'
group = 'org.fairdatapipeline'
version = '1.0.0-rc4'

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
withJavadocJar()
withSourcesJar()
}
Expand All @@ -26,13 +27,15 @@ repositories {

dependencies {
testImplementation(platform('org.junit:junit-bom:5.8.1'))
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.2'
testImplementation 'org.hamcrest:hamcrest:2.2'
testImplementation 'org.mockito:mockito-core:4.3.1'
implementation 'org.glassfish.jersey.core:jersey-client:3.0.4'
implementation 'org.glassfish.jersey.inject:jersey-hk2:3.0.4'
implementation 'org.glassfish.jersey:jersey-bom:3.0.4'
implementation 'jakarta.ws.rs:jakarta.ws.rs-api:3.0.0'
testImplementation 'org.mockito:mockito-core:5.11.0'
implementation 'org.glassfish.jersey.core:jersey-client:3.1.12'
implementation 'org.glassfish.jersey.connectors:jersey-jnh-connector:3.1.12'
implementation 'org.glassfish.jersey.inject:jersey-hk2:3.1.12'
implementation 'org.glassfish.jersey:jersey-bom:3.1.12'
implementation 'jakarta.ws.rs:jakarta.ws.rs-api:3.1.0'
implementation 'com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.15.2'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.2'
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.15.2'
Expand All @@ -46,7 +49,7 @@ dependencies {

spotless {
java {
googleJavaFormat()
googleJavaFormat("1.36.1")
}
}

Expand All @@ -60,8 +63,8 @@ test {
jacocoTestReport {
dependsOn test
reports {
xml.enabled true
html.enabled false
xml.required = true
html.required = false
}
}

Expand Down Expand Up @@ -113,8 +116,8 @@ publishing {
maven {
url = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
credentials {
username findProperty('ossrhUsername')
password findProperty('ossrhPassword')
username = findProperty('ossrhUsername')
password = findProperty('ossrhPassword')
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ public void setName(String name) {
this.name = name;
}

/** @param identifier (optional): Full URL of identifier (e.g. ORCiD or ROR ID) of the Author. */
/**
* @param identifier (optional): Full URL of identifier (e.g. ORCiD or ROR ID) of the Author.
*/
public void setIdentifier(String identifier) {
this.identifier = identifier;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,16 @@ public void setVersion(String version) {
this.version = version;
}

/** @param website (optional): URL of the website for this code release, if applicable. */
/**
* @param website (optional): URL of the website for this code release, if applicable.
*/
public void setWebsite(URL website) {
this.website = website;
}

/** @param object APIURL of the associated Object. */
/**
* @param object APIURL of the associated Object.
*/
public void setObject(APIURL object) {
this.object = object;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,16 @@ public APIURL getRo_crate() {
return this.ro_crate;
}

/** @param run_date Datetime of the CodeRun. */
/**
* @param run_date Datetime of the CodeRun.
*/
public void setRun_date(LocalDateTime run_date) {
this.run_date = run_date;
}

/** @param description (optional): Free text description of the CodeRun. */
/**
* @param description (optional): Free text description of the CodeRun.
*/
public void setDescription(String description) {
this.description = description;
}
Expand Down Expand Up @@ -166,12 +170,16 @@ public void setSubmission_script(APIURL submission_script) {
this.submission_script = submission_script;
}

/** @param inputs List of RegistryObject_component that the CodeRun used as inputs. */
/**
* @param inputs List of RegistryObject_component that the CodeRun used as inputs.
*/
public void setInputs(List<APIURL> inputs) {
this.inputs = (inputs == null) ? null : new ArrayList<>(inputs);
}

/** @param outputs List of RegistryObject_component that the CodeRun produced as outputs. */
/**
* @param outputs List of RegistryObject_component that the CodeRun produced as outputs.
*/
public void setOutputs(List<APIURL> outputs) {
this.outputs = (outputs == null) ? null : new ArrayList<>(outputs);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,16 @@ public void setVersion(String version) {
this.version = version;
}

/** @param object APIURL of the associated Object. */
/**
* @param object APIURL of the associated Object.
*/
public void setObject(APIURL object) {
this.object = object;
}

/** @param namespace API URL of the Namespace of the DataProduct. */
/**
* @param namespace API URL of the Namespace of the DataProduct.
*/
public void setNamespace(APIURL namespace) {
this.namespace = namespace;
}
Expand Down
Loading
Loading