Skip to content

Commit

Permalink
Merge pull request #66 from open-simulation-platform/release/0.11.0
Browse files Browse the repository at this point in the history
release/0.11.0
  • Loading branch information
mrindar authored Jun 8, 2020
2 parents 6c5a5d2 + 13ee73b commit 3a88f10
Show file tree
Hide file tree
Showing 409 changed files with 14,384 additions and 2,254 deletions.
42 changes: 42 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
Contributor guidelines
======================

This document contains a set of rules and guidelines for everyone who wishes
to contribute to the contents of this repository, hereafter referred to as
"the software".


General
-------
All contributors implicitly agree to license their contribution under the same
terms as the rest of the software, and accept that those terms may change in the
future. See the `LICENCE.txt` file for details.

All contributions to the software, in the form of changes, removals or
additions to source code and other files under source control, shall be made
via pull requests. A pull request must always be reviewed and merged by someone
other than its author.

Before a pull request can be approved and merged into the code base, the author
must sign the "OSP Contributor License Agreement". This agreement is pending, but
will be included in this repository with guidelines once concluded.


Workflow
--------
This repository uses the [gitflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow)
workflow


Creating new releases
---------------------
Create new releases by running the `release.sh` script. It will prompt you for the version number to release, and the
bump version. Typically, the bump increases the `minor` version by 1 and adds `-SNAPSHOT` at the end. The script will
then create a release branch with the given version number, and a new commit on the develop branch with the bump
version. The script updates all version numbers in the `pom.xml` files.

When ready to release:

- Merge the release branch into the master branch _and_ the develop branch
- Run `mvn clean package` on the master branch
- Upload binaries to new github release with the same name as the version number
375 changes: 375 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

43 changes: 28 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
# Description
This is a java project consisting of a java library and a command line interface tool to validate FMUs and simulation
configurations against the [open simulation platform](https://www.opensimulationplatform.com) specification.

# Prerequisites
### Windows
java: https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jdk_x64_windows_hotspot_8u222b10.msi
Description
===========
Supports version 1.0 of [OSP-IS](https://www.opensimulationplatform.com/assets/osp-is.pdf)

This is a java project consisting of a java library, and a command line interface tool to validate FMUs and simulation
configurations against OSP-IS.

IMPORTRANT
----------
This `osp-validator` version only works with `OspSystemStructure.xml` files based on
[this](https://opensimulationplatform.com/xsd/OspSystemStructure-0.1.xsd) xsd

Prerequisites
=============
Windows
-------
[java](https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jdk_x64_windows_hotspot_8u222b10.msi)
\
maven: http://apache.uib.no/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.zip
[maven](http://apache.uib.no/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.zip)

### Linux
java: https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jdk_x64_linux_hotspot_8u222b10.tar.gz
Linux
-----
[java](https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jdk_x64_linux_hotspot_8u222b10.tar.gz)
\
maven: http://apache.uib.no/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.tar.gz
[maven](http://apache.uib.no/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.tar.gz)

# Modules
Modules
=======
[osp-validator-api](/osp-validator-api/README.md)

[osp-validator-core](/osp-validator-core/README.md)
Expand All @@ -26,10 +38,11 @@ maven: http://apache.uib.no/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.

[osp-validator-gen](/osp-validator-gen/README.md)

# Build
Build
=====
```
$ git clone git@github.com:open-simulation-platform/msmi-validator.git
$ cd msmi-validator
$ git clone git@github.com:open-simulation-platform/osp-validator.git
$ cd osp-validator
$ mvn clean package
```

Expand Down
Empty file removed TODO.md
Empty file.
4 changes: 2 additions & 2 deletions osp-model-description/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Description

Description
===========
Implements parsers and converters to generate `osp-validator-core` data model from `OspModelDescription.xml`
10 changes: 8 additions & 2 deletions osp-model-description/pom.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ This Source Code Form is subject to the terms of the Mozilla Public
~ License, v. 2.0. If a copy of the MPL was not distributed with this
~ file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>msmi-validator</artifactId>
<artifactId>osp-validator</artifactId>
<groupId>com.opensimulationplatform</groupId>
<version>0.10.0</version>
<version>0.11.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/

package com.opensimulationplatform.modeldescription.util;

import com.opensimulationplatform.core.model.modeldescription.Unit;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/

package com.opensimulationplatform.modeldescription.util;

import no.ntnu.ihb.fmi4j.modeldescription.ModelDescriptionParser;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/

package com.opensimulationplatform.modeldescription.util;

import no.ntnu.ihb.fmi4j.modeldescription.ModelDescriptionParser;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/

package com.opensimulationplatform.modeldescription.xml.converter;

import java.util.List;
import java.util.stream.Collectors;

public abstract class Converter<FROM, TO> {
protected final ConverterContext context;
Expand All @@ -15,5 +22,7 @@ public Converter() {

public abstract TO convert(FROM object);

public abstract List<TO> convert(List<FROM> object);
public List<TO> convert(List<FROM> object) {
return object.stream().map(this::convert).collect(Collectors.toList());
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/

package com.opensimulationplatform.modeldescription.xml.converter;

import com.opensimulationplatform.core.model.modeldescription.ModelDescription;
Expand Down Expand Up @@ -26,6 +32,8 @@
import com.opensimulationplatform.modeldescription.xml.converter.quasiport.ElectromagneticQuasiPortTypeConverter;
import com.opensimulationplatform.modeldescription.xml.converter.quasiport.HydraulicQuasiPortTypeConverter;
import com.opensimulationplatform.modeldescription.xml.converter.quasiport.LinearMechanicalQuasiPortTypeConverter;
import com.opensimulationplatform.modeldescription.xml.converter.tentative.*;
import com.opensimulationplatform.modeldescription.xml.converter.tentative.nmea.*;
import com.opensimulationplatform.modeldescription.xml.converter.unit.Fmi2UnitConverter;
import com.opensimulationplatform.modeldescription.xml.converter.unit.UnitTypeConverter;
import com.opensimulationplatform.modeldescription.xml.converter.variable.Fmi1ScalarVariableConverter;
Expand Down Expand Up @@ -77,6 +85,37 @@ public class ConverterContext {
public HydraulicQuasiPortTypeConverter hydraulicQuasiPortTypeConverter;
public LinearMechanicalQuasiPortTypeConverter linearMechanicalQuasiPortTypeConverter;

public NmeaGgaFixTypeConverter nmeaGgaFixTypeConverter;
public NmeaTimeTypeConverter nmeaTimeTypeConverter;
public NmeaGgaLatitudeLongitudeTypeConverter nmeaGgaLatitudeLongitudeTypeConverter;
public NmeaGstEllipseTypeConverter nmeaGstEllipseTypeConverter;
public NmeaGstPositionErrorTypeConverter nmeaGstPositionErrorTypeConverter;
public NmeaGstRmsTypeConverter nmeaGstRmsTypeConverter;
public NmeaStatusTypeConverter nmeaStatusTypeConverter;
public NmeaWindDirectionTypeConverter nmeaWindDirectionTypeConverter;
public NmeaWindSpeedTypeConverter nmeaWindSpeedTypeConverter;
public NmeaTrueHeadingTypeConverter nmeaTrueHeadingTypeConverter;
public AzimuthAngleTypeConverter azimuthAngleTypeConverter;
public BladePitchTypeConverter bladePitchTypeConverter;
public ShaftSpeedTypeConverter shaftSpeedTypeConverter;
public ElectricPowerTypeConverter electricPowerTypeConverter;
public FrequencyTypeConverter frequencyTypeConverter;
public NmeaGgaTypeConverter nmeaGgaTypeConverter;
public NmeaGstTypeConverter nmeaGstTypeConverter;
public NmeaMwvTypeConverter nmeaMwvTypeConverter;
public NmeaSxnTypeConverter nmeaSxnTypeConverter;
public NmeaThsTypeConverter nmeaThsTypeConverter;
public AngularAccelerationTypeConverter angularAccelerationTypeConverter;
public AzimuthThrusterFeedbackTypeConverter azimuthThrusterFeedbackTypeConverter;
public AzimuthThrusterSetpointTypeConverter azimuthThrusterSetpointTypeConverter;
public BatteryFeedbackTypeConverter batteryFeedbackTypeConverter;
public BusFeedbackTypeConverter busFeedbackTypeConverter;
public FixedThrusterFeedbackTypeConverter fixedThrusterFeedbackTypeConverter;
public FixedThrusterSetpointTypeConverter fixedThrusterSetpointTypeConverter;
public GeneratorFeedbackTypeConverter generatorFeedbackTypeConverter;
public LinearAccelerationTypeConverter linearAccelerationTypeConverter;


public ConverterContext() {
this.modelDescription = new ModelDescription();

Expand Down Expand Up @@ -118,5 +157,35 @@ public ConverterContext() {
this.electromagneticQuasiPortTypeConverter = new ElectromagneticQuasiPortTypeConverter(this);
this.hydraulicQuasiPortTypeConverter = new HydraulicQuasiPortTypeConverter(this);
this.linearMechanicalQuasiPortTypeConverter = new LinearMechanicalQuasiPortTypeConverter(this);

this.nmeaGgaFixTypeConverter = new NmeaGgaFixTypeConverter(this);
this.nmeaTimeTypeConverter = new NmeaTimeTypeConverter(this);
this.nmeaGgaLatitudeLongitudeTypeConverter = new NmeaGgaLatitudeLongitudeTypeConverter(this);
this.nmeaGstEllipseTypeConverter = new NmeaGstEllipseTypeConverter(this);
this.nmeaGstPositionErrorTypeConverter = new NmeaGstPositionErrorTypeConverter(this);
this.nmeaGstRmsTypeConverter = new NmeaGstRmsTypeConverter(this);
this.nmeaStatusTypeConverter = new NmeaStatusTypeConverter(this);
this.nmeaWindDirectionTypeConverter = new NmeaWindDirectionTypeConverter(this);
this.nmeaWindSpeedTypeConverter = new NmeaWindSpeedTypeConverter(this);
this.nmeaTrueHeadingTypeConverter = new NmeaTrueHeadingTypeConverter(this);
this.azimuthAngleTypeConverter = new AzimuthAngleTypeConverter(this);
this.bladePitchTypeConverter = new BladePitchTypeConverter(this);
this.shaftSpeedTypeConverter = new ShaftSpeedTypeConverter(this);
this.electricPowerTypeConverter = new ElectricPowerTypeConverter(this);
this.frequencyTypeConverter = new FrequencyTypeConverter(this);
this.nmeaGgaTypeConverter = new NmeaGgaTypeConverter(this);
this.nmeaGstTypeConverter = new NmeaGstTypeConverter(this);
this.nmeaMwvTypeConverter = new NmeaMwvTypeConverter(this);
this.nmeaSxnTypeConverter = new NmeaSxnTypeConverter(this);
this.nmeaThsTypeConverter = new NmeaThsTypeConverter(this);
this.angularAccelerationTypeConverter = new AngularAccelerationTypeConverter(this);
this.azimuthThrusterFeedbackTypeConverter = new AzimuthThrusterFeedbackTypeConverter(this);
this.azimuthThrusterSetpointTypeConverter = new AzimuthThrusterSetpointTypeConverter(this);
this.batteryFeedbackTypeConverter = new BatteryFeedbackTypeConverter(this);
this.busFeedbackTypeConverter = new BusFeedbackTypeConverter(this);
this.fixedThrusterFeedbackTypeConverter = new FixedThrusterFeedbackTypeConverter(this);
this.fixedThrusterSetpointTypeConverter = new FixedThrusterSetpointTypeConverter(this);
this.generatorFeedbackTypeConverter = new GeneratorFeedbackTypeConverter(this);
this.linearAccelerationTypeConverter = new LinearAccelerationTypeConverter(this);
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/

package com.opensimulationplatform.modeldescription.xml.converter.displacement;

import com.opensimulationplatform.core.model.modeldescription.Variable;
Expand Down Expand Up @@ -28,9 +34,4 @@ public AngularDisplacement convert(AngularDisplacementType angularDisplacementTy

return angularDisplacement;
}

@Override
public List<AngularDisplacement> convert(List<AngularDisplacementType> angularDisplacementTypes) {
return angularDisplacementTypes.stream().map(this::convert).collect(Collectors.toList());
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/

package com.opensimulationplatform.modeldescription.xml.converter.displacement;

import com.opensimulationplatform.core.model.modeldescription.Variable;
Expand Down Expand Up @@ -28,9 +34,4 @@ public Charge convert(ChargeType chargeType) {

return charge;
}

@Override
public List<Charge> convert(List<ChargeType> chargeTypes) {
return chargeTypes.stream().map(this::convert).collect(Collectors.toList());
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/

package com.opensimulationplatform.modeldescription.xml.converter.displacement;

import com.opensimulationplatform.core.model.modeldescription.Variable;
Expand Down Expand Up @@ -28,9 +34,4 @@ public LinearDisplacement convert(LinearDisplacementType linearDisplacementType)

return linearDisplacement;
}

@Override
public List<LinearDisplacement> convert(List<LinearDisplacementType> linearDisplacementTypes) {
return linearDisplacementTypes.stream().map(this::convert).collect(Collectors.toList());
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/

package com.opensimulationplatform.modeldescription.xml.converter.displacement;

import com.opensimulationplatform.core.model.modeldescription.Variable;
Expand Down Expand Up @@ -28,9 +34,4 @@ public Volume convert(VolumeType volumeType) {

return volume;
}

@Override
public List<Volume> convert(List<VolumeType> volumeTypes) {
return volumeTypes.stream().map(this::convert).collect(Collectors.toList());
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/

package com.opensimulationplatform.modeldescription.xml.converter.effort;

import com.opensimulationplatform.core.model.modeldescription.Variable;
Expand Down Expand Up @@ -28,9 +34,4 @@ public Force convert(ForceType forceType) {

return force;
}

@Override
public List<Force> convert(List<ForceType> forceTypes) {
return forceTypes.stream().map(this::convert).collect(Collectors.toList());
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/

package com.opensimulationplatform.modeldescription.xml.converter.effort;

import com.opensimulationplatform.core.model.modeldescription.Variable;
Expand Down Expand Up @@ -29,9 +35,4 @@ public Pressure convert(PressureType pressureType) {
return pressure;

}

@Override
public List<Pressure> convert(List<PressureType> pressureTypes) {
return pressureTypes.stream().map(this::convert).collect(Collectors.toList());
}
}
Loading

0 comments on commit 3a88f10

Please sign in to comment.