Add publish endpoint and webapp UI for marking models as published#1651
Open
Add publish endpoint and webapp UI for marking models as published#1651
Conversation
Expose PublicationService.publishDirectly() via a new Quarkus REST endpoint that marks BioModels and MathModels linked to a publication as published (GroupAccessAll + VersionFlag.Published). The endpoint accepts an optional PublishModelsRequest body to selectively publish specific model keys; defaults to all linked models when omitted. - Add PublishModelsRequest record and publish endpoint in PublicationResource - Update OpenAPI spec and regenerate Java, Python, and TypeScript clients - Add PublicationApiTest cases for publish and unauthorized access - Increase Keycloak devservices timeouts for test reliability on ARM64 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add version flag status badges (Published/Archived/Current) on each BioModel and MathModel ref in the publication edit form. Curators see checkboxes for selective model publishing and a "Publish Selected Models" button that calls the new publishBioModels API endpoint. After publishing, the publication is re-fetched to update badges. - Add status badges, checkboxes, and publish button to publication-edit - Add publishModels() with confirmation dialog, curator-only visibility - Add refreshPublication() to publication-detail on published event - Add publishModels wrapper to publication.service.ts - Include generated TypeScript-Angular client for publishBioModels Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract biomodelRefFromBioModel() helper in TestEndpointUtils that builds a BiomodelRef from the REST API BioModel response, using the actual database values instead of manually constructing fields. Apply to both testAddListRemove and testPublishBioModels tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
generate.sh called ./python-fix.sh which only works when CWD is tools/.
Changed to use ${scriptDir}/python-fix.sh for reliable execution from
any working directory. Also includes the manual __init__.py fix for
circular imports (curve classes moved to end of file).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The manually-added PublishModelsRequest schema was placed in a different alphabetical position than Quarkus generates. Copied the Quarkus-generated spec and regenerated all clients. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…M options The -XX:UseSVE=0 flag is only valid on ARM64 JVMs and causes Keycloak's JVM to exit with code 1 on x86_64 GitHub Actions runners. Adding -XX:+IgnoreUnrecognizedVMOptions makes it non-fatal on unsupported platforms. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
da4a38d to
9f30752
Compare
…ndency Replace osgeo Maven repo with a project-local lib/maven-repo containing: - javax.media:jai_core:1.1.3 (jar + pom) - com.sun.media:jai-codec:1.1.3 (jar + pom) - edu.ucar:netcdf:4.3.22 (jar + pom, HTTP repos removed from pom) - edu.ucar:udunits:4.3.22 (jar + pom) - edu.ucar:thredds-parent:4.3.22 (pom, HTTP repos removed) These artifacts are not on Maven Central and were previously fetched from repo.osgeo.org which has intermittent outages causing CI failures. HTTP repository references in netcdf and thredds-parent POMs were removed to avoid Maven 3.8+ HTTP blocking errors. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Expose the version lifecycle state (CURRENT=0, ARCHIVED=1, PUBLISHED=3) through the BioModel REST endpoint, from DB query through OpenAPI spec and all generated client libraries (Java, Python, TypeScript). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use biomodel.getVersionFlag() from REST response instead of hard-coded VersionFlag.Current, and give testPublishBioModels a unique biomodel name to avoid conflicts with other tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests that setting versionFlag to ARCHIVED or PUBLISHED prevents deletion via the REST API, and that the versionFlag is correctly returned in the BioModel response. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add privacy (public/private/shared) to BiomodelRef through the full stack: DB query, domain model, REST DTO, OpenAPI spec, and all generated clients. Show privacy badge alongside version badge in the publication editor. Fix webapp to use biomodel.versionFlag instead of misusing biomodel.privacy for the version badge. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
b931e77 to
c78b8b0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PUT /api/v1/publications/{id}/publishREST endpoint that marks BioModels and MathModels linked to a publication as published (GroupAccessAll + VersionFlag.Published), with optional selective publishing via request bodyBiomodelRefconstruction to use a shared helper that queries the database instead of manually building fieldsTest plan
mvn clean install -DskipTestsbuilds successfullycd vcell-rest && mvn test(requires working Keycloak testcontainer) to validate newtestPublishBioModelsandtestPublishBioModelsUnauthorizedtests🤖 Generated with Claude Code