From 46dbcf9c837214b67c076f7bc7804f7be4b8696a Mon Sep 17 00:00:00 2001 From: steve-fischer-200 Date: Thu, 26 Mar 2026 12:06:29 -0400 Subject: [PATCH] add needs update script --- Model/bin/needsUpdateSampleDisplayInfoTT | 36 +++++++++++++++++++ .../xml/tuningManager/apiTuningManager.xml | 4 +-- 2 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 Model/bin/needsUpdateSampleDisplayInfoTT diff --git a/Model/bin/needsUpdateSampleDisplayInfoTT b/Model/bin/needsUpdateSampleDisplayInfoTT new file mode 100644 index 000000000..ba4b6cd4f --- /dev/null +++ b/Model/bin/needsUpdateSampleDisplayInfoTT @@ -0,0 +1,36 @@ +#!/usr/bin/perl + +use strict; +use lib "$ENV{GUS_HOME}/lib/perl"; + +use Getopt::Long qw(GetOptions); +use Time::Local; + +use EbrcModelCommon::Model::tmUtils; +use EbrcModelCommon::Model::DatasetPresenterTTUtils qw(getProjectListFromDb getPresenterFilePaths); + +use DBI; + +my ($propfile, $instance, $schema, $debug, $timestamp, $unixTimestamp); +Getopt::Long::Configure("pass_through"); +GetOptions("propfile=s" => \$propfile, + "instance=s" => \$instance, + "schema=s" => \$schema, + "debug!" => \$debug, + "timestamp=s" => \$timestamp, + "unixtimestamp=s" => \$unixTimestamp, + ); + +die "required parameter missing" unless ($unixTimestamp); + +my $filePath = "EbrcModelCommon/Model/data/SampleDisplayInfo.xls"; + +my $gitTimestamp = EbrcModelCommon::Model::tmUtils::getGitTimestamp($filePath, $ENV{PROJECT_HOME}); + +if ($gitTimestamp > $unixTimestamp) { + print "out of date\n"; +} else { + print "up to date\n"; +} + +exit 0; diff --git a/Model/lib/xml/tuningManager/apiTuningManager.xml b/Model/lib/xml/tuningManager/apiTuningManager.xml index 9d51e8fe0..7256a07dc 100644 --- a/Model/lib/xml/tuningManager/apiTuningManager.xml +++ b/Model/lib/xml/tuningManager/apiTuningManager.xml @@ -1941,11 +1941,11 @@ create index Organism_projectId_idx&1 ON OrganismAttributes&1 (project_id, sourc - - + Used by the model and GBrowse, as well as an input in the creation of the tuning tables like MSModifiedPeptideSummary and MSPeptideSummary. +