diff --git a/CHANGELOG.md b/CHANGELOG.md index bbb71ea..7610d34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ ## Layout Framework Version History +**Changes in version 5.6** + +- Added NAACCR 25 XML layout; documentation is not available yet for new data items. +- Updated NAACCR XML library from version 10.1 to version 11.0. +- Updated CSV library from version 5.8 to version 5.9. + **Changes in version 5.5** - Fixed NAACCR 24 Incidence layout having the wrong name. diff --git a/build.gradle b/build.gradle index e25d0bb..8efaa23 100644 --- a/build.gradle +++ b/build.gradle @@ -4,13 +4,13 @@ plugins { id 'java-library' id 'checkstyle' id 'jacoco' - id 'com.github.spotbugs' version '5.2.1' + id 'com.github.spotbugs' version '6.0.19' id 'maven-publish' id 'signing' - id 'io.github.gradle-nexus.publish-plugin' version '1.3.0' // publish to Maven Central - id 'com.github.ben-manes.versions' version '0.49.0' // check for out-of-date dependencies (run 'dependencyUpdates' manually) - id 'org.sonatype.gradle.plugins.scan' version '2.6.1' // scan for vulnerabilities - id "org.sonarqube" version "4.4.1.3373"// sonarQube analysis + id 'io.github.gradle-nexus.publish-plugin' version '2.0.0' // publish to Maven Central + id 'com.github.ben-manes.versions' version '0.51.0' // check for out-of-date dependencies (run 'dependencyUpdates' manually) + id 'org.sonatype.gradle.plugins.scan' version '2.8.2' // scan for vulnerabilities + id 'org.sonarqube' version '5.1.0.4882' // sonarQube analysis } group = 'com.imsweb' @@ -28,19 +28,19 @@ repositories { } dependencies { - api 'com.imsweb:naaccr-xml:10.1' + api 'com.imsweb:naaccr-xml:11.0' - implementation 'commons-io:commons-io:2.15.0' - implementation 'com.opencsv:opencsv:5.8' + implementation 'commons-io:commons-io:2.16.1' + implementation 'com.opencsv:opencsv:5.9' implementation 'com.thoughtworks.xstream:xstream:1.4.20' testImplementation 'junit:junit:4.13.2' testImplementation 'com.imsweb:seerutils:5.6' testImplementation 'com.imsweb:seerutils-gui:1.20' testImplementation 'com.imsweb:naaccr-api-client:1.0' // access NAACCR documentation API - testImplementation 'org.commonmark:commonmark:0.21.0' // convert markdown to HTML for NAACCR documentation - testImplementation 'org.freemarker:freemarker:2.3.32' // fill it template for NAACCR documentation - testImplementation 'org.xhtmlrenderer:flying-saucer-core:9.3.1' // Java Swing HTML renderer for NAACCR documentation lab + testImplementation 'org.commonmark:commonmark:0.22.0' // convert markdown to HTML for NAACCR documentation + testImplementation 'org.freemarker:freemarker:2.3.33' // fill it template for NAACCR documentation + testImplementation 'org.xhtmlrenderer:flying-saucer-core:9.9.0' // Java Swing HTML renderer for NAACCR documentation lab } // enforce UTF-8, display the compilation warnings @@ -223,7 +223,7 @@ nexusPublishing { // Gradle wrapper, this allows to build the project without having to install Gradle! wrapper { - gradleVersion = '8.4' + gradleVersion = '8.9' distributionType = Wrapper.DistributionType.ALL } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 033e24c..7f93135 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 8838ba9..dedd5d1 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index fcb6fca..1aa94a4 100644 --- a/gradlew +++ b/gradlew @@ -83,7 +83,8 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -144,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -152,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -201,11 +202,11 @@ fi # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ diff --git a/src/main/java/com/imsweb/layout/LayoutFactory.java b/src/main/java/com/imsweb/layout/LayoutFactory.java index 2f31dbe..5ee0f5d 100644 --- a/src/main/java/com/imsweb/layout/LayoutFactory.java +++ b/src/main/java/com/imsweb/layout/LayoutFactory.java @@ -46,6 +46,11 @@ public final class LayoutFactory { //XML Layouts - constants for the internal layout IDs + public static final String LAYOUT_ID_NAACCR_XML_25 = "naaccr-xml-25"; // shortcut for full abstract + public static final String LAYOUT_ID_NAACCR_XML_25_ABSTRACT = "naaccr-xml-25-abstract"; + public static final String LAYOUT_ID_NAACCR_XML_25_MODIFIED = "naaccr-xml-25-modified"; + public static final String LAYOUT_ID_NAACCR_XML_25_CONFIDENTIAL = "naaccr-xml-25-confidential"; + public static final String LAYOUT_ID_NAACCR_XML_25_INCIDENCE = "naaccr-xml-25-incidence"; public static final String LAYOUT_ID_NAACCR_XML_24 = "naaccr-xml-24"; // shortcut for full abstract public static final String LAYOUT_ID_NAACCR_XML_24_ABSTRACT = "naaccr-xml-24-abstract"; public static final String LAYOUT_ID_NAACCR_XML_24_MODIFIED = "naaccr-xml-24-modified"; @@ -130,6 +135,7 @@ public final class LayoutFactory { // make sure to put all the "aliases" in this list... static { + _INTERNAL_LAYOUT_ID_ALIASES.put(LAYOUT_ID_NAACCR_XML_25, LAYOUT_ID_NAACCR_XML_25_ABSTRACT); _INTERNAL_LAYOUT_ID_ALIASES.put(LAYOUT_ID_NAACCR_XML_24, LAYOUT_ID_NAACCR_XML_24_ABSTRACT); _INTERNAL_LAYOUT_ID_ALIASES.put(LAYOUT_ID_NAACCR_XML_23, LAYOUT_ID_NAACCR_XML_23_ABSTRACT); _INTERNAL_LAYOUT_ID_ALIASES.put(LAYOUT_ID_NAACCR_XML_22, LAYOUT_ID_NAACCR_XML_22_ABSTRACT); @@ -152,6 +158,11 @@ public final class LayoutFactory { // make sure to add the most recent layouts first, they will be "tried" in that order (important for discovery mechanism) static { //NAACCR XML + _INTERNAL_LAYOUTS.put(LAYOUT_ID_NAACCR_XML_25, "NAACCR XML 25 Abstract"); + _INTERNAL_LAYOUTS.put(LAYOUT_ID_NAACCR_XML_25_ABSTRACT, "NAACCR XML 25 Abstract"); + _INTERNAL_LAYOUTS.put(LAYOUT_ID_NAACCR_XML_25_MODIFIED, "NAACCR XML 25 Modified"); + _INTERNAL_LAYOUTS.put(LAYOUT_ID_NAACCR_XML_25_CONFIDENTIAL, "NAACCR XML 25 Confidential"); + _INTERNAL_LAYOUTS.put(LAYOUT_ID_NAACCR_XML_25_INCIDENCE, "NAACCR XML 25 Incidence"); _INTERNAL_LAYOUTS.put(LAYOUT_ID_NAACCR_XML_24, "NAACCR XML 24 Abstract"); _INTERNAL_LAYOUTS.put(LAYOUT_ID_NAACCR_XML_24_ABSTRACT, "NAACCR XML 24 Abstract"); _INTERNAL_LAYOUTS.put(LAYOUT_ID_NAACCR_XML_24_MODIFIED, "NAACCR XML 24 Modified"); diff --git a/src/main/java/com/imsweb/layout/naaccrxml/NaaccrXmlLayout.java b/src/main/java/com/imsweb/layout/naaccrxml/NaaccrXmlLayout.java index 3a1293f..147ee32 100644 --- a/src/main/java/com/imsweb/layout/naaccrxml/NaaccrXmlLayout.java +++ b/src/main/java/com/imsweb/layout/naaccrxml/NaaccrXmlLayout.java @@ -466,6 +466,9 @@ else if (archivedDocStream != null) } protected String getDocFolder() { + // there is always a delay before the documentation is released on the NAACCR website... + if ("250".equals(_naaccrVersion)) + return "naaccr24"; return "naaccr" + _naaccrVersion.substring(0, 2); } diff --git a/src/main/resources/layout/fixed/naaccr/items-extra-info.csv b/src/main/resources/layout/fixed/naaccr/items-extra-info.csv index e994a7c..26c4b38 100644 --- a/src/main/resources/layout/fixed/naaccr/items-extra-info.csv +++ b/src/main/resources/layout/fixed/naaccr/items-extra-info.csv @@ -858,4 +858,31 @@ derivedSummaryGrade2018,Der Sum Grade 18,Stage/Prognostic Factors geocodingQualityCode,Geo Qual Code,Demographic geocodingQualityCodeDetail,Geo Qual Code Det,Demographic rxHospReconBreast,RX Hosp Recon Breast,Hospital-Specific -rxSummReconBreast,RX Summ Recon Breast,Treatment-1st Course \ No newline at end of file +rxSummReconBreast,RX Summ Recon Breast,Treatment-1st Course +chromosome16qLossHeterozygosity,Chrom 16q Heter,Stage/Prognostic Factors +chromosome1qStatus,Chrom 1q Status,Stage/Prognostic Factors +derivedPediatricM,Der Ped M,Stage/Prognostic Factors +derivedPediatricStageGroup,Der Ped Stg Group,Stage/Prognostic Factors +derivedPediatricT,Der Ped T,Stage/Prognostic Factors +derivedPediatricTN,Der Ped N,Stage/Prognostic Factors +ewsr1Fli1Fusion,EWSR1-FLI1 fusion,Stage/Prognostic Factors +foxo1GeneRearrangements,FOXO1,Stage/Prognostic Factors +inpc,INPC,Stage/Prognostic Factors +inrgss,INRGSS,Stage/Prognostic Factors +irssStageForEye2,IRSS Eye-2,Stage/Prognostic Factors +nMycAmplification,n-MYC Amp,Stage/Prognostic Factors +pdl1,PD-L1,Stage/Prognostic Factors +pediatricId,Ped ID,Stage/Prognostic Factors +pediatricIdVersionCurrent,Ped ID Ver Cur,Stage/Prognostic Factors +pediatricIdVersionOriginal,Ped ID Ver Ori,Stage/Prognostic Factors +pediatricMets,Ped Mets,Stage/Prognostic Factors +pediatricPrimaryTumor,Ped Prim Tumor,Stage/Prognostic Factors +pediatricRegionalNodes,Ped Reg Nodes,Stage/Prognostic Factors +pretextClinicalStaging,Pretext Clin Stg,Stage/Prognostic Factors +ptld,PTLD,Stage/Prognostic Factors +torontoM,Tor M,Stage/Prognostic Factors +torontoN,Tor N,Stage/Prognostic Factors +torontoStageGroup,Tor Stg Group,Stage/Prognostic Factors +torontoT,Tor T,Stage/Prognostic Factors +torontoVersionNumber,Tor Ver Num,Stage/Prognostic Factors +whiteBloodCellCount,Wh Blood Cell Ct,Stage/Prognostic Factors \ No newline at end of file diff --git a/src/test/java/com/imsweb/layout/naaccrxml/NaaccrXmlLayoutTest.java b/src/test/java/com/imsweb/layout/naaccrxml/NaaccrXmlLayoutTest.java index cc31bb3..4d066f9 100644 --- a/src/test/java/com/imsweb/layout/naaccrxml/NaaccrXmlLayoutTest.java +++ b/src/test/java/com/imsweb/layout/naaccrxml/NaaccrXmlLayoutTest.java @@ -83,7 +83,7 @@ private void assertStandardNaaccrXmlLayout(String layoutId) { Assert.assertNotNull(layoutId + "/" + field.getNaaccrId(), field.getLongLabel()); Assert.assertNotEquals(layoutId + "/" + field.getNaaccrId(), "?", field.getShortLabel()); Assert.assertNotEquals(layoutId + "/" + field.getNaaccrId(), "?", field.getSection()); - if (!"240".equals(layout.getNaaccrVersion())) { + if (!"250".equals(layout.getNaaccrVersion())) { Assert.assertNotNull(layoutId + "/" + field.getNaaccrId(), layout.getFieldDocByName(field.getName(), TestingUtils.getArchivedNaaccrDoc())); Assert.assertNotNull(layoutId + "/" + field.getNaaccrId(), layout.getFieldDocByNaaccrItemNumber(field.getNaaccrItemNum(), TestingUtils.getArchivedNaaccrDoc())); }