Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ensembl
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
ensembl
Commits
f8fee0c0
Commit
f8fee0c0
authored
13 years ago
by
Andy Yates
Browse files
Options
Downloads
Patches
Plain Diff
Now does webcode checking
parent
78965973
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
misc-scripts/datafiles/build_datafile_ftp_directory.pl
+70
-1
70 additions, 1 deletion
misc-scripts/datafiles/build_datafile_ftp_directory.pl
with
70 additions
and
1 deletion
misc-scripts/datafiles/build_datafile_ftp_directory.pl
+
70
−
1
View file @
f8fee0c0
...
...
@@ -114,9 +114,10 @@ sub setup {
sub
process
{
my
(
$self
)
=
@_
;
my
$dbas
=
$self
->
_get_core_like_dbs
();
foreach
my
$dba
(
@
$dbas
)
{
while
(
my
$dba
=
shift
@
{
$dbas
}
)
{
$self
->
_process_dba
(
$dba
);
}
$self
->
_process_missing_ftp_links
();
return
;
}
...
...
@@ -138,6 +139,26 @@ sub _process_dba {
return
;
}
sub
_process_missing_ftp_links
{
my
(
$self
)
=
@_
;
return
unless
$self
->
_webcode_available
();
my
$module
=
'
EnsEMBL::Web::Document::HTML::FTPtable
';
if
(
exists
$self
->
{
ftp
}
->
{
missing_types
})
{
foreach
my
$type
(
keys
%
{
$self
->
{
ftp
}
->
{
missing_types
}})
{
printf
("
MISSING TYPE: '%s' is missing from thwe WebCode module '%s'. Please add it
\n
",
$type
,
$module
);
}
}
if
(
exists
$self
->
{
ftp
}
->
{
missing_species
})
{
foreach
my
$type
(
keys
%
{
$self
->
{
ftp
}
->
{
missing_species
}})
{
foreach
my
$species
(
keys
%
{
$self
->
{
ftp
}
->
{
missing_species
}
->
{
$type
}})
{
printf
("
MISSING SPECIES: '%s' is missing from the type '%s' in the WebCode module '%s'. Please add it
\n
",
$species
,
$type
,
$module
);
}
}
}
return
;
}
sub
_process_datafile
{
my
(
$self
,
$datafile
,
$target_dir
)
=
@_
;
if
(
!
-
d
$target_dir
)
{
...
...
@@ -194,6 +215,25 @@ sub _target_datafiles_root {
return
$dir
;
}
sub
_flag_missing_ftp_link
{
my
(
$self
,
$datafile
)
=
@_
;
if
(
$self
->
_webcode_available
())
{
my
$type
=
$self
->
_datafile_to_type
(
$datafile
);
my
$species
=
$datafile
->
adaptor
()
->
db
()
->
get_MetaContainer
()
->
get_production_name
();
my
$missing_type
=
1
;
my
$missing_species
=
1
;
if
(
exists
$self
->
{
_webcode
}
->
{
types
}
->
{
$type
})
{
$missing_type
=
0
;
}
if
(
!
$missing_type
&&
exists
$self
->
{
_webcode
}
->
{
types
}
->
{
$type
}
->
{
$species
})
{
$missing_species
=
0
;
}
$self
->
{
ftp
}
->
{
missing_types
}
->
{
$type
}
=
1
if
$missing_type
;
$self
->
{
ftp
}
->
{
missing_species
}
->
{
$type
}
->
{
$species
}
=
1
if
$missing_species
;
}
return
;
}
sub
_datafile_to_type
{
my
(
$self
,
$datafile
)
=
@_
;
return
lc
(
$datafile
->
file_type
());
...
...
@@ -251,6 +291,30 @@ sub v {
return
;
}
sub
_webcode_available
{
my
(
$self
)
=
@_
;
return
$self
->
{
_webcode_available
}
if
exists
$self
->
{
_webcode_available
};
if
(
$self
->
opts
()
->
{
no_ftp_table
})
{
$self
->
{
_webcode_available
}
=
0
;
return
$self
->
{
_webcode_available
};
}
eval
{
$self
->
{
_webcode_available
}
=
0
;
require
EnsEMBL::Web::Document::HTML::
FTPtable
;
my
$types_for_species
=
EnsEMBL::Web::Document::HTML::
FTPtable
->
required_types_for_species
();
my
$titles
=
EnsEMBL::Web::Document::HTML::
FTPtable
->
titles
();
$self
->
{
_webcode
}
->
{
types
}
=
$types_for_species
;
$self
->
{
_webcode
}
->
{
titles
}
=
$titles
;
$self
->
{
_webcode_available
}
=
1
;
};
if
(
$@
)
{
warn
"
Trying to setup the webcode to flag those links not on the FTP table. Please fix the error if you want this feature: $@
";
}
return
;
}
Script
->
run
();
1
;
...
...
@@ -317,6 +381,11 @@ REQUIRED. Target directory to symbolically link into. Push directly into the
release directory as the script does not assume the directory is publically
available.
=item B<--no_ftp_table>
If flagged the script will not warn about the FTP table and therefore does
not have any dependencies on the webcode.
=item B<--verbose>
Makes the program give more information about what is going on. Otherwise
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment