Commit 5caa3b48 authored by Matthieu Muffato's avatar Matthieu Muffato
Browse files

Rebuild the schema documentation on RTD

parent b5be7154
......@@ -80,6 +80,7 @@ User documentation
appendix/presentations
appendix/scripts
appendix/hive_schema
.. _dev-docs:
......
......@@ -110,7 +110,7 @@ def hive_setup_if_needed():
doxygen_target = os.path.join(os.environ["EHIVE_ROOT_DIR"], "docs", "doxygen")
if True or any(not os.path.exists(os.path.join(doxygen_target, _)) for _ in ["perl", "python3", "java"]):
mkdoc_path = os.path.join(os.environ["EHIVE_ROOT_DIR"], "scripts", "dev", "make_docs.pl")
subprocess.call([mkdoc_path, "-no_schema_desc"])
subprocess.call([mkdoc_path])
# eHive's default configuration file
default_config_file = os.environ["EHIVE_ROOT_DIR"] + os.path.sep + "hive_config.json"
with open(default_config_file, "r") as fc:
......
......@@ -48,16 +48,14 @@ sub main {
sub generate_hive_schema_desc {
print "Regenerating $ehrd/docs/hive_schema.html ...\n\n";
print "Regenerating $ehrd/docs/user_manual/appendix/hive_schema.rst ...\n\n";
my $sql2html = "$erd/ensembl-production/scripts/sql2html.pl";
my $sql2rst = "$ehrd/scripts/dev/sql2rst.pl";
die "Cannot find '$sql2html', please make sure ensembl-production API is intalled properly.\n" unless(-r $sql2html);
die "Cannot find '$sql2rst', please make sure ensembl-production API is intalled properly.\n" unless(-r $sql2rst);
my @cmds = (
"perl $sql2html -i $ehrd/sql/tables.mysql -d Hive -intro $ehrd/docs/hive_schema.inc -sort_headers 0 -sort_tables 0 -o $ehrd/docs/tmp_hive_schema.html",
"(head -n 3 $ehrd/docs/tmp_hive_schema.html ; cat $ehrd/docs/hive_schema.hdr ; tail -n +4 $ehrd/docs/tmp_hive_schema.html) | sed 's/\\/i\\/16\\//http:\\/\\/www.ensembl.org\\/i\\/16\\//' > $ehrd/docs/hive_schema.html",
"rm $ehrd/docs/tmp_hive_schema.html", # remove the non-patched version
"perl $sql2rst -i $ehrd/sql/tables.mysql -d Hive -sort_headers 0 -sort_tables 0 -o $ehrd/docs/user_manual/appendix/hive_schema.rst",
);
foreach my $cmd (@cmds) {
......@@ -76,7 +74,6 @@ sub generate_docs_scripts {
my @cmds = (
"rm -rf $target_dir",
"mkdir $target_dir",
"cd $ehrd/scripts",
);
opendir( my $script_dir, "$ehrd/scripts") || die "Can't opendir $ehrd/scripts: $!";
foreach my $plname ( readdir($script_dir) ) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment