From f7575ee23c9df6c4d82131ddc8c144076ec9f5e6 Mon Sep 17 00:00:00 2001 From: Sven Fillinger Date: Thu, 22 Jul 2021 14:53:19 +0200 Subject: [PATCH 01/10] Bump version from 2.10.0-SNAPSHOT to 2.10.0 --- .qube.yml | 2 +- docs/conf.py | 4 ++-- pom.xml | 2 +- qube.cfg | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.qube.yml b/.qube.yml index 7dfd999eb..79254c1b4 100644 --- a/.qube.yml +++ b/.qube.yml @@ -4,7 +4,7 @@ email: sven.fillinger@qbic.uni-tuebingen.de project_name: data-model-lib project_short_description: "Data models. A collection of QBiC's central data models\ \ and DTOs. " -version: 2.10.0-SNAPSHOT +version: 2.10.0 domain: lib language: groovy project_slug: data-model-lib diff --git a/docs/conf.py b/docs/conf.py index c5dd37677..e62182fc4 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -55,9 +55,9 @@ # the built documents. # # The short X.Y version. -version = '2.10.0-SNAPSHOT' +version = '2.10.0' # The full version, including alpha/beta/rc tags. -release = '2.10.0-SNAPSHOT' +release = '2.10.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/pom.xml b/pom.xml index 3e59c094c..b3256ddf9 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ life.qbic data-model-lib - 2.10.0-SNAPSHOT + 2.10.0 data-model-lib http://github.com/qbicsoftware/data-model-lib Data models. A collection of QBiC's central data models and DTOs. diff --git a/qube.cfg b/qube.cfg index a90a59eef..0df407b2e 100644 --- a/qube.cfg +++ b/qube.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 2.10.0-SNAPSHOT +current_version = 2.10.0 [bumpversion_files_whitelisted] dot_qube = .qube.yml From 734c29aa962e7bf89e61329f9c3c661ab70b3ac2 Mon Sep 17 00:00:00 2001 From: Sven Fillinger Date: Thu, 22 Jul 2021 14:53:21 +0200 Subject: [PATCH 02/10] Bump version from 2.10.0 to 2.11.0-SNAPSHOT --- .qube.yml | 2 +- CHANGELOG.rst | 12 ++++++++++++ docs/conf.py | 4 ++-- pom.xml | 2 +- qube.cfg | 2 +- 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.qube.yml b/.qube.yml index 79254c1b4..5c0e12586 100644 --- a/.qube.yml +++ b/.qube.yml @@ -4,7 +4,7 @@ email: sven.fillinger@qbic.uni-tuebingen.de project_name: data-model-lib project_short_description: "Data models. A collection of QBiC's central data models\ \ and DTOs. " -version: 2.10.0 +version: 2.11.0-SNAPSHOT domain: lib language: groovy project_slug: data-model-lib diff --git a/CHANGELOG.rst b/CHANGELOG.rst index fc8353e5d..51f72b3fd 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,18 @@ Changelog This project adheres to `Semantic Versioning `_. +2.11.0-SNAPSHOT (2021-07-22) +---------------------------- + +**Added** + +**Fixed** + +**Dependencies** + +**Deprecated** + + 2.10.0 (2021-07-19) ------------------- diff --git a/docs/conf.py b/docs/conf.py index e62182fc4..773caa191 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -55,9 +55,9 @@ # the built documents. # # The short X.Y version. -version = '2.10.0' +version = '2.11.0-SNAPSHOT' # The full version, including alpha/beta/rc tags. -release = '2.10.0' +release = '2.11.0-SNAPSHOT' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/pom.xml b/pom.xml index b3256ddf9..1883929ce 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ life.qbic data-model-lib - 2.10.0 + 2.11.0-SNAPSHOT data-model-lib http://github.com/qbicsoftware/data-model-lib Data models. A collection of QBiC's central data models and DTOs. diff --git a/qube.cfg b/qube.cfg index 0df407b2e..1b451da82 100644 --- a/qube.cfg +++ b/qube.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 2.10.0 +current_version = 2.11.0-SNAPSHOT [bumpversion_files_whitelisted] dot_qube = .qube.yml From 59dc9ef716d2f0867ebcd18ab7b9387d33f21277 Mon Sep 17 00:00:00 2001 From: Sven F Date: Thu, 22 Jul 2021 16:17:12 +0200 Subject: [PATCH 03/10] Create facility enum (#244) This PR adds a facility enum to describe facilities. Co-authored-by: Tobias Koch --- CHANGELOG.rst | 4 +- .../dtos/business/facilities/Facility.groovy | 54 +++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 src/main/groovy/life/qbic/datamodel/dtos/business/facilities/Facility.groovy diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 51f72b3fd..3c40b8fd7 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,11 +4,13 @@ Changelog This project adheres to `Semantic Versioning `_. -2.11.0-SNAPSHOT (2021-07-22) +2.11.0-SNAPSHOT ---------------------------- **Added** +* A new enumeration for facilities ``life.qbic.datamodel.dtos.business.facilities.Facility`` (`#244 `_) + **Fixed** **Dependencies** diff --git a/src/main/groovy/life/qbic/datamodel/dtos/business/facilities/Facility.groovy b/src/main/groovy/life/qbic/datamodel/dtos/business/facilities/Facility.groovy new file mode 100644 index 000000000..86b124a96 --- /dev/null +++ b/src/main/groovy/life/qbic/datamodel/dtos/business/facilities/Facility.groovy @@ -0,0 +1,54 @@ +package life.qbic.datamodel.dtos.business.facilities + +/** + *

Controlled vocabulary for concise core facility labels.

+ * + *

The following facilities are currently defined:

+ * + *
    + *
  • CFMB: Core Facility for Medical Bioanalytics
  • + *
  • IMGAG: Institute for Medical Genetics and Applied Genomics
  • + *
  • MGM: Institute for Medical Microbiology and Hygiene
  • + *
  • QBIC: Quantitative Biology Center
  • + *
  • PCT: Proteome Center Tübingen
  • + *
+ * + * @since 2.11.0 + */ +enum Facility { + + CFMB("Core Facility for Medical Bioanalytics"), + IMGAG("Institute for Medical Genetics and Applied Genomics"), + MGM("Institute for Medical Microbiology and Hygiene"), + QBIC("Quantitative Biology Center"), + PCT("Proteome Center Tübingen") + + private final String fullName + + /** + * Creates an instance of a facility enum + * @param fullName The full name representation of the enum + */ + Facility(String fullName) { + this.fullName = fullName + } + + /** + * Returns to the full name representation of the facility + * @return + */ + String getFullName() { + return this.fullName + } + + /** + * Returns a String representation of the facility enum. + * + * Is equivalent to {@link #getFullName()}. + * @return + */ + @Override + String toString() { + return this.getFullName() + } +} From 3c78e395083e8dcf3d5e665cc5ed416fc6290127 Mon Sep 17 00:00:00 2001 From: Sven F Date: Fri, 23 Jul 2021 11:00:37 +0200 Subject: [PATCH 04/10] Add internal, external unit price and service provider in products (#245) Co-authored-by: wow-such-code Co-authored-by: Tobias Koch --- CHANGELOG.rst | 3 + .../business/services/AtomicProduct.groovy | 23 +++++++ .../dtos/business/services/DataStorage.groovy | 22 +++++++ .../services/MetabolomicAnalysis.groovy | 23 +++++++ .../business/services/PartialProduct.groovy | 25 ++++++- .../business/services/PrimaryAnalysis.groovy | 23 +++++++ .../dtos/business/services/Product.groovy | 65 ++++++++++++++++++- .../services/ProjectManagement.groovy | 23 +++++++ .../services/ProteomicAnalysis.groovy | 23 +++++++ .../services/SecondaryAnalysis.groovy | 22 +++++++ .../dtos/business/services/Sequencing.groovy | 23 +++++++ .../dtos/business/ProductItemSpec.groovy | 17 +++-- 12 files changed, 285 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 3c40b8fd7..15f8df294 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -10,6 +10,7 @@ This project adheres to `Semantic Versioning `_. **Added** * A new enumeration for facilities ``life.qbic.datamodel.dtos.business.facilities.Facility`` (`#244 `_) +* New properties ``internalUnitPrice``, ``externalUnitPrice`` and ``serviceProvider`` for the ``life.qbic.datamodel.dtos.business.services.Product`` and its derivatives (`#245 `_) **Fixed** @@ -17,6 +18,8 @@ This project adheres to `Semantic Versioning `_. **Deprecated** +* The ``unitPrice`` property in ``life.qbic.datamodel.dtos.business.services.Product`` + 2.10.0 (2021-07-19) ------------------- diff --git a/src/main/groovy/life/qbic/datamodel/dtos/business/services/AtomicProduct.groovy b/src/main/groovy/life/qbic/datamodel/dtos/business/services/AtomicProduct.groovy index a186d2e26..d32b9d9ac 100644 --- a/src/main/groovy/life/qbic/datamodel/dtos/business/services/AtomicProduct.groovy +++ b/src/main/groovy/life/qbic/datamodel/dtos/business/services/AtomicProduct.groovy @@ -2,6 +2,7 @@ package life.qbic.datamodel.dtos.business.services import groovy.transform.EqualsAndHashCode import life.qbic.datamodel.dtos.business.ProductId +import life.qbic.datamodel.dtos.business.facilities.Facility /** * Describes a product type that can only have positive natural unit multipliers (N={0,1...,inf+}) @@ -23,8 +24,30 @@ class AtomicProduct extends Product { * @param unitPrice The price in € per unit * @param unit The product unit * @param productId The product identifier + * + * @deprecated 2.11.0 */ + @Deprecated AtomicProduct(String name, String description, double unitPrice, ProductUnit unit, ProductId productId) { super(name, description, unitPrice, unit, productId) } + + /** + * Basic product constructor. + * + * Checks that all passed arguments are not null. + * + * @param name The name of the product. + * @param description The description of what the product is about. + * @param internalUnitPrice The price in € per unit for internal customers + * @param externalUnitPrice The price in € per unit for external customers + * @param unit The product unit + * @param productId The product identifier + * @param serviceProvider The facility providing the service product + * + * @since 2.11.0 + */ + AtomicProduct(String name, String description, double internalUnitPrice, double externalUnitPrice, ProductUnit unit, ProductId productId, Facility serviceProvider) { + super(name, description, internalUnitPrice, externalUnitPrice, unit, productId, serviceProvider) + } } diff --git a/src/main/groovy/life/qbic/datamodel/dtos/business/services/DataStorage.groovy b/src/main/groovy/life/qbic/datamodel/dtos/business/services/DataStorage.groovy index e27ac8e76..21bc5fe2c 100644 --- a/src/main/groovy/life/qbic/datamodel/dtos/business/services/DataStorage.groovy +++ b/src/main/groovy/life/qbic/datamodel/dtos/business/services/DataStorage.groovy @@ -2,6 +2,7 @@ package life.qbic.datamodel.dtos.business.services import groovy.transform.EqualsAndHashCode import life.qbic.datamodel.dtos.business.ProductId +import life.qbic.datamodel.dtos.business.facilities.Facility /** * Describes a product for data storage services. @@ -37,8 +38,29 @@ class DataStorage extends PartialProduct { * @param unitPrice The price in € per unit * @param unit The product unit * @param runningNumber Number used in conjunction with ProductType{@link life.qbic.datamodel.dtos.business.services.ProductType} to identify product + * + * @deprecated 2.11.0 */ + @Deprecated DataStorage(String name, String description, double unitPrice, ProductUnit unit, long runningNumber) { super(name, description, unitPrice, unit, new ProductId.Builder(ProductType.DATA_STORAGE.toString(), runningNumber).build()) } + + /** + * Basic product constructor. + * + * Checks that all passed arguments are not null. + * + * @param name The name of the product. + * @param description The description of what the product is about. + * @param internalUnitPrice The price in € per unit for internal customers + * @param externalUnitPrice The price in € per unit for external customers + * @param unit The product unit + * @param runningNumber Number used in conjunction with ProductType{@link life.qbic.datamodel.dtos.business.services.ProductType} to identify product + * + * @since 2.11.0 + */ + DataStorage(String name, String description, double internalUnitPrice, double externalUnitPrice, ProductUnit unit, long runningNumber, Facility serviceProvider) { + super(name, description, internalUnitPrice, externalUnitPrice, unit, new ProductId.Builder(ProductType.DATA_STORAGE.toString(), runningNumber).build(), serviceProvider) + } } diff --git a/src/main/groovy/life/qbic/datamodel/dtos/business/services/MetabolomicAnalysis.groovy b/src/main/groovy/life/qbic/datamodel/dtos/business/services/MetabolomicAnalysis.groovy index 3eefc650d..b2e62e524 100644 --- a/src/main/groovy/life/qbic/datamodel/dtos/business/services/MetabolomicAnalysis.groovy +++ b/src/main/groovy/life/qbic/datamodel/dtos/business/services/MetabolomicAnalysis.groovy @@ -2,6 +2,7 @@ package life.qbic.datamodel.dtos.business.services import groovy.transform.EqualsAndHashCode import life.qbic.datamodel.dtos.business.ProductId +import life.qbic.datamodel.dtos.business.facilities.Facility /** * Describes a product for metabolomics services. @@ -37,9 +38,31 @@ class MetabolomicAnalysis extends AtomicProduct { * @param unitPrice The price in € per unit * @param unit The product unit * @param runningNumber Number used in conjunction with ProductType{@link life.qbic.datamodel.dtos.business.services.ProductType} to identify product + * + * @deprecated 2.11.0 */ + @Deprecated MetabolomicAnalysis(String name, String description, double unitPrice, ProductUnit unit, long runningNumber) { super(name, description, unitPrice, unit, new ProductId.Builder(ProductType.METABOLOMIC.toString(), runningNumber).build()) } + + /** + * Basic product constructor. + * + * Checks that all passed arguments are not null. + * + * @param name The name of the product. + * @param description The description of what the product is about. + * @param internalUnitPrice The price in € per unit for internal customers + * @param externalUnitPrice The price in € per unit for external customers + * @param unit The product unit + * @param runningNumber Number used in conjunction with ProductType{@link life.qbic.datamodel.dtos.business.services.ProductType} to identify product + * @param serviceProvider The facility providing the service product + * + * @since 2.11.0 + */ + MetabolomicAnalysis(String name, String description, double internalUnitPrice, double externalUnitPrice, ProductUnit unit, long runningNumber, Facility serviceProvider) { + super(name, description, internalUnitPrice, externalUnitPrice, unit, new ProductId.Builder(ProductType.METABOLOMIC.toString(), runningNumber).build(), serviceProvider) + } } diff --git a/src/main/groovy/life/qbic/datamodel/dtos/business/services/PartialProduct.groovy b/src/main/groovy/life/qbic/datamodel/dtos/business/services/PartialProduct.groovy index a521527e3..6aa73238f 100644 --- a/src/main/groovy/life/qbic/datamodel/dtos/business/services/PartialProduct.groovy +++ b/src/main/groovy/life/qbic/datamodel/dtos/business/services/PartialProduct.groovy @@ -2,9 +2,10 @@ package life.qbic.datamodel.dtos.business.services import groovy.transform.EqualsAndHashCode import life.qbic.datamodel.dtos.business.ProductId +import life.qbic.datamodel.dtos.business.facilities.Facility /** - * Describes a product type that can only have positive natural unit multipliers (N={0,1...,inf+}) + * Describes a product type that can have positive rational unit multipliers (N={0,1...,inf+}) * * An example for an PartialProduct is a sample data storage service product. You can offer * multiple of this product and express the quantities as i.e. 1.5 * 1 Terabyte (100€/Tb) => 1.5 @@ -24,8 +25,30 @@ class PartialProduct extends Product { * @param unitPrice The price in € per unit * @param unit The product unit * @param productId The product identifier + * + * @deprecated 2.11.0 */ + @Deprecated PartialProduct(String name, String description, double unitPrice, ProductUnit unit, ProductId productId) { super(name, description, unitPrice, unit, productId) } + + /** + * Basic product constructor. + * + * Checks that all passed arguments are not null. + * + * @param name The name of the product. + * @param description The description of what the product is about. + * @param internalUnitPrice The price in € per unit for internal customers + * @param externalUnitPrice The price in € per unit for external customers + * @param unit The product unit + * @param productId The product identifier + * @param serviceProvider The facility providing the service product + * + * @since 2.11.0 + */ + PartialProduct(String name, String description, double internalUnitPrice, double externalUnitPrice, ProductUnit unit, ProductId productId, Facility serviceProvider) { + super(name, description, internalUnitPrice, externalUnitPrice, unit, productId, serviceProvider) + } } diff --git a/src/main/groovy/life/qbic/datamodel/dtos/business/services/PrimaryAnalysis.groovy b/src/main/groovy/life/qbic/datamodel/dtos/business/services/PrimaryAnalysis.groovy index 403ebcd9d..2f06907d4 100644 --- a/src/main/groovy/life/qbic/datamodel/dtos/business/services/PrimaryAnalysis.groovy +++ b/src/main/groovy/life/qbic/datamodel/dtos/business/services/PrimaryAnalysis.groovy @@ -2,6 +2,7 @@ package life.qbic.datamodel.dtos.business.services import groovy.transform.EqualsAndHashCode import life.qbic.datamodel.dtos.business.ProductId +import life.qbic.datamodel.dtos.business.facilities.Facility /** * Describes a product for primary bioinformatic analysis services. @@ -37,8 +38,30 @@ class PrimaryAnalysis extends AtomicProduct { * @param unitPrice The price in € per unit * @param unit The product unit * @param runningNumber Number used in conjunction with ProductType{@link life.qbic.datamodel.dtos.business.services.ProductType} to identify product + * + * @deprecated 2.11.0 */ + @Deprecated PrimaryAnalysis(String name, String description, double unitPrice, ProductUnit unit, long runningNumber) { super(name, description, unitPrice, unit, new ProductId.Builder(ProductType.PRIMARY_BIOINFO.toString(), runningNumber).build()) } + + /** + * Basic product constructor. + * + * Checks that all passed arguments are not null. + * + * @param name The name of the product. + * @param description The description of what the product is about. + * @param internalUnitPrice The price in € per unit for internal customers + * @param externalUnitPrice The price in € per unit for external customers + * @param unit The product unit + * @param runningNumber Number used in conjunction with ProductType{@link life.qbic.datamodel.dtos.business.services.ProductType} to identify product + * @param serviceProvider The facility providing the service product + * + * @since 2.11.0 + */ + PrimaryAnalysis(String name, String description, double internalUnitPrice, double externalUnitPrice, ProductUnit unit, long runningNumber, Facility serviceProvider) { + super(name, description, internalUnitPrice, externalUnitPrice, unit, new ProductId.Builder(ProductType.PRIMARY_BIOINFO.toString(), runningNumber).build(), serviceProvider) + } } diff --git a/src/main/groovy/life/qbic/datamodel/dtos/business/services/Product.groovy b/src/main/groovy/life/qbic/datamodel/dtos/business/services/Product.groovy index bac3abb94..659590545 100644 --- a/src/main/groovy/life/qbic/datamodel/dtos/business/services/Product.groovy +++ b/src/main/groovy/life/qbic/datamodel/dtos/business/services/Product.groovy @@ -2,6 +2,7 @@ package life.qbic.datamodel.dtos.business.services import groovy.transform.EqualsAndHashCode import life.qbic.datamodel.dtos.business.ProductId +import life.qbic.datamodel.dtos.business.facilities.Facility /** * Holds information about a simple QBiC service product. @@ -25,10 +26,33 @@ abstract class Product { final String productName /** - * The unit price in €/unit. + * The unit price in €/unit for customers. Can be 0 in case the deprecated constructor was used to create the product. + * + * @deprecated 2.11.0, please call the {@link #internalUnitPrice} or {@link #externalUnitPrice} */ final double unitPrice + /** + * The The unit price in €/unit for internal customers. + * + * @since 2.11.0 + */ + final double internalUnitPrice + + /** + * The unit price in €/unit for external customers. + * + * @since 2.11.0 + */ + final double externalUnitPrice + + /** + * The facility that provides the service product. + * + * @since 2.11.0 + */ + final Facility serviceProvider + /** * The currency of the price */ @@ -54,7 +78,10 @@ abstract class Product { * @param unitPrice The price in € per unit * @param unit The product unit * @param productId The Id of the product + * + * @deprecated 2.11.0 */ + @Deprecated Product(String name, String description, double unitPrice, ProductUnit unit, ProductId productId) { this.productName = Objects.requireNonNull(name, "Name must not be null") this.description = Objects.requireNonNull(description, "Description must not be null") @@ -63,6 +90,42 @@ abstract class Product { this.productId = Objects.requireNonNull(productId, "ProductId must not be null") //currency is on default in euro this.currency = Currency.getInstance(Locale.GERMANY) + this.externalUnitPrice = 0.00 + this.internalUnitPrice = 0.00 + this.serviceProvider = Facility.QBIC + } + /** + * Basic product constructor. + * + * Checks that all passed arguments except productId are not null. + * + * @param name The name of the product. + * @param description The description of what the product is about. + * @param internalUnitPrice The price in € per unit for internal customers + * @param externalUnitPrice The price in € per unit for external customers + * @param unit The product unit + * @param productId The Id of the product + * + * @since 2.11.0 + */ + Product(String name, + String description, + double internalUnitPrice, + double externalUnitPrice, + ProductUnit unit, + ProductId productId, + Facility serviceProvider) { + this.productName = Objects.requireNonNull(name, "Name must not be null") + this.description = Objects.requireNonNull(description, "Description must not be null") + this.internalUnitPrice = Objects.requireNonNull(internalUnitPrice, "Internal unit price must not be null") + this.externalUnitPrice = Objects.requireNonNull(externalUnitPrice, "External unit price must not be null") + this.unitPrice = 0.00 + this.unit = Objects.requireNonNull(unit, "Unit must not be null") + this.productId = Objects.requireNonNull(productId, "ProductId must not be null") + //currency is on default in euro + this.currency = Currency.getInstance(Locale.GERMANY) + this.serviceProvider = Objects.requireNonNull(serviceProvider, "Service provider must not be null") } + } diff --git a/src/main/groovy/life/qbic/datamodel/dtos/business/services/ProjectManagement.groovy b/src/main/groovy/life/qbic/datamodel/dtos/business/services/ProjectManagement.groovy index e7c66cf4c..e99d1c65f 100644 --- a/src/main/groovy/life/qbic/datamodel/dtos/business/services/ProjectManagement.groovy +++ b/src/main/groovy/life/qbic/datamodel/dtos/business/services/ProjectManagement.groovy @@ -2,6 +2,7 @@ package life.qbic.datamodel.dtos.business.services import groovy.transform.EqualsAndHashCode import life.qbic.datamodel.dtos.business.ProductId +import life.qbic.datamodel.dtos.business.facilities.Facility /** * Describes a product for project management services. @@ -37,8 +38,30 @@ class ProjectManagement extends PartialProduct { * @param unitPrice The price in € per unit * @param unit The product unit * @param runningNumber Number used in conjunction with ProductType{@link life.qbic.datamodel.dtos.business.services.ProductType} to identify product + * + * @deprecated 2.11.0 */ + @Deprecated ProjectManagement(String name, String description, double unitPrice, ProductUnit unit, long runningNumber) { super(name, description, unitPrice, unit, new ProductId.Builder(ProductType.PROJECT_MANAGEMENT.toString(), runningNumber).build()) } + + /** + * Basic product constructor. + * + * Checks that all passed arguments are not null. + * + * @param name The name of the product. + * @param description The description of what the product is about. + * @param internalUnitPrice The price in € per unit for internal customers + * @param externalUnitPrice The price in € per unit for external customers + * @param unit The product unit + * @param runningNumber Number used in conjunction with ProductType{@link life.qbic.datamodel.dtos.business.services.ProductType} to identify product + * @param serviceProvider The facility providing the service product + * + * @since 2.11.0 + */ + ProjectManagement(String name, String description, double internalUnitPrice, double externalUnitPrice, ProductUnit unit, long runningNumber, Facility serviceProvider) { + super(name, description, internalUnitPrice, externalUnitPrice, unit, new ProductId.Builder(ProductType.PROJECT_MANAGEMENT.toString(), runningNumber).build(), serviceProvider) + } } diff --git a/src/main/groovy/life/qbic/datamodel/dtos/business/services/ProteomicAnalysis.groovy b/src/main/groovy/life/qbic/datamodel/dtos/business/services/ProteomicAnalysis.groovy index bad5506fd..aa6b50aca 100644 --- a/src/main/groovy/life/qbic/datamodel/dtos/business/services/ProteomicAnalysis.groovy +++ b/src/main/groovy/life/qbic/datamodel/dtos/business/services/ProteomicAnalysis.groovy @@ -2,6 +2,7 @@ package life.qbic.datamodel.dtos.business.services import groovy.transform.EqualsAndHashCode import life.qbic.datamodel.dtos.business.ProductId +import life.qbic.datamodel.dtos.business.facilities.Facility /** * Describes a product for proteomics services. @@ -38,8 +39,30 @@ class ProteomicAnalysis extends AtomicProduct { * @param unitPrice The price in € per unit * @param unit The product unit * @param runningNumber Number used in conjunction with ProductType{@link life.qbic.datamodel.dtos.business.services.ProductType} to identify product + * + * @deprecated 2.11.0 */ + @Deprecated ProteomicAnalysis(String name, String description, double unitPrice, ProductUnit unit, long runningNumber) { super(name, description, unitPrice, unit, new ProductId.Builder(ProductType.PROTEOMIC.toString(), runningNumber).build()) } + + /** + * Basic product constructor. + * + * Checks that all passed arguments are not null. + * + * @param name The name of the product. + * @param description The description of what the product is about. + * @param internalUnitPrice The price in € per unit for internal customers + * @param externalUnitPrice The price in € per unit for external customers + * @param unit The product unit + * @param runningNumber Number used in conjunction with ProductType{@link life.qbic.datamodel.dtos.business.services.ProductType} to identify product + * @param serviceProvider The facility providing the service product + * + * @since 2.11.0 + */ + ProteomicAnalysis(String name, String description, double internalUnitPrice, double externalUnitPrice, ProductUnit unit, long runningNumber, Facility serviceProvider) { + super(name, description, internalUnitPrice, externalUnitPrice, unit, new ProductId.Builder(ProductType.PROTEOMIC.toString(), runningNumber).build(), serviceProvider) + } } diff --git a/src/main/groovy/life/qbic/datamodel/dtos/business/services/SecondaryAnalysis.groovy b/src/main/groovy/life/qbic/datamodel/dtos/business/services/SecondaryAnalysis.groovy index 7be726a3d..25407a3ae 100644 --- a/src/main/groovy/life/qbic/datamodel/dtos/business/services/SecondaryAnalysis.groovy +++ b/src/main/groovy/life/qbic/datamodel/dtos/business/services/SecondaryAnalysis.groovy @@ -2,6 +2,7 @@ package life.qbic.datamodel.dtos.business.services import groovy.transform.EqualsAndHashCode import life.qbic.datamodel.dtos.business.ProductId +import life.qbic.datamodel.dtos.business.facilities.Facility /** @@ -38,8 +39,29 @@ class SecondaryAnalysis extends AtomicProduct { * @param unitPrice The price in € per unit * @param unit The product unit * @param runningNumber Number used in conjunction with ProductType{@link life.qbic.datamodel.dtos.business.services.ProductType} to identify product + * + * @deprecated 2.11.0 */ + @Deprecated SecondaryAnalysis(String name, String description, double unitPrice, ProductUnit unit, long runningNumber) { super(name, description, unitPrice, unit, new ProductId.Builder(ProductType.SECONDARY_BIOINFO.toString(), runningNumber).build()) } + + /** + * Basic product constructor. + * + * Checks that all passed arguments are not null. + * + * @param name The name of the product. + * @param description The description of what the product is about. + * @param internalUnitPrice The price in € per unit for internal customers + * @param externalUnitPrice The price in € per unit for external customers + * @param unit The product unit + * @param runningNumber Number used in conjunction with ProductType{@link life.qbic.datamodel.dtos.business.services.ProductType} to identify product + * + * @since 2.11.0 + */ + SecondaryAnalysis(String name, String description, double internalUnitPrice, double externalUnitPrice, ProductUnit unit, long runningNumber, Facility serviceProvider) { + super(name, description, internalUnitPrice, externalUnitPrice, unit, new ProductId.Builder(ProductType.SECONDARY_BIOINFO.toString(), runningNumber).build(), serviceProvider) + } } diff --git a/src/main/groovy/life/qbic/datamodel/dtos/business/services/Sequencing.groovy b/src/main/groovy/life/qbic/datamodel/dtos/business/services/Sequencing.groovy index 99fdf13d8..a99f1e518 100644 --- a/src/main/groovy/life/qbic/datamodel/dtos/business/services/Sequencing.groovy +++ b/src/main/groovy/life/qbic/datamodel/dtos/business/services/Sequencing.groovy @@ -2,6 +2,7 @@ package life.qbic.datamodel.dtos.business.services import groovy.transform.EqualsAndHashCode import life.qbic.datamodel.dtos.business.ProductId +import life.qbic.datamodel.dtos.business.facilities.Facility /** * Describes a product for sequencing services. @@ -37,8 +38,30 @@ class Sequencing extends AtomicProduct { * @param unitPrice The price in € per unit * @param unit The product unit * @param runningNumber Number used in conjunction with ProductType{@link life.qbic.datamodel.dtos.business.services.ProductType} to identify product + * + * @deprecated 2.11.0 */ + @Deprecated Sequencing(String name, String description, double unitPrice, ProductUnit unit, long runningNumber) { super(name, description, unitPrice, unit, new ProductId.Builder(ProductType.SEQUENCING.toString(), runningNumber).build()) } + + /** + * Basic product constructor. + * + * Checks that all passed arguments are not null. + * + * @param name The name of the product. + * @param description The description of what the product is about. + * @param internalUnitPrice The price in € per unit for internal customers + * @param externalUnitPrice The price in € per unit for external customers + * @param unit The product unit + * @param runningNumber Number used in conjunction with ProductType{@link life.qbic.datamodel.dtos.business.services.ProductType} to identify product + * @param serviceProvider The facility providing the service product + * + * @since 2.11.0 + */ + Sequencing(String name, String description, double internalUnitPrice, double externalUnitPrice, ProductUnit unit, long runningNumber, Facility serviceProvider) { + super(name, description, internalUnitPrice, externalUnitPrice, unit, new ProductId.Builder(ProductType.SEQUENCING.toString(), runningNumber).build(), serviceProvider) + } } diff --git a/src/test/groovy/life/qbic/datamodel/dtos/business/ProductItemSpec.groovy b/src/test/groovy/life/qbic/datamodel/dtos/business/ProductItemSpec.groovy index 79f9e3704..413070ee6 100644 --- a/src/test/groovy/life/qbic/datamodel/dtos/business/ProductItemSpec.groovy +++ b/src/test/groovy/life/qbic/datamodel/dtos/business/ProductItemSpec.groovy @@ -1,5 +1,6 @@ package life.qbic.datamodel.dtos.business +import life.qbic.datamodel.dtos.business.facilities.Facility import life.qbic.datamodel.dtos.business.services.Product import life.qbic.datamodel.dtos.business.services.ProductUnit import life.qbic.datamodel.dtos.business.services.Sequencing @@ -16,7 +17,7 @@ class ProductItemSpec extends Specification { def "ProductItem shall store and provide the given properties: name, description and product"() { when: - Product product = new Sequencing("RNA Sequencing", "This package manages the pricing for all RNA sequencings", 1.0, ProductUnit.PER_SAMPLE, "1") + Product product = new Sequencing("RNA Sequencing", "This package manages the pricing for all RNA sequencings", 1.0, 3.0, ProductUnit.PER_SAMPLE, 1, Facility.QBIC) def productItem = new ProductItem(3.0, product) @@ -27,21 +28,27 @@ class ProductItemSpec extends Specification { def "Products shall be comparable"(){ when: - Product product = new Sequencing("RNA Sequencing", "This package manages the pricing for all RNA sequencings", 1.0, ProductUnit.PER_SAMPLE, "1") - Product product2 = new Sequencing("RNA Sequencing", "This package manages the pricing for all RNA sequencings", 1.0, ProductUnit.PER_SAMPLE, "1") + Product product = new Sequencing("RNA Sequencing", "This package manages the pricing for all RNA sequencings", 1.0, ProductUnit.PER_SAMPLE, 1) + Product product2 = new Sequencing("RNA Sequencing", "This package manages the pricing for all RNA sequencings", 1.0, 2.0, ProductUnit.PER_SAMPLE, 1, Facility.QBIC) + Product product3 = new Sequencing("RNA Sequencing", "This package manages the pricing for all RNA sequencings", 1.0, 2.0, ProductUnit.PER_SAMPLE, 1, Facility.QBIC) then: product.currency == product2.currency product.description == product2.description product.productName == product2.productName product.unit == product2.unit - product.unitPrice == product2.unitPrice + product.unitPrice != product2.unitPrice + product2.unitPrice == 0 product.productId.toString() == product2.productId.toString() + + product3.internalUnitPrice == product2.internalUnitPrice + product3.externalUnitPrice == product2.externalUnitPrice + product3.equals(product2) } def "Product currency is euro"(){ when: - Product product = new Sequencing("RNA Sequencing", "This package manages the pricing for all RNA sequencings", 1.0, ProductUnit.PER_SAMPLE, "1") + Product product = new Sequencing("RNA Sequencing", "This package manages the pricing for all RNA sequencings", 1.0, 2.0, ProductUnit.PER_SAMPLE, 1, Facility.QBIC) then: product.currency.toString() == "EUR" From 82c585fbf24fe0c93ec98b89665e26e908d713a4 Mon Sep 17 00:00:00 2001 From: jnnfr Date: Mon, 26 Jul 2021 14:12:19 +0200 Subject: [PATCH 05/10] Add discount properties (#246) Add the discount to the productitems and the offer dto Co-authored-by: Sven F. --- CHANGELOG.rst | 1 + .../qbic/datamodel/dtos/business/Offer.groovy | 12 ++++++++ .../dtos/business/ProductItem.groovy | 30 ++++++++++++++++++- 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 15f8df294..fb277288c 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -11,6 +11,7 @@ This project adheres to `Semantic Versioning `_. * A new enumeration for facilities ``life.qbic.datamodel.dtos.business.facilities.Facility`` (`#244 `_) * New properties ``internalUnitPrice``, ``externalUnitPrice`` and ``serviceProvider`` for the ``life.qbic.datamodel.dtos.business.services.Product`` and its derivatives (`#245 `_) +* New properties ``totalPrice`` and ``totalDiscountPrice`` for the ``life.qbic.datamodel.dtos.business.ProductItem`` and ``totalDiscountPrice`` for the ``life.qbic.datamodel.dtos.business.Offer`` **Fixed** diff --git a/src/main/groovy/life/qbic/datamodel/dtos/business/Offer.groovy b/src/main/groovy/life/qbic/datamodel/dtos/business/Offer.groovy index a9249157e..6ca9075bc 100644 --- a/src/main/groovy/life/qbic/datamodel/dtos/business/Offer.groovy +++ b/src/main/groovy/life/qbic/datamodel/dtos/business/Offer.groovy @@ -72,6 +72,10 @@ class Offer { * The amount of overheads part, of the total price */ final double overheads + /** + * The sum of all discounts for this offer + */ + final double totalDiscountPrice /** * The identifier for the offer which makes it distinguishable from other offers */ @@ -132,6 +136,7 @@ class Offer { */ double totalPrice double netPrice + double totalDiscountPrice double taxes double overheads double itemsWithOverheadNet @@ -165,6 +170,7 @@ class Offer { this.overheads = 0 this.taxes = 0 this.totalPrice = 0 + this.totalDiscountPrice = 0 this.itemsWithOverhead = [] this.itemsWithoutOverhead = [] this.itemsWithOverheadNet = 0 @@ -263,6 +269,11 @@ class Offer { return this } + Builder totalDiscountPrice(double totalDiscountPrice){ + this.totalDiscountPrice = totalDiscountPrice + return this + } + Offer build() { return new Offer(this) } @@ -306,6 +317,7 @@ class Offer { this.itemsWithOverheadNetPrice = builder.itemsWithOverheadNet this.itemsWithoutOverheadNetPrice = builder.itemsWithoutOverheadNet this.overheadRatio = builder.overheadRatio + this.totalDiscountPrice = builder.totalDiscountPrice if (builder.associatedProject.isPresent()) { this.associatedProject = Optional.of(builder.associatedProject.get()) diff --git a/src/main/groovy/life/qbic/datamodel/dtos/business/ProductItem.groovy b/src/main/groovy/life/qbic/datamodel/dtos/business/ProductItem.groovy index c2235b04e..d9a92fae1 100644 --- a/src/main/groovy/life/qbic/datamodel/dtos/business/ProductItem.groovy +++ b/src/main/groovy/life/qbic/datamodel/dtos/business/ProductItem.groovy @@ -23,10 +23,38 @@ class ProductItem { */ final Product product + /** + * Describes the total price of an item based on the quantity and unit price of a product + */ + final double totalPrice + + /** + * Describe the total discount price for a product (based on the quantity) + */ + final double quantityDiscount + + /** + * + * @param quantity The quantity of a product + * @param product The product for which an item is created + * + * @deprecated 2.11.0 + */ + @Deprecated ProductItem(double quantity, Product product) { this.quantity = quantity this.product = product + this.totalPrice = 0 + this.quantityDiscount = 0 } -} + ProductItem(double quantity, Product product, double totalPrice, double quantityDiscount) { + this.quantity = quantity + this.product = product + this.totalPrice = totalPrice + this.quantityDiscount = quantityDiscount + } + + +} From 920a36f2beaa82e090f35425678d9735296eaded Mon Sep 17 00:00:00 2001 From: Tobias Koch Date: Tue, 27 Jul 2021 13:12:18 +0200 Subject: [PATCH 06/10] Feature facility factory (#247) * Add FacilityFactory * Update JavaDoc * Update CHANGELOG --- CHANGELOG.rst | 2 +- .../facilities/FacilityFactory.groovy | 31 +++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 src/main/groovy/life/qbic/datamodel/dtos/business/facilities/FacilityFactory.groovy diff --git a/CHANGELOG.rst b/CHANGELOG.rst index fb277288c..bc13d9e8b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -12,7 +12,7 @@ This project adheres to `Semantic Versioning `_. * A new enumeration for facilities ``life.qbic.datamodel.dtos.business.facilities.Facility`` (`#244 `_) * New properties ``internalUnitPrice``, ``externalUnitPrice`` and ``serviceProvider`` for the ``life.qbic.datamodel.dtos.business.services.Product`` and its derivatives (`#245 `_) * New properties ``totalPrice`` and ``totalDiscountPrice`` for the ``life.qbic.datamodel.dtos.business.ProductItem`` and ``totalDiscountPrice`` for the ``life.qbic.datamodel.dtos.business.Offer`` - +* A ``life.qbic.datamodel.dtos.business.facilities.FacilityFactory`` to get the facility for a given string representation (`#247 `_) **Fixed** **Dependencies** diff --git a/src/main/groovy/life/qbic/datamodel/dtos/business/facilities/FacilityFactory.groovy b/src/main/groovy/life/qbic/datamodel/dtos/business/facilities/FacilityFactory.groovy new file mode 100644 index 000000000..82199a6ce --- /dev/null +++ b/src/main/groovy/life/qbic/datamodel/dtos/business/facilities/FacilityFactory.groovy @@ -0,0 +1,31 @@ +package life.qbic.datamodel.dtos.business.facilities + +import life.qbic.datamodel.dtos.EnumFactory + +/** + * This class provides functionality for enum key retrieval + * + * This class retrieves the corresponding Facility for a given String + * + * @see Facility + * @since: 2.11.0 + */ +class FacilityFactory extends EnumFactory { + /** + * This method returns the enum with the provided String value. + * + * @throws IllegalArgumentException in case the String could not be mapped + * @param value the String corresponding to a key of the enum + * @return the enum key for the provided string value + * @since 2.11.0 + */ + @Override + Facility getForString(String value) { + Facility desiredKey + desiredKey = Facility.values().find {it.fullName.equals(value.trim())} + if (!desiredKey) { + throw new IllegalArgumentException("Invalid value '$value' for ${Facility.getSimpleName()}") + } + return desiredKey + } +} From c184ff4df1ae79a81f7b449b47434a92bd2544b8 Mon Sep 17 00:00:00 2001 From: wow-such-code Date: Fri, 30 Jul 2021 11:16:37 +0200 Subject: [PATCH 07/10] validate ProjectSpace names (#249) * validate ProjectSpace names Co-authored-by: Sven F. --- CHANGELOG.rst | 3 +++ .../dtos/projectmanagement/ProjectSpace.groovy | 13 +++++++++++++ .../dtos/projectmanagement/ProjectSpaceSpec.groovy | 12 ++++++++++++ 3 files changed, 28 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index bc13d9e8b..14d421119 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -13,8 +13,11 @@ This project adheres to `Semantic Versioning `_. * New properties ``internalUnitPrice``, ``externalUnitPrice`` and ``serviceProvider`` for the ``life.qbic.datamodel.dtos.business.services.Product`` and its derivatives (`#245 `_) * New properties ``totalPrice`` and ``totalDiscountPrice`` for the ``life.qbic.datamodel.dtos.business.ProductItem`` and ``totalDiscountPrice`` for the ``life.qbic.datamodel.dtos.business.Offer`` * A ``life.qbic.datamodel.dtos.business.facilities.FacilityFactory`` to get the facility for a given string representation (`#247 `_) + **Fixed** +* ProjectSpace names are now validated (`#249 `_) + **Dependencies** **Deprecated** diff --git a/src/main/groovy/life/qbic/datamodel/dtos/projectmanagement/ProjectSpace.groovy b/src/main/groovy/life/qbic/datamodel/dtos/projectmanagement/ProjectSpace.groovy index f2383ba46..934f3d5a9 100644 --- a/src/main/groovy/life/qbic/datamodel/dtos/projectmanagement/ProjectSpace.groovy +++ b/src/main/groovy/life/qbic/datamodel/dtos/projectmanagement/ProjectSpace.groovy @@ -23,11 +23,24 @@ final class ProjectSpace { */ final String name + /** + * Alphanumerical characters, underscores and '-' allowed, German umlauts will lead to a mismatch + */ + private static final def SPACE_NAME_REGEX = ~'[-\\w]+' + ProjectSpace(String name) { final def space = Objects.requireNonNull(name, "Space name must not be null.") + validateName(name) this.name = formatSpaceName(space) } + private void validateName(String name) { + // validation happens with the formatted name, but the input name must be returned so the user does not get confused + if(! SPACE_NAME_REGEX.matcher(formatSpaceName(name)).matches()) { + throw new IllegalArgumentException("${name} is not a valid project code.") + } + } + private static String formatSpaceName(String name) { def capitalizedName = name.trim().toUpperCase() def refactoredName = capitalizedName.replaceAll("\\s+", "_") diff --git a/src/test/groovy/life/qbic/datamodel/dtos/projectmanagement/ProjectSpaceSpec.groovy b/src/test/groovy/life/qbic/datamodel/dtos/projectmanagement/ProjectSpaceSpec.groovy index a10f8a88b..7d9b9ee2f 100644 --- a/src/test/groovy/life/qbic/datamodel/dtos/projectmanagement/ProjectSpaceSpec.groovy +++ b/src/test/groovy/life/qbic/datamodel/dtos/projectmanagement/ProjectSpaceSpec.groovy @@ -20,6 +20,18 @@ class ProjectSpaceSpec extends Specification { space.name.equals("MY_NEW_SPACE") } + def "A String violating the space name format standard shall throw an IllegalArgumentException" () { + given: + String invalidCode = "Plausibilitätsüberprüfungs_Space" + + when: + new ProjectSpace(invalidCode) + + then: + thrown(IllegalArgumentException) + + } + def "Dashes are replaced by underscores"() { given: String projectSpaceName = "my-new-space" From fa2e62382096bffd602c31f16031dc6e24f483c0 Mon Sep 17 00:00:00 2001 From: Tobias Koch Date: Tue, 3 Aug 2021 11:07:51 +0200 Subject: [PATCH 08/10] add tests for equality to product item (#248) * add tests for equality * test different constructors * remove deprecated constructor from difference check --- .../dtos/business/ProductItemSpec.groovy | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/src/test/groovy/life/qbic/datamodel/dtos/business/ProductItemSpec.groovy b/src/test/groovy/life/qbic/datamodel/dtos/business/ProductItemSpec.groovy index 413070ee6..99a15799d 100644 --- a/src/test/groovy/life/qbic/datamodel/dtos/business/ProductItemSpec.groovy +++ b/src/test/groovy/life/qbic/datamodel/dtos/business/ProductItemSpec.groovy @@ -1,10 +1,12 @@ package life.qbic.datamodel.dtos.business import life.qbic.datamodel.dtos.business.facilities.Facility +import life.qbic.datamodel.dtos.business.services.PrimaryAnalysis import life.qbic.datamodel.dtos.business.services.Product import life.qbic.datamodel.dtos.business.services.ProductUnit import life.qbic.datamodel.dtos.business.services.Sequencing import spock.lang.Specification +import spock.lang.Unroll /** * Simple tests for the ProductItem dto class @@ -25,6 +27,50 @@ class ProductItemSpec extends Specification { productItem.product == product } + def "Equal ProductItems shall be equal"() { + + given: "two product item contents" + def referenceProduct = new Sequencing("RNA Sequencing", "This package manages the pricing for all RNA sequencings", 1.0, 3.0, ProductUnit.PER_SAMPLE, 1, Facility.QBIC) + Double referenceQuantity = 1.0 + Double referenceTotalPrice = 3.0 + Double referenceQuantityDiscount = 0.0 + + when: "two product items are created from the same content" + ProductItem item1 = new ProductItem(referenceQuantity, referenceProduct, referenceTotalPrice, referenceQuantityDiscount) + ProductItem item2 = new ProductItem(referenceQuantity, referenceProduct, referenceTotalPrice, referenceQuantityDiscount) + + ProductItem item3 = new ProductItem(referenceQuantity, referenceProduct) + ProductItem item4 = new ProductItem(referenceQuantity, referenceProduct) + + then: "the product items are equal" + item1 == item2 + item3 == item4 + } + + @Unroll + def "Different ProductItems shall be different for property #differentProperty"() { + + given: "a reference product item and a different product" + def referenceProduct = new Sequencing("RNA Sequencing", "This package manages the pricing for all RNA sequencings", 1.0, 3.0, ProductUnit.PER_SAMPLE, 1, Facility.QBIC) + Double referenceQuantity = 1.0 + Double referenceTotalPrice = 3.0 + Double referenceQuantityDiscount = 0.0 + + when: "we create a product item with different information" + ProductItem reference = new ProductItem(referenceQuantity, referenceProduct, referenceTotalPrice, referenceQuantityDiscount) + ProductItem differentItem = new ProductItem(quantity, product, totalPrice, quantityDiscount) + + then: "the product items are not equal" + reference != differentItem + + where: "for every property" + differentProperty | quantity| product| totalPrice| quantityDiscount + "quantity" | 1.0 +1 | new Sequencing("RNA Sequencing", "This package manages the pricing for all RNA sequencings", 1.0, 3.0, ProductUnit.PER_SAMPLE, 1, Facility.QBIC) | 3.0 | 0.0 + "product" | 1.0 | new PrimaryAnalysis("Test", "Different description", 1.0, 3.0, ProductUnit.PER_SAMPLE, 1, Facility.QBIC) | 3.0 | 0.0 + "totalPrice" | 1.0 | new Sequencing("RNA Sequencing", "This package manages the pricing for all RNA sequencings", 1.0, 3.0, ProductUnit.PER_SAMPLE, 1, Facility.QBIC) | 3.0 +1 | 0.0 + "quantityDiscount" | 1.0 | new Sequencing("RNA Sequencing", "This package manages the pricing for all RNA sequencings", 1.0, 3.0, ProductUnit.PER_SAMPLE, 1, Facility.QBIC) | 3.0 | 0.0 + 1 + } + def "Products shall be comparable"(){ when: From 708b371de0b13b52c908d2ae012d736078ecd077 Mon Sep 17 00:00:00 2001 From: Tobias Koch Date: Tue, 3 Aug 2021 11:09:37 +0200 Subject: [PATCH 09/10] Bump version from 2.11.0-SNAPSHOT to 2.11.0 --- .qube.yml | 2 +- docs/conf.py | 4 ++-- pom.xml | 2 +- qube.cfg | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.qube.yml b/.qube.yml index 5c0e12586..16c8c2b91 100644 --- a/.qube.yml +++ b/.qube.yml @@ -4,7 +4,7 @@ email: sven.fillinger@qbic.uni-tuebingen.de project_name: data-model-lib project_short_description: "Data models. A collection of QBiC's central data models\ \ and DTOs. " -version: 2.11.0-SNAPSHOT +version: 2.11.0 domain: lib language: groovy project_slug: data-model-lib diff --git a/docs/conf.py b/docs/conf.py index 773caa191..f52e8af91 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -55,9 +55,9 @@ # the built documents. # # The short X.Y version. -version = '2.11.0-SNAPSHOT' +version = '2.11.0' # The full version, including alpha/beta/rc tags. -release = '2.11.0-SNAPSHOT' +release = '2.11.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/pom.xml b/pom.xml index 1883929ce..ef655aaee 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ life.qbic data-model-lib - 2.11.0-SNAPSHOT + 2.11.0 data-model-lib http://github.com/qbicsoftware/data-model-lib Data models. A collection of QBiC's central data models and DTOs. diff --git a/qube.cfg b/qube.cfg index 1b451da82..12aac7923 100644 --- a/qube.cfg +++ b/qube.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 2.11.0-SNAPSHOT +current_version = 2.11.0 [bumpversion_files_whitelisted] dot_qube = .qube.yml From 8964db4b4951f7975606f80e02fcad53383fd214 Mon Sep 17 00:00:00 2001 From: Tobias Koch Date: Tue, 3 Aug 2021 11:13:00 +0200 Subject: [PATCH 10/10] Update version in CHANGELOG.rst --- CHANGELOG.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 14d421119..da1c1a871 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,7 +4,7 @@ Changelog This project adheres to `Semantic Versioning `_. -2.11.0-SNAPSHOT +2.11.0 (2021-08-03) ---------------------------- **Added**