ensembl-hive  2.6
Version.pm
Go to the documentation of this file.
1 =pod
2 
3 =head1 NAME
4 
6 
7 =head1 SYNOPSIS
8 
10 
11 =head1 DESCRIPTION
12 
13  Version number of the Hive code.
14 
15 =head1 LICENSE
16 
17  Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
18  Copyright [2016-2024] EMBL-European Bioinformatics Institute
19 
20  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
21  You may obtain a copy of the License at
22 
23  http://www.apache.org/licenses/LICENSE-2.0
24 
25  Unless required by applicable law or agreed to in writing, software distributed under the License
26  is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
27  See the License for the specific language governing permissions and limitations under the License.
28 
29 =head1 CONTACT
30 
31  Please subscribe to the Hive mailing list: http://listserver.ebi.ac.uk/mailman/listinfo/ehive-users to discuss Hive-related questions or to be notified of our updates
32 
33 =cut
34 
35 
36 package Bio::EnsEMBL::Hive::Version;
37 
38 use strict;
39 use warnings;
40 
45 
46 use Exporter 'import';
47 our @EXPORT_OK = qw(get_code_version report_versions);
48 
49 
50 our $VERSION = '2.6';
51 
52 sub get_code_version {
53 
54  return $VERSION;
55 }
56 
57 
58 sub report_versions {
59  print "CodeVersion\t".get_code_version()."\n";
60  print "CompatibleHiveDatabaseSchemaVersion\t".Bio::EnsEMBL::Hive::DBSQL::SqlSchemaAdaptor->get_code_sql_schema_version()."\n";
61 
62  print "MeadowInterfaceVersion\t".Bio::EnsEMBL::Hive::Meadow->get_meadow_major_version()."\n";
63  my $meadow_class_path = Bio::EnsEMBL::Hive::Valley->meadow_class_path;
64  foreach my $meadow_class (sort @{ Bio::EnsEMBL::Hive::Valley->loaded_meadow_drivers }) {
65  $meadow_class=~/^${meadow_class_path}::(.+)$/;
66  my $meadow_driver = $1;
67  my $meadow_version = $meadow_class->get_meadow_version;
68  my $compatible = $meadow_class->check_version_compatibility;
69  my $status = $compatible
70  ? ( $meadow_class->name
71  ? 'available'
72  : 'unavailable'
73  )
74  : 'incompatible';
75  print '',join("\t", 'Meadow::'.$meadow_driver, $meadow_version, $status)."\n";
76  }
77 
78  print "GuestLanguageInterfaceVersion\t".Bio::EnsEMBL::Hive::GuestProcess->get_protocol_version()."\n";
80  foreach my $language (sort keys %$registered_wrappers) {
81  my $status = 'unavailable';
82  my $language_version;
83  eval {
84  $language_version = Bio::EnsEMBL::Hive::GuestProcess::get_wrapper_version($language);
85  $status = Bio::EnsEMBL::Hive::GuestProcess->check_version_compatibility($language_version) ? 'available' : 'incompatible';
86  };
87  if ($@) {
88  $status .= " - $@";
89  chomp $status;
90  }
91  print join("\t", "GuestLanguage[$language]", $language_version || 'N/A', $status)."\n";
92  }
93 }
94 
95 
96 1;
Bio::EnsEMBL::Hive::GuestProcess::check_version_compatibility
public check_version_compatibility()
Bio::EnsEMBL::Hive::GuestProcess
Definition: GuestProcess.pm:105
Bio::EnsEMBL::Hive::Valley::loaded_meadow_drivers
public loaded_meadow_drivers()
Bio::EnsEMBL::Hive::Meadow
Definition: DockerSwarm.pm:6
Bio::EnsEMBL::Hive::Version
Definition: Version.pm:19
Bio::EnsEMBL::Hive::Valley::meadow_class_path
public meadow_class_path()
Bio::EnsEMBL::Hive::DBSQL::SqlSchemaAdaptor
Definition: SqlSchemaAdaptor.pm:17
Bio::EnsEMBL::Hive::GuestProcess::get_wrapper_version
public String get_wrapper_version()
Bio::EnsEMBL::Hive
Definition: Hive.pm:38
Bio::EnsEMBL::Hive::Valley
Definition: Valley.pm:16
Bio::EnsEMBL::Hive::GuestProcess::_get_all_registered_wrappers
protected Hashref _get_all_registered_wrappers()