[Git][java-team/ciftools-java][master] 4 commits: New upstream version 7.0.2

Andrius Merkys (@merkys) gitlab at salsa.debian.org
Fri Oct 31 12:37:11 GMT 2025



Andrius Merkys pushed to branch master at Debian Java Maintainers / ciftools-java


Commits:
9ba6b900 by Andrius Merkys at 2025-10-31T08:02:30-04:00
New upstream version 7.0.2
- - - - -
3c6abb93 by Andrius Merkys at 2025-10-31T08:02:45-04:00
Update upstream source from tag 'upstream/7.0.2'

Update to upstream version '7.0.2'
with Debian dir aa781b21f8a7fb0fe9924fa75b331bd671d6a3b7
- - - - -
03f69929 by Andrius Merkys at 2025-10-31T08:03:48-04:00
Refresh deactivate_tests_using_network.patch.

- - - - -
5a9d7de7 by Andrius Merkys at 2025-10-31T08:04:28-04:00
Update changelog for 7.0.2-1 release

- - - - -


11 changed files:

- .github/workflows/build.yml
- CHANGELOG.md
- README.md
- debian/changelog
- debian/patches/deactivate_tests_using_network.patch
- pom.xml
- − pom.xml.releaseBackup
- − release.properties
- src/main/java/org/rcsb/cif/binary/BinaryCifWriter.java
- src/test/java/org/rcsb/cif/ReaderTest.java
- src/test/java/org/rcsb/cif/WriterTest.java


Changes:

=====================================
.github/workflows/build.yml
=====================================
@@ -1,4 +1,4 @@
-name: SonarCloud
+name: Build and Test
 on:
   push:
     branches:
@@ -7,31 +7,20 @@ on:
     types: [opened, synchronize, reopened]
 jobs:
   build:
-    name: Build and analyze
+    name: Build and Test
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout at v3
+      - uses: actions/checkout at v4
+      - name: Set up JDK 21
+        uses: actions/setup-java at v4
         with:
-          fetch-depth: 0  # Shallow clones should be disabled for a better relevancy of analysis
-      - name: Set up JDK 17
-        uses: actions/setup-java at v3
-        with:
-          java-version: 17
-          distribution: 'zulu' # Alternative distribution options are available.
-      - name: Cache SonarCloud packages
-        uses: actions/cache at v3
-        with:
-          path: ~/.sonar/cache
-          key: ${{ runner.os }}-sonar
-          restore-keys: ${{ runner.os }}-sonar
+          java-version: 21
+          distribution: 'temurin'
       - name: Cache Maven packages
-        uses: actions/cache at v3
+        uses: actions/cache at v4
         with:
           path: ~/.m2
           key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
           restore-keys: ${{ runner.os }}-m2
-      - name: Build and analyze
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}  # Needed to get PR information, if any
-          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
-        run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=rcsb_ciftools-java
\ No newline at end of file
+      - name: Build and test
+        run: mvn -B clean verify
\ No newline at end of file


=====================================
CHANGELOG.md
=====================================
@@ -3,8 +3,14 @@ CIFTools Changelog
 
 This project uses semantic versioning. Furthermore, this project provides code that was generated from schemata. Any schema change that introduces a breaking change in the generated code is considered as breaking for the whole project. Additional information is provided below when this occurs (named `Breaking schema changes`). Most of these occur in experimental categories and are unlikely to affect your code. `Breaking API changes` will be avoided starting with version 1.0.0.
 
+ciftools-java 7.0.2 - September 2025
+-------------
+### Bug fixes
+* BCIF writing: fix behavior when the model contains empty categories
+
 ciftools-java 7.0.1 - March 2025
 -------------
+### Bug fixes
 * cache results of `DelegatingColumn#getArray()` to avoid performance penalty if schema type and actual data type differ (fixes #13)
 
 ciftools-java 7.0.0 - March 2025


=====================================
README.md
=====================================
@@ -14,7 +14,7 @@ CIFTools is distributed by maven. To get started, append your `pom.xml` by:
 <dependency>
   <groupId>org.rcsb</groupId>
   <artifactId>ciftools-java</artifactId>
-  <version>7.0.0</version>
+  <version>7.0.1</version>
 </dependency>
 ```
 


=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+ciftools-java (7.0.2-1) unstable; urgency=medium
+
+  * New upstream version 7.0.2
+
+ -- Andrius Merkys <merkys at debian.org>  Fri, 31 Oct 2025 08:04:17 -0400
+
 ciftools-java (7.0.1-1) unstable; urgency=medium
 
   * Raising Standards version to 4.7.2 (no change)


=====================================
debian/patches/deactivate_tests_using_network.patch
=====================================
@@ -69,7 +69,7 @@ Last-Update: 2021-10-17
          <dependency>
              <groupId>org.junit.jupiter</groupId>
              <artifactId>junit-jupiter-api</artifactId>
-@@ -175,4 +181,4 @@
+@@ -169,4 +175,4 @@
              </build>
          </profile>
      </profiles>


=====================================
pom.xml
=====================================
@@ -3,7 +3,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.rcsb</groupId>
     <artifactId>ciftools-java</artifactId>
-    <version>7.0.1</version>
+    <version>7.0.2</version>
     <packaging>jar</packaging>
     <description>
         A Java library for handling text and binary CIF files.
@@ -35,7 +35,7 @@
         <connection>scm:git:git://github.com/rcsb/ciftools-java.git</connection>
         <developerConnection>scm:git:git at github.com:rcsb/ciftools-java.git</developerConnection>
         <url>https://github.com/rcsb/ciftools-java</url>
-      <tag>ciftools-java-7.0.1</tag>
+      <tag>ciftools-java-7.0.2</tag>
   </scm>
 
     <dependencies>
@@ -50,7 +50,7 @@
         <dependency>
             <groupId>com.google.code.gson</groupId>
             <artifactId>gson</artifactId>
-            <version>2.12.1</version>
+            <version>2.13.2</version>
             <scope>compile</scope>
         </dependency>
 
@@ -58,7 +58,7 @@
         <dependency>
             <groupId>org.junit.jupiter</groupId>
             <artifactId>junit-jupiter-api</artifactId>
-            <version>5.12.0</version>
+            <version>5.14.0</version>
             <scope>test</scope>
         </dependency>
 
@@ -76,43 +76,37 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
-                <version>3.13.0</version>
+                <version>3.14.1</version>
                 <configuration>
-                    <source>11</source>
-                    <target>11</target>
+                    <release>11</release>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>3.5.4</version>
+            </plugin>
         </plugins>
     </build>
 
-    <!-- https://central.sonatype.org/pages/apache-maven.html -->
-    <!-- https://github.com/chhh/sonatype-ossrh-parent/blob/master/pom.xml -->
-    <distributionManagement>
-        <snapshotRepository>
-            <id>ossrh</id>
-            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
-        </snapshotRepository>
-        <repository>
-            <id>ossrh</id>
-            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
-        </repository>
-    </distributionManagement>
-
     <profiles>
         <profile>
             <id>release</id>
             <build>
                 <plugins>
-                    <!-- handles propagating the build to the staging repository -->
+                    <!-- handles uploading the build to the maven central repository -->
                     <plugin>
-                        <groupId>org.sonatype.plugins</groupId>
-                        <artifactId>nexus-staging-maven-plugin</artifactId>
-                        <version>1.7.0</version>
+                        <groupId>org.sonatype.central</groupId>
+                        <artifactId>central-publishing-maven-plugin</artifactId>
+                        <version>0.9.0</version>
                         <extensions>true</extensions>
                         <configuration>
-                            <serverId>ossrh</serverId>
-                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
-                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
+                            <publishingServerId>central</publishingServerId>
+                            <!-- If this is set to false, the artifact is only staged and then needs pushing manually via the web interface at https://central.sonatype.com/publishing/deployments -->
+                            <!-- With true it publishes automatically -->
+                            <autoPublish>true</autoPublish>
+                            <!-- NOTE this is to wait for the new release to be validated and publicly available. Not essential but nice that when maven is done, we know the artifact is publicly available -->
+                            <waitUntil>published</waitUntil>
                         </configuration>
                     </plugin>
 
@@ -120,7 +114,7 @@
                     <plugin>
                         <groupId>org.apache.maven.plugins</groupId>
                         <artifactId>maven-gpg-plugin</artifactId>
-                        <version>3.2.7</version>
+                        <version>3.2.8</version>
                         <executions>
                             <execution>
                                 <id>sign-artifacts</id>
@@ -158,7 +152,7 @@
                     <plugin>
                         <groupId>org.apache.maven.plugins</groupId>
                         <artifactId>maven-javadoc-plugin</artifactId>
-                        <version>3.11.2</version>
+                        <version>3.12.0</version>
                         <configuration>
                             <source>11</source>
                         </configuration>


=====================================
pom.xml.releaseBackup deleted
=====================================
@@ -1,178 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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">
-    <modelVersion>4.0.0</modelVersion>
-    <groupId>org.rcsb</groupId>
-    <artifactId>ciftools-java</artifactId>
-    <version>7.0.1-SNAPSHOT</version>
-    <packaging>jar</packaging>
-    <description>
-        A Java library for handling text and binary CIF files.
-    </description>
-    <name>ciftools-java</name>
-    <url>https://github.com/rcsb/ciftools-java</url>
-    <organization>
-        <name>RCSB PDB</name>
-        <url>https://www.rcsb.org/</url>
-    </organization>
-
-    <licenses>
-        <license>
-            <name>MIT License</name>
-            <url>https://www.opensource.org/licenses/mit-license.php</url>
-        </license>
-    </licenses>
-
-    <developers>
-        <developer>
-            <name>Sebastian Bittrich</name>
-            <email>sebastian.bittrich at rcsb.org</email>
-            <organization>RCSB PDB</organization>
-            <organizationUrl>https://www.rcsb.org</organizationUrl>
-        </developer>
-    </developers>
-
-    <scm>
-        <connection>scm:git:git://github.com/rcsb/ciftools-java.git</connection>
-        <developerConnection>scm:git:git at github.com:rcsb/ciftools-java.git</developerConnection>
-        <url>https://github.com/rcsb/ciftools-java</url>
-      <tag>HEAD</tag>
-  </scm>
-
-    <dependencies>
-        <!-- provides @Generated -->
-        <dependency>
-            <groupId>javax.annotation</groupId>
-            <artifactId>javax.annotation-api</artifactId>
-            <version>1.3.2</version>
-        </dependency>
-
-        <!-- optional functionality to read json configs -->
-        <dependency>
-            <groupId>com.google.code.gson</groupId>
-            <artifactId>gson</artifactId>
-            <version>2.12.1</version>
-            <scope>compile</scope>
-        </dependency>
-
-        <!-- test dependencies -->
-        <dependency>
-            <groupId>org.junit.jupiter</groupId>
-            <artifactId>junit-jupiter-api</artifactId>
-            <version>5.12.0</version>
-            <scope>test</scope>
-        </dependency>
-
-    </dependencies>
-
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <project.build.targetEncoding>UTF-8</project.build.targetEncoding>
-        <sonar.organization>rcsb</sonar.organization>
-        <sonar.host.url>https://sonarcloud.io</sonar.host.url>
-    </properties>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>3.13.0</version>
-                <configuration>
-                    <source>11</source>
-                    <target>11</target>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
-    <!-- https://central.sonatype.org/pages/apache-maven.html -->
-    <!-- https://github.com/chhh/sonatype-ossrh-parent/blob/master/pom.xml -->
-    <distributionManagement>
-        <snapshotRepository>
-            <id>ossrh</id>
-            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
-        </snapshotRepository>
-        <repository>
-            <id>ossrh</id>
-            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
-        </repository>
-    </distributionManagement>
-
-    <profiles>
-        <profile>
-            <id>release</id>
-            <build>
-                <plugins>
-                    <!-- handles propagating the build to the staging repository -->
-                    <plugin>
-                        <groupId>org.sonatype.plugins</groupId>
-                        <artifactId>nexus-staging-maven-plugin</artifactId>
-                        <version>1.7.0</version>
-                        <extensions>true</extensions>
-                        <configuration>
-                            <serverId>ossrh</serverId>
-                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
-                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
-                        </configuration>
-                    </plugin>
-
-                    <!-- signing of content to be published -->
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-gpg-plugin</artifactId>
-                        <version>3.2.7</version>
-                        <executions>
-                            <execution>
-                                <id>sign-artifacts</id>
-                                <phase>verify</phase>
-                                <goals>
-                                    <goal>sign</goal>
-                                </goals>
-                                <configuration>
-                                    <!-- This is necessary for gpg to not try to use the pinentry programs -->
-                                    <gpgArguments>
-                                        <arg>--pinentry-mode</arg>
-                                        <arg>loopback</arg>
-                                    </gpgArguments>
-                                </configuration>
-                            </execution>
-                        </executions>
-                    </plugin>
-
-                    <!-- create source -->
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-source-plugin</artifactId>
-                        <version>3.3.1</version>
-                        <executions>
-                            <execution>
-                                <id>attach-sources</id>
-                                <goals>
-                                    <goal>jar-no-fork</goal>
-                                </goals>
-                            </execution>
-                        </executions>
-                    </plugin>
-
-                    <!-- create javadoc -->
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-javadoc-plugin</artifactId>
-                        <version>3.11.2</version>
-                        <configuration>
-                            <source>11</source>
-                        </configuration>
-                        <executions>
-                            <execution>
-                                <id>attach-javadocs</id>
-                                <goals>
-                                    <goal>jar</goal>
-                                </goals>
-                            </execution>
-                        </executions>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-    </profiles>
-</project>
\ No newline at end of file


=====================================
release.properties deleted
=====================================
@@ -1,27 +0,0 @@
-#release configuration
-#Tue Mar 18 09:58:37 PDT 2025
-completedPhase=generate-release-poms
-exec.activateProfiles=release
-exec.pomFileName=pom.xml
-exec.snapshotReleasePluginAllowed=false
-pinExternals=false
-preparationGoals=clean verify
-project.dev.org.rcsb\:ciftools-java=7.0.2-SNAPSHOT
-project.rel.org.rcsb\:ciftools-java=7.0.1
-project.scm.org.rcsb\:ciftools-java.connection=scm\:git\:git\://github.com/rcsb/ciftools-java.git
-project.scm.org.rcsb\:ciftools-java.developerConnection=scm\:git\:git at github.com\:rcsb/ciftools-java.git
-project.scm.org.rcsb\:ciftools-java.tag=HEAD
-project.scm.org.rcsb\:ciftools-java.url=https\://github.com/rcsb/ciftools-java
-projectVersionPolicyConfig=<projectVersionPolicyConfig>${projectVersionPolicyConfig}</projectVersionPolicyConfig>\n
-projectVersionPolicyId=default
-pushChanges=true
-releaseStrategyId=default
-remoteTagging=true
-scm.branchCommitComment=@{prefix} prepare branch @{releaseLabel}
-scm.commentPrefix=[maven-release-plugin] 
-scm.developmentCommitComment=@{prefix} prepare for next development iteration
-scm.releaseCommitComment=@{prefix} prepare release @{releaseLabel}
-scm.rollbackCommitComment=@{prefix} rollback the release of @{releaseLabel}
-scm.tag=ciftools-java-7.0.1
-scm.tagNameFormat=@{project.artifactId}-@{project.version}
-scm.url=scm\:git\:git at github.com\:rcsb/ciftools-java.git


=====================================
src/main/java/org/rcsb/cif/binary/BinaryCifWriter.java
=====================================
@@ -57,6 +57,7 @@ public class BinaryCifWriter {
 
             // filter category names
             List<Category> filteredCategories = cifBlock.categories()
+                    .filter(Category::isDefined) // at least 1 row present
                     .filter(category -> options.filterCategory(category.getCategoryName()))
                     .collect(Collectors.toList());
             Object[] categories = new Object[filteredCategories.size()];
@@ -68,9 +69,6 @@ public class BinaryCifWriter {
             for (Category category : filteredCategories) {
                 String categoryName = category.getCategoryName();
                 int rowCount = category.getRowCount();
-                if (rowCount == 0) {
-                    continue;
-                }
 
                 Map<String, Object> categoryMap = new LinkedHashMap<>();
                 categoryMap.put("name", "_" + category.getCategoryName());


=====================================
src/test/java/org/rcsb/cif/ReaderTest.java
=====================================
@@ -11,8 +11,6 @@ import org.rcsb.cif.schema.mm.MmCifFile;
 
 import java.io.IOException;
 import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Comparator;
 import java.util.List;
 import java.util.Map;
 import java.util.OptionalDouble;


=====================================
src/test/java/org/rcsb/cif/WriterTest.java
=====================================
@@ -21,11 +21,13 @@ import org.rcsb.cif.schema.core.CifCoreBlock;
 import org.rcsb.cif.schema.core.CifCoreFile;
 import org.rcsb.cif.schema.mm.MmCifBlock;
 import org.rcsb.cif.schema.mm.MmCifFile;
+import org.rcsb.cif.schema.mm.PdbxStructModResidue;
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.Arrays;
+import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 import java.util.regex.Pattern;
@@ -257,4 +259,17 @@ class WriterTest {
         assertEquals("0197355516942160", cifFile.getFirstBlock().getMaTargetRefDbDetails().getSeqDbSequenceChecksum().get(0));
         assertNotNull(CifIO.writeBinary(cifFile));
     }
+
+    @Test
+    void whenEmptyCategory_thenNotWritten() throws IOException {
+        MmCifFile cifFile = CifIO.readFromInputStream(TestHelper.getInputStream("bcif/1acj.bcif.gz")).as(StandardSchemata.MMCIF);
+        MmCifBlock block = cifFile.getFirstBlock();
+        PdbxStructModResidue modResidue = block.getPdbxStructModResidue(); // this access adds an empty to the block
+        assertFalse(modResidue.isDefined(), "category should be undefined");
+
+        byte[] text = CifIO.writeText(cifFile);
+        assertFalse(CifIO.readFromInputStream(new ByteArrayInputStream(text)).as(StandardSchemata.MMCIF).getFirstBlock().getPdbxStructModResidue().isDefined());
+        byte[] binary = CifIO.writeBinary(cifFile);
+        assertFalse(CifIO.readFromInputStream(new ByteArrayInputStream(binary)).as(StandardSchemata.MMCIF).getFirstBlock().getPdbxStructModResidue().isDefined());
+    }
 }



View it on GitLab: https://salsa.debian.org/java-team/ciftools-java/-/compare/723d70d6851bcc6ee2cd0e7550b6a058c5ffbe99...5a9d7de7ad9cc5d33399244c53c394318d9134b6

-- 
View it on GitLab: https://salsa.debian.org/java-team/ciftools-java/-/compare/723d70d6851bcc6ee2cd0e7550b6a058c5ffbe99...5a9d7de7ad9cc5d33399244c53c394318d9134b6
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20251031/afa4c88f/attachment.htm>


More information about the pkg-java-commits mailing list