From c6a0298e2a582d22144a229664c0b99d13b3330d Mon Sep 17 00:00:00 2001 From: wangyanfei01 Date: Wed, 9 Nov 2016 17:24:21 +0800 Subject: [PATCH 01/18] create PR to polish test_period meaning --- paddle/trainer/Trainer.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/paddle/trainer/Trainer.cpp b/paddle/trainer/Trainer.cpp index 7fc48dd1fbec6..32c4bad239ec9 100644 --- a/paddle/trainer/Trainer.cpp +++ b/paddle/trainer/Trainer.cpp @@ -46,6 +46,18 @@ P_DEFINE_int32(test_period, 0, " If not 0, test log_period batches." " If 0, test on all test data"); +P_DEFINE_int32(test_batches_while_training, 0, + "Run test every so many train batches." + " 0 for testing after each pass." + " If not 0, test log_period batches." + " If 0, test on all test data"); + +P_DEFINE_int32(test_batches_while_end, 0, + "Run test every so many train batches." + " 0 for testing after each pass." + " If not 0, test log_period batches." + " If 0, test on all test data"); + P_DEFINE_bool(local, true, "Train in local mode or not"); P_DEFINE_bool( From 0a0c55d2289d3d474014590758ec3143decf2ba2 Mon Sep 17 00:00:00 2001 From: wangyanfei01 Date: Wed, 9 Nov 2016 19:27:29 +0800 Subject: [PATCH 02/18] more friendly test options --- paddle/trainer/Tester.cpp | 18 ++++++++---- paddle/trainer/Tester.h | 2 +- paddle/trainer/TesterConfig.h | 11 +++++-- paddle/trainer/Trainer.cpp | 54 ++++++++++++++++++++--------------- 4 files changed, 53 insertions(+), 32 deletions(-) diff --git a/paddle/trainer/Tester.cpp b/paddle/trainer/Tester.cpp index d3b88019faa04..f57e09d40af7f 100644 --- a/paddle/trainer/Tester.cpp +++ b/paddle/trainer/Tester.cpp @@ -90,13 +90,20 @@ void Tester::testOneDataBatch( testContext_.numSamples += dataBatch.getSize(); } -void Tester::testOnePeriod() { +void Tester::testOnePeriod(bool finishPass) { DataBatch dataBatch; int64_t batchSize = config_->getOptConfig().batch_size(); + bool testAllData = - intconfig_->testPeriod == 0 || intconfig_->testAllDataInOnePeriod; - int batches = - testAllData ? std::numeric_limits::max() : intconfig_->testPeriod; + (!finishPass && !intconfig_->testBatchesWhileTraining) || + (finishPass && !intconfig_->testBatchesWhileEnd); + int batches; + if (testAllData) { + batches = std::numeric_limits::max(); + } else { + batches = finishPass ? + intconfig_->testBatchesWhileEnd : intconfig_->testBatchesWhileTraining; + } std::vector outArgs; @@ -108,7 +115,8 @@ void Tester::testOnePeriod() { if (intconfig_->prevBatchState) { gradientMachine_->resetState(); } - if (testAllData) { + if ((!finishPass && !intconfig_->testBatchesWhileTraining) || + (finishPass && !intconfig_->testBatchesWhileEnd)) { break; } else { num = testDataProvider_->getNextBatch(batchSize, &dataBatch); diff --git a/paddle/trainer/Tester.h b/paddle/trainer/Tester.h index 671ffc5220eba..21e11422aa494 100644 --- a/paddle/trainer/Tester.h +++ b/paddle/trainer/Tester.h @@ -67,7 +67,7 @@ class Tester { * It is convenience to test small set of data when test data set is large and * is training at same time. */ - void testOnePeriod(); + void testOnePeriod(bool finishPass = true); void startTestPeriod(); void finishTestPeriod(); void testOneDataBatch(const DataBatch& dataBatch, diff --git a/paddle/trainer/TesterConfig.h b/paddle/trainer/TesterConfig.h index d5e644ce61247..b7b550dec7cc9 100644 --- a/paddle/trainer/TesterConfig.h +++ b/paddle/trainer/TesterConfig.h @@ -38,12 +38,17 @@ struct TesterConfig { /** * indicate test period */ - int testPeriod; + int testPeriodWhileTraining; /** - * indicate whether testing data in one period + * indicate how many batches are used for testing under training */ - bool testAllDataInOnePeriod; + bool testBatchesWhileTraining; + + /** + * indicate how many batches are used for testing at pass end + */ + bool testBatchesWhileEnd; /** * indicate whether to save previous batch state diff --git a/paddle/trainer/Trainer.cpp b/paddle/trainer/Trainer.cpp index 32c4bad239ec9..477813b4748f5 100644 --- a/paddle/trainer/Trainer.cpp +++ b/paddle/trainer/Trainer.cpp @@ -40,31 +40,28 @@ limitations under the License. */ #include "TrainerConfigHelper.h" P_DEFINE_string(config, "", "Trainer config file"); -P_DEFINE_int32(test_period, 0, - "Run test every so many train batches." - " 0 for testing after each pass." - " If not 0, test log_period batches." - " If 0, test on all test data"); -P_DEFINE_int32(test_batches_while_training, 0, +P_DEFINE_int32(test_period, 0, + "This option was deprecated, use test_period_while_training " + " instead. "); +P_DEFINE_int32(test_period_while_training, 0, "Run test every so many train batches." - " 0 for testing after each pass." " If not 0, test log_period batches." + " If 0, test nothing."); +P_DEFINE_int32(test_batches_while_training, 1000, + "test test_batches_while_training batches if test_period != 0." " If 0, test on all test data"); - P_DEFINE_int32(test_batches_while_end, 0, - "Run test every so many train batches." - " 0 for testing after each pass." - " If not 0, test log_period batches." - " If 0, test on all test data"); + "test test_batches_while_end batches at pass end." + " Always run test at pass end." + " If not 0, test test_batches_while_end batches." + " If 0, test on all test data."); +P_DEFINE_bool(test_all_data_in_one_period, false, + "This option was deprecated, use test_batches_while_training " + "and test_batches_while_end instead"); P_DEFINE_bool(local, true, "Train in local mode or not"); -P_DEFINE_bool( - test_all_data_in_one_period, false, - "true will test all data in one test peroid." - "Otherwise test (batch_size * log_peroid) data in one test period."); - P_DEFINE_int32(average_test_period, 0, "Do test on average parameter every so" " many batches. MUST be devided by FLAGS_log_period." @@ -469,9 +466,9 @@ void Trainer::trainOneDataBatch(DataBatch& dataBatch) { FOR_TIMING(globalStat.reset()); } - if (testDataProvider_ && FLAGS_test_period > 0 && - trainPassContext_.batchId % FLAGS_test_period == 0) { - tester_->testOnePeriod(); + if (testDataProvider_ && FLAGS_test_period_while_training > 0 && + trainPassContext_.batchId % FLAGS_test_period_while_training == 0) { + tester_->testOnePeriod(false); } if (FLAGS_saving_period_by_batches > 0 && @@ -480,7 +477,7 @@ void Trainer::trainOneDataBatch(DataBatch& dataBatch) { 0 == FLAGS_trainer_id) { trainerInternal_.getParameterUpdater()->catchUpWith(); if (testDataProvider_) { - tester_->testOnePeriod(); + tester_->testOnePeriod(false); } paramUtil_->saveParametersOnePass( trainPassContext_.passId, trainPassContext_.passInnerId); @@ -636,8 +633,19 @@ void Trainer::test() { std::unique_ptr Trainer::createTesterConfig() { TesterConfig* conf = new TesterConfig; - conf->testPeriod = FLAGS_test_period; - conf->testAllDataInOnePeriod = FLAGS_test_all_data_in_one_period; + if (FLAGS_test_period) { + LOG(WARNING) + << "--test_period was deprecated, use --test_period_while_training" + << "--test_batches_while_training --test_batches_while_end instead."; + } + if (FLAGS_test_all_data_in_one_period) { + LOG(WARNING) + << "--test_all_data_in_one_period was deprecated, use" + << " --test_batches_while_training and --test_batches_while_end instead"; + } + conf->testPeriodWhileTraining = FLAGS_test_period_while_training; + conf->testBatchesWhileTraining = FLAGS_test_batches_while_training; + conf->testBatchesWhileEnd = FLAGS_test_batches_while_end; conf->prevBatchState = FLAGS_prev_batch_state; conf->logPeriod = FLAGS_log_period; conf->loadsaveParametersInPserver = FLAGS_loadsave_parameters_in_pserver; From 0feecbd13c9cf700e80fe4dbce84c9b724cf248e Mon Sep 17 00:00:00 2001 From: wangyanfei01 Date: Wed, 9 Nov 2016 19:50:01 +0800 Subject: [PATCH 03/18] modify on docs --- doc/ui/cmd_argument/argument_outline.md | 11 ++++++++--- doc/ui/cmd_argument/detail_introduction.md | 14 +++++++++----- doc/ui/cmd_argument/use_case.md | 7 ++++--- paddle/trainer/Trainer.cpp | 3 ++- 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/doc/ui/cmd_argument/argument_outline.md b/doc/ui/cmd_argument/argument_outline.md index d6cc2c6ed7cc1..bafa5dfef2c63 100644 --- a/doc/ui/cmd_argument/argument_outline.md +++ b/doc/ui/cmd_argument/argument_outline.md @@ -68,7 +68,7 @@ It looks like there are a lot of arguments. However, most of them are for develo -test_period +test_period_while_training √√ @@ -143,8 +143,13 @@ It looks like there are a lot of arguments. However, most of them are for develo -testing during trainingtest_all_data_in_one_period -√√ +testing during trainingtest_batches_while_training +√√√< + + + +testing during trainingtest_batches_while_end +√√√< diff --git a/doc/ui/cmd_argument/detail_introduction.md b/doc/ui/cmd_argument/detail_introduction.md index 07608e5edf740..0628289dbd683 100644 --- a/doc/ui/cmd_argument/detail_introduction.md +++ b/doc/ui/cmd_argument/detail_introduction.md @@ -109,9 +109,9 @@ - Load parameter from this pass to test. - type: int32 (default: -1). -* `--test_period` - - Run testing every test_period train batches. If not set, run testing each pass. - - type: int32 (default: 1000). +* `--test_period_while_training` + - Run test every so many train batches. If not 0, test log_period batches. If 0, test nothing. + - type: int32 (default: 0). * `--test_wait` - Whether to wait for parameter per pass if not exist. If set test_data_path in submitting environment of cluster, it will launch one process to perfom testing, so we need to set test_wait=1. Note that in the cluster submitting environment, this argument has been set True by default. @@ -121,8 +121,12 @@ - File that saves the model list when testing. It was set automatically when using cluster submitting environment after setting model_path. - type: string (default: "", null). -* `--test_all_data_in_one_period` - - This argument is usually used in testing period during traning. If true, all data will be tested in one test period. Otherwise (batch_size * log_peroid) data will be tested. +* `--test_batches_while_training` + - Test test_batches_while_training batches if test_batches_while_training != 0. If 0, test on all test data. + - type: bool (default: 1000). + +* `--test_batches_while_end` + - Test test_batches_while_end batches if test_batches_while_end != 0. If 0, test on all test data. - type: bool (default: 0). * `--predict_output_dir` diff --git a/doc/ui/cmd_argument/use_case.md b/doc/ui/cmd_argument/use_case.md index a6bfba29af4f7..b243560106df1 100644 --- a/doc/ui/cmd_argument/use_case.md +++ b/doc/ui/cmd_argument/use_case.md @@ -10,9 +10,10 @@ paddle train \ --config=network_config \ --save_dir=output \ --trainer_count=COUNT \ #(default:1) - --test_period=M \ #(default:1000) - --test_all_data_in_one_period=true \ #(default:false) - --num_passes=N \ #(defalut:100) + --test_period_while_training=M \ #(default:0) + --test_batches_while_training=BATCHES \#(default:1000) + --test_batches_while_end=BATCHES \ #(default:0) + --num_passes=N \ #(defalut:100) --log_period=K \ #(default:100) --dot_period=1000 \ #(default:1) #[--show_parameter_stats_period=100] \ #(default:0) diff --git a/paddle/trainer/Trainer.cpp b/paddle/trainer/Trainer.cpp index 477813b4748f5..107fa240cf37f 100644 --- a/paddle/trainer/Trainer.cpp +++ b/paddle/trainer/Trainer.cpp @@ -49,7 +49,8 @@ P_DEFINE_int32(test_period_while_training, 0, " If not 0, test log_period batches." " If 0, test nothing."); P_DEFINE_int32(test_batches_while_training, 1000, - "test test_batches_while_training batches if test_period != 0." + "test test_batches_while_training batches if " + "test_batches_while_training != 0." " If 0, test on all test data"); P_DEFINE_int32(test_batches_while_end, 0, "test test_batches_while_end batches at pass end." From c509908b748c98d3a46d70ac044edd0cbb297002 Mon Sep 17 00:00:00 2001 From: wangyanfei01 Date: Wed, 9 Nov 2016 21:12:31 +0800 Subject: [PATCH 04/18] follow comments --- doc/ui/cmd_argument/detail_introduction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/ui/cmd_argument/detail_introduction.md b/doc/ui/cmd_argument/detail_introduction.md index 0628289dbd683..1ff4bdbaa3a7b 100644 --- a/doc/ui/cmd_argument/detail_introduction.md +++ b/doc/ui/cmd_argument/detail_introduction.md @@ -110,7 +110,7 @@ - type: int32 (default: -1). * `--test_period_while_training` - - Run test every so many train batches. If not 0, test log_period batches. If 0, test nothing. + - Run test every test_period_while_training batches while doing training. If not 0, test log_period batches. If 0, test nothing. - type: int32 (default: 0). * `--test_wait` From dcf06bff04b6486817f83d160288c515763ea0b4 Mon Sep 17 00:00:00 2001 From: wangyanfei01 Date: Wed, 9 Nov 2016 21:34:43 +0800 Subject: [PATCH 05/18] follow comments --- doc/ui/cmd_argument/detail_introduction.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/ui/cmd_argument/detail_introduction.md b/doc/ui/cmd_argument/detail_introduction.md index 1ff4bdbaa3a7b..40c6f5d2d8740 100644 --- a/doc/ui/cmd_argument/detail_introduction.md +++ b/doc/ui/cmd_argument/detail_introduction.md @@ -110,7 +110,7 @@ - type: int32 (default: -1). * `--test_period_while_training` - - Run test every test_period_while_training batches while doing training. If not 0, test log_period batches. If 0, test nothing. + - Run test every test_period_while_training batches while doing training. If not 0, test log_period batches, if 0 test nothing. - type: int32 (default: 0). * `--test_wait` @@ -122,11 +122,11 @@ - type: string (default: "", null). * `--test_batches_while_training` - - Test test_batches_while_training batches if test_batches_while_training != 0. If 0, test on all test data. + - Test test_batches_while_training batches if test_batches_while_training != 0 while doing training. If 0, test on all test data. - type: bool (default: 1000). * `--test_batches_while_end` - - Test test_batches_while_end batches if test_batches_while_end != 0. If 0, test on all test data. + - Test test_batches_while_end batches if test_batches_while_end != 0 at pass end. If 0, test on all test data. - type: bool (default: 0). * `--predict_output_dir` From 453e6ba598906b58cc74d854bb0170bf800675fa Mon Sep 17 00:00:00 2001 From: wangyanfei01 Date: Wed, 9 Nov 2016 21:35:36 +0800 Subject: [PATCH 06/18] follow comments --- doc/ui/cmd_argument/detail_introduction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/ui/cmd_argument/detail_introduction.md b/doc/ui/cmd_argument/detail_introduction.md index 40c6f5d2d8740..af97e04d54135 100644 --- a/doc/ui/cmd_argument/detail_introduction.md +++ b/doc/ui/cmd_argument/detail_introduction.md @@ -110,7 +110,7 @@ - type: int32 (default: -1). * `--test_period_while_training` - - Run test every test_period_while_training batches while doing training. If not 0, test log_period batches, if 0 test nothing. + - Run test every test_period_while_training batches while doing training. If not 0, test log_period batches, if 0, test nothing. - type: int32 (default: 0). * `--test_wait` From b62c80f1561efe07156ef99c1e57fb3eeb24267d Mon Sep 17 00:00:00 2001 From: wangyanfei01 Date: Wed, 9 Nov 2016 21:42:28 +0800 Subject: [PATCH 07/18] qfg --- doc/ui/cmd_argument/detail_introduction.md | 2 +- paddle/trainer/Trainer.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/ui/cmd_argument/detail_introduction.md b/doc/ui/cmd_argument/detail_introduction.md index af97e04d54135..1f7e406a53ed4 100644 --- a/doc/ui/cmd_argument/detail_introduction.md +++ b/doc/ui/cmd_argument/detail_introduction.md @@ -110,7 +110,7 @@ - type: int32 (default: -1). * `--test_period_while_training` - - Run test every test_period_while_training batches while doing training. If not 0, test log_period batches, if 0, test nothing. + - Run test every test_period_while_training batches while doing training. If not 0, test test_batches_while_training batches, if 0, test nothing. - type: int32 (default: 0). * `--test_wait` diff --git a/paddle/trainer/Trainer.cpp b/paddle/trainer/Trainer.cpp index 107fa240cf37f..507a080cc4fbe 100644 --- a/paddle/trainer/Trainer.cpp +++ b/paddle/trainer/Trainer.cpp @@ -45,8 +45,8 @@ P_DEFINE_int32(test_period, 0, "This option was deprecated, use test_period_while_training " " instead. "); P_DEFINE_int32(test_period_while_training, 0, - "Run test every so many train batches." - " If not 0, test log_period batches." + "Run test every test_period_while_training batches." + " If not 0, test test_batches_while_training batches." " If 0, test nothing."); P_DEFINE_int32(test_batches_while_training, 1000, "test test_batches_while_training batches if " From 1f743d381cfb5dc80c25d4787ea1a703eb3ba07d Mon Sep 17 00:00:00 2001 From: wangyanfei01 Date: Mon, 28 Nov 2016 19:55:34 +0800 Subject: [PATCH 08/18] Redesign test_period meaning: * always do test on all test data * do test at the end of each pass if test_period=0, otherwise do test if test_period batches passed --- doc/ui/cmd_argument/argument_outline.md | 11 ++---- doc/ui/cmd_argument/detail_introduction.md | 12 +----- doc/ui/cmd_argument/use_case.md | 4 +- paddle/trainer/Tester.cpp | 20 ++-------- paddle/trainer/Tester.h | 2 +- paddle/trainer/TesterConfig.h | 12 +----- paddle/trainer/Trainer.cpp | 46 +++++++++------------- 7 files changed, 29 insertions(+), 78 deletions(-) diff --git a/doc/ui/cmd_argument/argument_outline.md b/doc/ui/cmd_argument/argument_outline.md index bafa5dfef2c63..013edbc904781 100644 --- a/doc/ui/cmd_argument/argument_outline.md +++ b/doc/ui/cmd_argument/argument_outline.md @@ -68,7 +68,7 @@ It looks like there are a lot of arguments. However, most of them are for develo -test_period_while_training +test_period √√ @@ -143,13 +143,8 @@ It looks like there are a lot of arguments. However, most of them are for develo -testing during trainingtest_batches_while_training -√√√< - - - -testing during trainingtest_batches_while_end -√√√< +testing during trainingtest_period +√√ diff --git a/doc/ui/cmd_argument/detail_introduction.md b/doc/ui/cmd_argument/detail_introduction.md index 1f7e406a53ed4..823a2266191b5 100644 --- a/doc/ui/cmd_argument/detail_introduction.md +++ b/doc/ui/cmd_argument/detail_introduction.md @@ -109,8 +109,8 @@ - Load parameter from this pass to test. - type: int32 (default: -1). -* `--test_period_while_training` - - Run test every test_period_while_training batches while doing training. If not 0, test test_batches_while_training batches, if 0, test nothing. +* `--test_period` + - if equal 0, do test on all test data at the end of each pass while if equal non-zero, do test on all test data once each test_period batches passed while training is going on. - type: int32 (default: 0). * `--test_wait` @@ -121,14 +121,6 @@ - File that saves the model list when testing. It was set automatically when using cluster submitting environment after setting model_path. - type: string (default: "", null). -* `--test_batches_while_training` - - Test test_batches_while_training batches if test_batches_while_training != 0 while doing training. If 0, test on all test data. - - type: bool (default: 1000). - -* `--test_batches_while_end` - - Test test_batches_while_end batches if test_batches_while_end != 0 at pass end. If 0, test on all test data. - - type: bool (default: 0). - * `--predict_output_dir` - Directory that saves the layer output. It is configured in Outputs() in network config. Default, this argument is null, meaning save nothing. Specify this directory if you want to save feature map of some layers in testing mode. Note that, layer outputs are values after activation function. - type: string (default: "", null). diff --git a/doc/ui/cmd_argument/use_case.md b/doc/ui/cmd_argument/use_case.md index b243560106df1..4d7bb33f36fe2 100644 --- a/doc/ui/cmd_argument/use_case.md +++ b/doc/ui/cmd_argument/use_case.md @@ -10,9 +10,7 @@ paddle train \ --config=network_config \ --save_dir=output \ --trainer_count=COUNT \ #(default:1) - --test_period_while_training=M \ #(default:0) - --test_batches_while_training=BATCHES \#(default:1000) - --test_batches_while_end=BATCHES \ #(default:0) + --test_period=M \ #(default:0) --num_passes=N \ #(defalut:100) --log_period=K \ #(default:100) --dot_period=1000 \ #(default:1) diff --git a/paddle/trainer/Tester.cpp b/paddle/trainer/Tester.cpp index f57e09d40af7f..217b8c60be585 100644 --- a/paddle/trainer/Tester.cpp +++ b/paddle/trainer/Tester.cpp @@ -90,20 +90,11 @@ void Tester::testOneDataBatch( testContext_.numSamples += dataBatch.getSize(); } -void Tester::testOnePeriod(bool finishPass) { +void Tester::testOnePeriod() { DataBatch dataBatch; int64_t batchSize = config_->getOptConfig().batch_size(); - bool testAllData = - (!finishPass && !intconfig_->testBatchesWhileTraining) || - (finishPass && !intconfig_->testBatchesWhileEnd); - int batches; - if (testAllData) { - batches = std::numeric_limits::max(); - } else { - batches = finishPass ? - intconfig_->testBatchesWhileEnd : intconfig_->testBatchesWhileTraining; - } + int batches = std::numeric_limits::max(); std::vector outArgs; @@ -115,12 +106,7 @@ void Tester::testOnePeriod(bool finishPass) { if (intconfig_->prevBatchState) { gradientMachine_->resetState(); } - if ((!finishPass && !intconfig_->testBatchesWhileTraining) || - (finishPass && !intconfig_->testBatchesWhileEnd)) { - break; - } else { - num = testDataProvider_->getNextBatch(batchSize, &dataBatch); - } + break; } testOneDataBatch(dataBatch, &outArgs); } diff --git a/paddle/trainer/Tester.h b/paddle/trainer/Tester.h index 21e11422aa494..671ffc5220eba 100644 --- a/paddle/trainer/Tester.h +++ b/paddle/trainer/Tester.h @@ -67,7 +67,7 @@ class Tester { * It is convenience to test small set of data when test data set is large and * is training at same time. */ - void testOnePeriod(bool finishPass = true); + void testOnePeriod(); void startTestPeriod(); void finishTestPeriod(); void testOneDataBatch(const DataBatch& dataBatch, diff --git a/paddle/trainer/TesterConfig.h b/paddle/trainer/TesterConfig.h index b7b550dec7cc9..8392bbcda5120 100644 --- a/paddle/trainer/TesterConfig.h +++ b/paddle/trainer/TesterConfig.h @@ -38,17 +38,7 @@ struct TesterConfig { /** * indicate test period */ - int testPeriodWhileTraining; - - /** - * indicate how many batches are used for testing under training - */ - bool testBatchesWhileTraining; - - /** - * indicate how many batches are used for testing at pass end - */ - bool testBatchesWhileEnd; + int testPeriod; /** * indicate whether to save previous batch state diff --git a/paddle/trainer/Trainer.cpp b/paddle/trainer/Trainer.cpp index 507a080cc4fbe..aca896770ae4e 100644 --- a/paddle/trainer/Trainer.cpp +++ b/paddle/trainer/Trainer.cpp @@ -42,24 +42,13 @@ limitations under the License. */ P_DEFINE_string(config, "", "Trainer config file"); P_DEFINE_int32(test_period, 0, - "This option was deprecated, use test_period_while_training " - " instead. "); -P_DEFINE_int32(test_period_while_training, 0, - "Run test every test_period_while_training batches." - " If not 0, test test_batches_while_training batches." - " If 0, test nothing."); -P_DEFINE_int32(test_batches_while_training, 1000, - "test test_batches_while_training batches if " - "test_batches_while_training != 0." - " If 0, test on all test data"); -P_DEFINE_int32(test_batches_while_end, 0, - "test test_batches_while_end batches at pass end." - " Always run test at pass end." - " If not 0, test test_batches_while_end batches." - " If 0, test on all test data."); + "if equal 0, do test on all test data at the end of " + "each pass while if equal non-zero, do test on all test " + "data once each test_period batches passed while " + "training is going on"); P_DEFINE_bool(test_all_data_in_one_period, false, - "This option was deprecated, use test_batches_while_training " - "and test_batches_while_end instead"); + "This option was deprecated, since we will always do " + "test on all test set "); P_DEFINE_bool(local, true, "Train in local mode or not"); @@ -467,9 +456,9 @@ void Trainer::trainOneDataBatch(DataBatch& dataBatch) { FOR_TIMING(globalStat.reset()); } - if (testDataProvider_ && FLAGS_test_period_while_training > 0 && - trainPassContext_.batchId % FLAGS_test_period_while_training == 0) { - tester_->testOnePeriod(false); + if (testDataProvider_ && FLAGS_test_period > 0 && + trainPassContext_.batchId % FLAGS_test_period == 0) { + tester_->testOnePeriod(); } if (FLAGS_saving_period_by_batches > 0 && @@ -478,7 +467,7 @@ void Trainer::trainOneDataBatch(DataBatch& dataBatch) { 0 == FLAGS_trainer_id) { trainerInternal_.getParameterUpdater()->catchUpWith(); if (testDataProvider_) { - tester_->testOnePeriod(false); + tester_->testOnePeriod(); } paramUtil_->saveParametersOnePass( trainPassContext_.passId, trainPassContext_.passInnerId); @@ -636,17 +625,18 @@ std::unique_ptr Trainer::createTesterConfig() { TesterConfig* conf = new TesterConfig; if (FLAGS_test_period) { LOG(WARNING) - << "--test_period was deprecated, use --test_period_while_training" - << "--test_batches_while_training --test_batches_while_end instead."; + << "The meaning of --test_period is changed: " + << "if equal 0, do test on all test data at the end of " + << "each pass while if equal non-zero, do test on all test " + << "data once each test_period batches passed while " + << "training is going on"; } if (FLAGS_test_all_data_in_one_period) { LOG(WARNING) - << "--test_all_data_in_one_period was deprecated, use" - << " --test_batches_while_training and --test_batches_while_end instead"; + << "--test_all_data_in_one_period was deprecated, since " + << "we will always do test on all test set "; } - conf->testPeriodWhileTraining = FLAGS_test_period_while_training; - conf->testBatchesWhileTraining = FLAGS_test_batches_while_training; - conf->testBatchesWhileEnd = FLAGS_test_batches_while_end; + conf->testPeriod = FLAGS_test_period; conf->prevBatchState = FLAGS_prev_batch_state; conf->logPeriod = FLAGS_log_period; conf->loadsaveParametersInPserver = FLAGS_loadsave_parameters_in_pserver; From 9563db3e77797aaaae9a8ddc7af66b0f824d83eb Mon Sep 17 00:00:00 2001 From: Shi-Liang <385936547@qq.com> Date: Fri, 2 Dec 2016 14:54:26 +0800 Subject: [PATCH 09/18] modified the document config files and add theme files --- doc/conf.py.in | 8 +- doc_cn/conf.py.in | 9 +- doc_theme/static/css/override.css | 510 ++++++++++++++++++ .../static/css/perfect-scrollbar.min.css | 2 + doc_theme/static/images/PP_w.png | Bin 0 -> 3183 bytes doc_theme/static/images/breadcrumb-shadow.png | Bin 0 -> 1049 bytes doc_theme/static/js/bootstrap.min.js | 7 + doc_theme/static/js/paddle_doc_init.js | 30 ++ .../static/js/perfect-scrollbar.jquery.min.js | 2 + doc_theme/static/js/scrollspy.js | 225 ++++++++ doc_theme/templates/breadcrumbs.html | 24 + doc_theme/templates/layout.html | 191 +++++++ doc_theme/templates/search.html | 52 ++ paddle/scripts/tools/build_docs/Dockerfile | 1 + 14 files changed, 1053 insertions(+), 8 deletions(-) create mode 100644 doc_theme/static/css/override.css create mode 100644 doc_theme/static/css/perfect-scrollbar.min.css create mode 100644 doc_theme/static/images/PP_w.png create mode 100644 doc_theme/static/images/breadcrumb-shadow.png create mode 100644 doc_theme/static/js/bootstrap.min.js create mode 100644 doc_theme/static/js/paddle_doc_init.js create mode 100644 doc_theme/static/js/perfect-scrollbar.jquery.min.js create mode 100644 doc_theme/static/js/scrollspy.js create mode 100644 doc_theme/templates/breadcrumbs.html create mode 100644 doc_theme/templates/layout.html create mode 100644 doc_theme/templates/search.html diff --git a/doc/conf.py.in b/doc/conf.py.in index 3d3bb9e8d5e40..1652540b3b554 100644 --- a/doc/conf.py.in +++ b/doc/conf.py.in @@ -23,7 +23,7 @@ AutoStructify = transform.AutoStructify # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, '@PROJ_ROOT@/python') -templates_path = ["@PROJ_ROOT@/doc/templates"] +templates_path = ["@PROJ_ROOT@/doc_theme/templates"] # -- General configuration ------------------------------------------------ @@ -113,13 +113,13 @@ todo_include_todos = False # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -#html_theme = 'sphinx_rtd_theme' -html_theme = 'classic' +html_theme = 'sphinx_rtd_theme' +#html_theme = 'classic' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +html_static_path = ['@PROJ_ROOT@/doc_theme/static'] # Output file base name for HTML help builder. htmlhelp_basename = project + 'doc' diff --git a/doc_cn/conf.py.in b/doc_cn/conf.py.in index 93242ace40600..7f69e7e8fd279 100644 --- a/doc_cn/conf.py.in +++ b/doc_cn/conf.py.in @@ -22,7 +22,7 @@ AutoStructify = transform.AutoStructify # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, '@PROJ_ROOT@/python') -templates_path = ["@PROJ_ROOT@/doc/templates"] +templates_path = ["@PROJ_ROOT@/doc_theme/templates"] # -- General configuration ------------------------------------------------ @@ -112,12 +112,13 @@ todo_include_todos = False # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -#html_theme = 'sphinx_rtd_theme' # sphinx_rtd_theme will cause table bad style -html_theme = 'classic' +html_theme = 'sphinx_rtd_theme' +# sphinx_rtd_theme will cause table bad style +#html_theme = 'classic' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +html_static_path = ['@PROJ_ROOT@/doc_theme/static'] # Output file base name for HTML help builder. htmlhelp_basename = project + 'doc' diff --git a/doc_theme/static/css/override.css b/doc_theme/static/css/override.css new file mode 100644 index 0000000000000..3b81de758de21 --- /dev/null +++ b/doc_theme/static/css/override.css @@ -0,0 +1,510 @@ +body { + padding-top: 80px; + background-image: none !important; + font-family: Roboto; +} +a, a:focus, a:hover, a:visited { + color: #597cf1; +} +.site-header { + position: fixed; + top: 0; + width: 100%; + left: 0; + z-index: 99; + background: #333; + height: 80px; + display: -webkit-flex; + display: -ms-flex; + display: -o-flex; + display: flex; + flex-flow: row nowrap; + justify-content: space-between; + box-shadow: #ccc 0 3px 3px; +} +.site-header > div { + height: 80px; + display: inline-block; + background-color: #2f323a; + padding: 0 30px; +} +.site-header .site-logo{ + line-height: 80px; + width: 290px; + flex: 0 1 290px; +} +.site-header .site-logo > a{ + display: inline-block; + width: 230px; +} +.site-header .site-nav-links{ + flex: 0 1 100%; +} +.site-header .site-nav-links .site-menu{ + height: 30px; + line-height: 30px; + font-size: 12px; + background: -webkit-linear-gradient(#282b33, #2f323a); + background: -o-linear-gradient(#282b33, #2f323a); + background: -moz-linear-gradient(#282b33, #2f323a); + background: linear-gradient(to left, #282b33, #2f323a); + margin-right: -30px; + padding-right: 30px; +} +.site-header .site-nav-links .site-menu .site-page-links { + display: inline-block; + float: right; + margin-right: 20px; +} +.site-header .site-nav-links .site-menu .site-page-links> li{ + display: inline-block; + float: left; +} +.site-header .site-nav-links .site-menu .site-page-links > li > a{ + color: #a7adbd; + display: inline-block; + height: 30px; + padding: 0 20px; + font-size: 12px; +} +.site-header .site-nav-links .site-menu .site-page-links > li:hover > a, +.site-header .site-nav-links .site-menu .site-page-links > li.active > a{ + background-color: #2f323a; + color: #bcc1d0; +} +.site-header .site-nav-links .site-menu .site-page-links > li.active > a{ + font-weight: bold; +} +.site-header .site-nav-links .site-menu .fork-on-github{ + color: #597cf1; + line-height: 30px; + display: inline-block; + padding: 0 0 0 20px; + float: right; + position: relative; +} +.site-header .site-nav-links .site-menu .fork-on-github .fa { + margin-right: 5px; + font-size: 16px; + vertical-align: middle; +} +.site-header .site-nav-links .site-menu .language-switcher{ + height: 30px; + display: inline-block; + float: right; + line-height: 30px; + padding: 0 20px; + position: relative; +} +.site-header .site-nav-links .site-menu .language-switcher > a{ + color: #a7adbd; +} +.site-header .site-nav-links .site-menu .language-switcher.open > a{ + background-color: #24272f; + color: #bcc1d0; +} +.site-header .site-nav-links .site-menu .language-switcher .fa{ + margin-left: 5px; +} +.site-header .site-nav-links .site-menu .language-switcher .fa-angle-down{ + display: inline; +} +.site-header .site-nav-links .site-menu .language-switcher.open .fa-angle-down{ + display: none; +} +.site-header .site-nav-links .site-menu .language-switcher .fa-angle-up{ + display: none; +} +.site-header .site-nav-links .site-menu .language-switcher.open .fa-angle-up{ + display: inline; +} +.site-header .site-nav-links .site-menu .fork-on-github:before, +.site-header .site-nav-links .site-menu .language-switcher:before{ + width: 1px; + height: 12px; + top: 9px; + background-color: #3a3d47; + left: 0; + display: inline-block; + position: absolute; + content: ""; +} +.site-header .site-nav-links .site-menu .language-switcher .dropdown-menu{ + display: none; + position: absolute; + box-shadow: #ccc 0 0 5px; + background-color: #fff; + width: 100%; + left: 0; + top: 30px; +} +.site-header .site-nav-links .site-menu .language-switcher .dropdown-menu > li { + line-height: 30px; + padding: 0 20px; +} +.site-header .site-nav-links .site-menu .language-switcher .dropdown-menu > li:hover{ + background-color: #f7f8fe; +} +.site-header .site-nav-links .site-menu .language-switcher .dropdown-menu > li + li{ + border-top: 1px solid #dedfe5; +} +.site-header .site-nav-links .site-menu .language-switcher .dropdown-menu > li > a{ + color: #2f323a; +} +.site-header .site-nav-links .site-menu .language-switcher.open .dropdown-menu{ + display: inline-block; +} +.site-header .site-nav-links .doc-module{ + display: block; + height: 50px; + line-height: 50px; +} +.site-header .site-nav-links .doc-module > ul > li { + display: inline-block; + float: left; +} +.site-header .site-nav-links .doc-module > ul > li > a { + color: #c9cbd0; + font-size: 14px; + display: inline-block; + height: 50px; + line-height: 50px; + border-bottom: 2px solid transparent; + padding: 0 20px; +} +.site-header .site-nav-links .doc-module > ul > li:hover > a { + color: #fff; +} +.site-header .site-nav-links .doc-module > ul > li.current > a { + border-bottom-color: #fff; + color: #fff; +} +.site-header .site-nav-links .doc-module [role="search"]{ + float: right; +} +.site-header .site-nav-links .doc-module [role="search"] input{ + background-color: #3a3d47; + border-radius: 15px; + color: #a7adbd; + border: 1px solid transparent; + padding: 6px 15px; + width: 180px; + box-shadow: none; + transition: all .2s; + -webkit-transition: all .2s; + -moz-transition: all .2s; + -o-transition: all .2s; + background-repeat: no-repeat; + background-position: 145px center; + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFWBUiwCwMIAoKxAIi4EwK4BgFm2MkcCgL0FAHaOWJAPQGAAgJlCLMwAIDgCAEMeE80DIEwDoDDSv+CpX3CFuEgBAMDLlc2XS9IzFLiV0Bp38vDg4iHiwmyxQmEXKRBmCeQinJebIxNI5wNMzgwAABr50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oTQOyAvnCPpRi4tYziVmMY2dkPMc7aAG42hPKE7rAwMBNhEfYQgzOJNZ3xhGL4qigGasyk43OEdjFFCGe9nrNtT8Al5Q8AdAMd6jgFPU/QFwiN0oYD4sJzdLwBiuo4A5vGEKqQyF1ahPcuInOsJrrKMiwWx9OMAWWpOc+BD2MImr4Ik7FIb4AzqRH6zdhU1IxT4TlKAJ5XjCMU6CkaANi2lIXsKsj1jJsIsNdKc7yfE/pSGTPwMABBFCGflm+rsAAAAASUVORK5CYII="); +} +.site-header .site-nav-links .doc-module [role="search"] input:focus{ + width: 300px; +} +.site-header .site-nav-links .doc-module [role="search"] input:focus{ + background-position: 265px center; +} +.site-header .site-nav-links .doc-module [role="search"] input:hover, +.site-header .site-nav-links .doc-module [role="search"] input:focus{ + color: #fff; + border-color: #597cf1; + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFWBUiwCwMIAoKxAIi4EwK4BgFm2MkcCgL0FAHaOWJAPQGAAgJlCLMwAIDgCAEMeE80DIEwDoDDSv+CpX3CFuEgBAMDLlc2XS9IzFLiV0Bp38vDg4iHiwmyxQmEXKRBmCeQinJebIxNI5wNMzgwAABr50cH+OD+Q5+bk4eZm52zv9MWi/mvwbyI+IfHf/ryMAgQAEE7P79pf5eX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jzPZ9Y1R9KMkCmjButx0g3M0RQEVuJe7bkPNL+AFRX8AlOI9CjhF/R8Ah9iNApbCcvJzBEzgOgpYxBtmkcpSWIuGJCd+ojO8xgaqEsw2gANsoy3JiQ9hDzO4Cp64Q3GIP6ALhcHa3diCVOwzQRmaUYknHOMkGAnasZKBFCTM+oi1LLvYRG+mkzz/UwYy8zMAmkpBg3fGpFUAAAAASUVORK5CYII="); +} +.doc-menu-vertical { + display: inline-block; + float: left; + width: 240px; + height: 100%; + background-color: #ecedee; + position: absolute; + left: 0; + top: 0; + overflow: hidden; + padding: 0; + border-right: 1px solid #dddfe3; +} +.doc-menu-vertical > ul { + display: none; +} +.doc-menu-vertical > ul.current{ + display: block; +} +.doc-menu-vertical > ul.current > li.toctree-l1 { + display: none; +} +.doc-menu-vertical > ul.current > li.toctree-l1.current { + display: block; +} +.doc-menu-vertical > ul.current > li.toctree-l1.current > a { + display: none; +} +.doc-menu-vertical .toctree-l2 a{ + width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + padding-right: 30px; +} +.doc-menu-vertical .toctree-l2 > a { + font-size: 14px; + color: #2f323a; + padding-left: 30px; + line-height: 50px; + display: block; + font-weight: bold; + border-bottom: 1px solid #dddfe3; +} +.doc-menu-vertical .toctree-l2.has-child > a:after { + font-family: "FontAwesome"; + display: inline-block; + font-style: normal; + font-weight: normal; + text-decoration: inherit; + content: ""; + float: right; + line-height: 50px; + color: #a7adbd; + position: absolute; + right: 15px; +} +.doc-menu-vertical .toctree-l2.has-child.current > a:after { + content: ""; +} +.doc-menu-vertical .toctree-l2 > a + ul{ + background-color: #e4e6e9; + height: 0; + overflow: hidden; +} +.doc-menu-vertical .toctree-l2.current > a + ul{ + border-bottom: 1px solid #dddfe3; + height: auto; +} +.doc-menu-vertical .toctree-l2 li.active > a { + background-color: #597cf1; + color: #fff; +} + +.doc-menu-vertical .toctree-l3 > a { + font-size: 12px; + color: #2f323a; + padding-left: 30px; + line-height: 40px; + display: block; +} + +.doc-menu-vertical .toctree-l4 > a { + font-size: 12px; + color: #64697b; + padding-left: 50px; + line-height: 30px; + display: block; +} +.doc-menu-vertical .toctree-l5 > a { + font-size: 14px; + color: #ccc; + padding-left: 40px; + display: block; +} +.local-toc { + position: absolute; + height: 100%; + background-color: #f6f7f8; + top: 0; + left: 240px; + padding: 0; + z-index: 9; +} +.local-toc:after { + content: ""; + position: absolute; + height: 100%; + width: 1px; + display: inline-block; + right: 0; + background-color: #dddfe3; + top: 0; + z-index: -1; +} +.local-toc:hover a{ + width: auto; +} +.local-toc > ul > li a { + position: relative; + font-size: 12px; + overflow: hidden; + display: none; +} +.local-toc > ul > li > ul > li a { + display: block; + border-top: 1px solid transparent; + border-bottom: 1px solid transparent; + padding-right: 20px; + width: 50px; +} +.local-toc > ul > li > ul > li > ul > li > ul a { + display: none; +} +.local-toc > ul > li > ul li > a:after { + content: ""; + display: inline-block; + width: 1px; + height: 100%; + background-color: transparent; + position: absolute; + right: 0; + top: 0; +} +.local-toc > ul > li > ul li a:hover{ + background-color: #e6eaf7 !important; +} +.local-toc > ul > li > ul li a:hover:after{ + background-color: #e6eaf7 !important; +} +.local-toc > ul > li > ul li.active > a { + color: #ff9711; + background-color: #fff; + border-top: 1px solid #dddfe3; + border-bottom: 1px solid #dddfe3; +} +.local-toc > ul > li > ul li.active > a:before { + background-color: #ff9711; + width: 10px; + height: 10px; + margin: 15px 20px; + border-radius: 5px; +} +.local-toc > ul > li > ul li.active > a:after { + background-color: #fff; +} +.local-toc > ul > li > ul > li { + position: relative; + line-height: 40px; + white-space: nowrap; +} +.local-toc > ul > li > ul > li > a { + color: #64697b; +} +.local-toc > ul > li > ul > li > a + ul{ + display: none; +} +.local-toc > ul > li > ul > li > a:before { + display: inline-block; + content: ""; + width: 6px; + height: 6px; + background-color: #ccc; + border-radius: 3px; + margin: 17px 22px; + float: left; +} +.local-toc > ul > li > ul > li > ul > li > a { + color: #a7adbd; +} +.local-toc > ul > li > ul > li > ul > li > a:before { + display: inline-block; + content: ""; + width: 6px; + height: 6px; + background-color: #ccc; + border-radius: 3px; + margin: 17px 22px; + float: left; +} +.main-content-wrap { + position: absolute; + width: 100%; + top: 80px; + bottom: 0; + overflow: auto; + background-color: #f6f7f8; +} +.doc-content-wrap { + margin-left: 240px; + height: 100%; + position: relative; + padding-top: 60px; + background-color: #fff; +} +.doc-content-wrap > div[role='navigation'] { + position: absolute; + top: 0; + width: 100%; + left: 0; + padding: 30px; + height: 60px; +} +.wy-breadcrumbs{ + line-height: 50px; + height: 60px; + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAUCAYAAABMDlehAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpjMjhmMGQ3ZC0wODU3LTQ0ZTctOGRhZi00NGU3OTc1ZmM2MzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NzRBN0NEODRBRTM2MTFFNjlGMDI4RUM3M0VDQzY4NTkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NzRBN0NEODNBRTM2MTFFNjlGMDI4RUM3M0VDQzY4NTkiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozNWQwMzI1ZC01ZDAyLTQ1YTYtODUxOS1lNWUzNjU5NGFhMzAiIHN0UmVmOmRvY3VtZW50SUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDozZGVmZmY0OS1mNjA4LTExNzktYTRlZC1kZjJiNGY3N2YwNzMiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7FGmP1AAAAKUlEQVR42mK4/+DpfwY9Q0tBJgYGhv8g4h8uFoKLEGOAc9FYSARAgAEAUgMQYBNmQ7sAAAAASUVORK5CYII="); + background-repeat: repeat no-repeat; + background-position: center 50px; +} +.wy-breadcrumbs > li { + color: #ccc; +} +.wy-breadcrumbs > li a { + color: #ff9711; + padding: 0; +} +.wy-breadcrumbs > li:first-child a { + color: #597cf1; +} +.wy-nav-content{ + max-width: none; + overflow: auto; + position: relative; + padding: 0 30px; + background-color: #fff; +} + +.wy-nav-content h1 { + font-size: 24px; + color: #2f323a; + margin-bottom: 30px; +} +.wy-nav-content h2 { + font-size: 20px; + color: #2f323a; + margin-bottom: 30px; +} +.wy-nav-content h3 { + font-size: 18px; + color: #2f323a; + margin-bottom: 30px; +} +.wy-nav-content h4 { + font-size: 16px; + color: #2f323a; + margin-bottom: 30px; +} +.wy-nav-content p + h1, +.wy-nav-content p + h2, +.wy-nav-content p + h3, +.wy-nav-content p + h4 { + margin-top: 20px; +} + +.wy-nav-content p{ + color: #2f323a; + margin-bottom: 20px; + font-size: 14px; +} +#search-results h2 { + font-size: 24px; + margin: 20px 0 10px 0; +} +#search-results p { + color: #a7adbd; +} +#search-results ul.search > li { + border-bottom: none; +} +#search-results ul.search > li > a{ + color: #597cf1; +} +.rst-content .highlighted{ + background-color: transparent; + color: #ff9711; + padding: 0; +} diff --git a/doc_theme/static/css/perfect-scrollbar.min.css b/doc_theme/static/css/perfect-scrollbar.min.css new file mode 100644 index 0000000000000..9b880265c068c --- /dev/null +++ b/doc_theme/static/css/perfect-scrollbar.min.css @@ -0,0 +1,2 @@ +/* perfect-scrollbar v0.6.14 */ +.ps-container{-ms-touch-action:auto;touch-action:auto;overflow:hidden !important;-ms-overflow-style:none}@supports (-ms-overflow-style: none){.ps-container{overflow:auto !important}}@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none){.ps-container{overflow:auto !important}}.ps-container.ps-active-x>.ps-scrollbar-x-rail,.ps-container.ps-active-y>.ps-scrollbar-y-rail{display:block;background-color:transparent}.ps-container.ps-in-scrolling.ps-x>.ps-scrollbar-x-rail{background-color:#eee;opacity:.9}.ps-container.ps-in-scrolling.ps-x>.ps-scrollbar-x-rail>.ps-scrollbar-x{background-color:#999;height:11px}.ps-container.ps-in-scrolling.ps-y>.ps-scrollbar-y-rail{background-color:#eee;opacity:.9}.ps-container.ps-in-scrolling.ps-y>.ps-scrollbar-y-rail>.ps-scrollbar-y{background-color:#999;width:11px}.ps-container>.ps-scrollbar-x-rail{display:none;position:absolute;opacity:0;-webkit-transition:background-color .2s linear, opacity .2s linear;-o-transition:background-color .2s linear, opacity .2s linear;-moz-transition:background-color .2s linear, opacity .2s linear;transition:background-color .2s linear, opacity .2s linear;bottom:0px;height:15px}.ps-container>.ps-scrollbar-x-rail>.ps-scrollbar-x{position:absolute;background-color:#aaa;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out;-o-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out;-moz-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -webkit-border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out;bottom:2px;height:6px}.ps-container>.ps-scrollbar-x-rail:hover>.ps-scrollbar-x,.ps-container>.ps-scrollbar-x-rail:active>.ps-scrollbar-x{height:11px}.ps-container>.ps-scrollbar-y-rail{display:none;position:absolute;opacity:0;-webkit-transition:background-color .2s linear, opacity .2s linear;-o-transition:background-color .2s linear, opacity .2s linear;-moz-transition:background-color .2s linear, opacity .2s linear;transition:background-color .2s linear, opacity .2s linear;right:0;width:15px}.ps-container>.ps-scrollbar-y-rail>.ps-scrollbar-y{position:absolute;background-color:#aaa;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out;-o-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out;-moz-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -webkit-border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out;right:2px;width:6px}.ps-container>.ps-scrollbar-y-rail:hover>.ps-scrollbar-y,.ps-container>.ps-scrollbar-y-rail:active>.ps-scrollbar-y{width:11px}.ps-container:hover.ps-in-scrolling.ps-x>.ps-scrollbar-x-rail{background-color:#eee;opacity:.9}.ps-container:hover.ps-in-scrolling.ps-x>.ps-scrollbar-x-rail>.ps-scrollbar-x{background-color:#999;height:11px}.ps-container:hover.ps-in-scrolling.ps-y>.ps-scrollbar-y-rail{background-color:#eee;opacity:.9}.ps-container:hover.ps-in-scrolling.ps-y>.ps-scrollbar-y-rail>.ps-scrollbar-y{background-color:#999;width:11px}.ps-container:hover>.ps-scrollbar-x-rail,.ps-container:hover>.ps-scrollbar-y-rail{opacity:.6}.ps-container:hover>.ps-scrollbar-x-rail:hover{background-color:#eee;opacity:.9}.ps-container:hover>.ps-scrollbar-x-rail:hover>.ps-scrollbar-x{background-color:#999}.ps-container:hover>.ps-scrollbar-y-rail:hover{background-color:#eee;opacity:.9}.ps-container:hover>.ps-scrollbar-y-rail:hover>.ps-scrollbar-y{background-color:#999} diff --git a/doc_theme/static/images/PP_w.png b/doc_theme/static/images/PP_w.png new file mode 100644 index 0000000000000000000000000000000000000000..bc58b0b458135773fcde5ee941ea095e3d4d07a0 GIT binary patch literal 3183 zcmV-#43P7QP)cD;W6Zok*>brWT#zpAeL`rgy0@4fHz zx#ym9y6eo03@{wn19$|OlLf;N8i5mm&wxJwA7{)z#|DnNltR2UumIR9RQCcB=(TAW zJ6r)=4%E5x7T^cKlni+1Xd_4~#4iJ1^VH7-4oSlpH~^UCsW*4e*HZG&(MC|8;@Zve z3oyX`DfkAsET+B=xFiGqIob%)2=SI>+8R>u4bZJjTh9#m=V&8HBgC%&>tfngrr;Z3 zZke`+GvJ@2jUbH>16&(Ze{M>?0OtW8dFtN=CT74tM;k#}A-)(m2WSR91>OLT1b&~A zFUY0V7kCW#1PS#0#M|LH+9}d{Cw%BgHtx0mH}4!9DAHw%JY zz6YERGyxmc$p7jZuglQ}QDSD4uoZcLqP;92Qd zVrHun(vEh0ni#5^>gtBnc>n31F~4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#E?r38YZek+f*G$OrqCK$3RF|#0ef>so;20xrS$w zO$oU=CQ%d_4vgxG4OP{0ATkJsIMVt?WLc47>7vXj%GK~(8K$Xl$mW!l( zqjJ7FUmu2l`P!|tf=0Le(f@q;^Y^=&=f7$^uGP*j!LLWs{j(2C;c4-`w{h$F>73A+ VU)sAH`4`o)wwhbPrx$x?{{S`|L?QqH literal 0 HcmV?d00001 diff --git a/doc_theme/static/js/bootstrap.min.js b/doc_theme/static/js/bootstrap.min.js new file mode 100644 index 0000000000000..9bcd2fccaed94 --- /dev/null +++ b/doc_theme/static/js/bootstrap.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, Inc. + * Licensed under the MIT license + */ +if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.7",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a("#"===f?[]:f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.7",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c).prop(c,!0)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c).prop(c,!1))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target).closest(".btn");b.call(d,"toggle"),a(c.target).is('input[type="radio"], input[type="checkbox"]')||(c.preventDefault(),d.is("input,button")?d.trigger("focus"):d.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(a>this.$items.length-1||a<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.7",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.7",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);if(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),!c.isInStateTrue())return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null,a.$element=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.7",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.7",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.7",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return e=a-d&&"bottom"},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); \ No newline at end of file diff --git a/doc_theme/static/js/paddle_doc_init.js b/doc_theme/static/js/paddle_doc_init.js new file mode 100644 index 0000000000000..a878e652b3298 --- /dev/null +++ b/doc_theme/static/js/paddle_doc_init.js @@ -0,0 +1,30 @@ +$(document).ready(function(){ + $('.local-toc').on('click' ,'a.reference.internal', function (){ + $('.local-toc li.active').removeClass('active'); + $(this).parent('li').addClass('active'); + }); + + + if (!$('.doc-menu-vertical > ul > li.current > ul').length) { + $('.doc-content-wrap').css('margin-left', '-=240px'); + $('.doc-menu-vertical').remove(); + $('.local-toc').css('left', '0'); + } + $('.doc-menu-vertical .toctree-l2').each(function (i, e){ + $(e).toggleClass('has-child', !!$(e).find('ul').length); + }); + if ($('.local-toc a:visible').length) { + $('.doc-content-wrap').css('margin-left', '+=50px'); + $('.local-toc > ul').addClass('nav nav-stacked'); + $('#doc-content').scrollspy({ + target: '.local-toc' + }); + } else { + $('.local-toc').remove(); + } + + $('.doc-menu-vertical').find('li.current').last().addClass('active'); + + $('.doc-menu-vertical').perfectScrollbar(); + $('.local-toc').perfectScrollbar(); +}); diff --git a/doc_theme/static/js/perfect-scrollbar.jquery.min.js b/doc_theme/static/js/perfect-scrollbar.jquery.min.js new file mode 100644 index 0000000000000..8473b2fee9748 --- /dev/null +++ b/doc_theme/static/js/perfect-scrollbar.jquery.min.js @@ -0,0 +1,2 @@ +/* perfect-scrollbar v0.6.14 */ +!function t(e,n,r){function o(i,s){if(!n[i]){if(!e[i]){var a="function"==typeof require&&require;if(!s&&a)return a(i,!0);if(l)return l(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[i]={exports:{}};e[i][0].call(u.exports,function(t){var n=e[i][1][t];return o(n?n:t)},u,u.exports,t,e,n,r)}return n[i].exports}for(var l="function"==typeof require&&require,i=0;i=0&&n.splice(r,1),t.className=n.join(" ")}n.add=function(t,e){t.classList?t.classList.add(e):r(t,e)},n.remove=function(t,e){t.classList?t.classList.remove(e):o(t,e)},n.list=function(t){return t.classList?Array.prototype.slice.apply(t.classList):t.className.split(" ")}},{}],3:[function(t,e,n){"use strict";function r(t,e){return window.getComputedStyle(t)[e]}function o(t,e,n){return"number"==typeof n&&(n=n.toString()+"px"),t.style[e]=n,t}function l(t,e){for(var n in e){var r=e[n];"number"==typeof r&&(r=r.toString()+"px"),t.style[n]=r}return t}var i={};i.e=function(t,e){var n=document.createElement(t);return n.className=e,n},i.appendTo=function(t,e){return e.appendChild(t),t},i.css=function(t,e,n){return"object"==typeof e?l(t,e):"undefined"==typeof n?r(t,e):o(t,e,n)},i.matches=function(t,e){return"undefined"!=typeof t.matches?t.matches(e):"undefined"!=typeof t.matchesSelector?t.matchesSelector(e):"undefined"!=typeof t.webkitMatchesSelector?t.webkitMatchesSelector(e):"undefined"!=typeof t.mozMatchesSelector?t.mozMatchesSelector(e):"undefined"!=typeof t.msMatchesSelector?t.msMatchesSelector(e):void 0},i.remove=function(t){"undefined"!=typeof t.remove?t.remove():t.parentNode&&t.parentNode.removeChild(t)},i.queryChildren=function(t,e){return Array.prototype.filter.call(t.childNodes,function(t){return i.matches(t,e)})},e.exports=i},{}],4:[function(t,e,n){"use strict";var r=function(t){this.element=t,this.events={}};r.prototype.bind=function(t,e){"undefined"==typeof this.events[t]&&(this.events[t]=[]),this.events[t].push(e),this.element.addEventListener(t,e,!1)},r.prototype.unbind=function(t,e){var n="undefined"!=typeof e;this.events[t]=this.events[t].filter(function(r){return!(!n||r===e)||(this.element.removeEventListener(t,r,!1),!1)},this)},r.prototype.unbindAll=function(){for(var t in this.events)this.unbind(t)};var o=function(){this.eventElements=[]};o.prototype.eventElement=function(t){var e=this.eventElements.filter(function(e){return e.element===t})[0];return"undefined"==typeof e&&(e=new r(t),this.eventElements.push(e)),e},o.prototype.bind=function(t,e,n){this.eventElement(t).bind(e,n)},o.prototype.unbind=function(t,e,n){this.eventElement(t).unbind(e,n)},o.prototype.unbindAll=function(){for(var t=0;te.scrollbarYTop?1:-1;i(t,"top",t.scrollTop+s*e.containerHeight),l(t),r.stopPropagation()}),e.event.bind(e.scrollbarX,"click",r),e.event.bind(e.scrollbarXRail,"click",function(r){var o=r.pageX-window.pageXOffset-n(e.scrollbarXRail).left,s=o>e.scrollbarXLeft?1:-1;i(t,"left",t.scrollLeft+s*e.containerWidth),l(t),r.stopPropagation()})}var o=t("../instances"),l=t("../update-geometry"),i=t("../update-scroll");e.exports=function(t){var e=o.get(t);r(t,e)}},{"../instances":18,"../update-geometry":19,"../update-scroll":20}],11:[function(t,e,n){"use strict";function r(t,e){function n(n){var o=r+n*e.railXRatio,i=Math.max(0,e.scrollbarXRail.getBoundingClientRect().left)+e.railXRatio*(e.railXWidth-e.scrollbarXWidth);o<0?e.scrollbarXLeft=0:o>i?e.scrollbarXLeft=i:e.scrollbarXLeft=o;var s=l.toInt(e.scrollbarXLeft*(e.contentWidth-e.containerWidth)/(e.containerWidth-e.railXRatio*e.scrollbarXWidth))-e.negativeScrollAdjustment;c(t,"left",s)}var r=null,o=null,s=function(e){n(e.pageX-o),a(t),e.stopPropagation(),e.preventDefault()},u=function(){l.stopScrolling(t,"x"),e.event.unbind(e.ownerDocument,"mousemove",s)};e.event.bind(e.scrollbarX,"mousedown",function(n){o=n.pageX,r=l.toInt(i.css(e.scrollbarX,"left"))*e.railXRatio,l.startScrolling(t,"x"),e.event.bind(e.ownerDocument,"mousemove",s),e.event.once(e.ownerDocument,"mouseup",u),n.stopPropagation(),n.preventDefault()})}function o(t,e){function n(n){var o=r+n*e.railYRatio,i=Math.max(0,e.scrollbarYRail.getBoundingClientRect().top)+e.railYRatio*(e.railYHeight-e.scrollbarYHeight);o<0?e.scrollbarYTop=0:o>i?e.scrollbarYTop=i:e.scrollbarYTop=o;var s=l.toInt(e.scrollbarYTop*(e.contentHeight-e.containerHeight)/(e.containerHeight-e.railYRatio*e.scrollbarYHeight));c(t,"top",s)}var r=null,o=null,s=function(e){n(e.pageY-o),a(t),e.stopPropagation(),e.preventDefault()},u=function(){l.stopScrolling(t,"y"),e.event.unbind(e.ownerDocument,"mousemove",s)};e.event.bind(e.scrollbarY,"mousedown",function(n){o=n.pageY,r=l.toInt(i.css(e.scrollbarY,"top"))*e.railYRatio,l.startScrolling(t,"y"),e.event.bind(e.ownerDocument,"mousemove",s),e.event.once(e.ownerDocument,"mouseup",u),n.stopPropagation(),n.preventDefault()})}var l=t("../../lib/helper"),i=t("../../lib/dom"),s=t("../instances"),a=t("../update-geometry"),c=t("../update-scroll");e.exports=function(t){var e=s.get(t);r(t,e),o(t,e)}},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],12:[function(t,e,n){"use strict";function r(t,e){function n(n,r){var o=t.scrollTop;if(0===n){if(!e.scrollbarYActive)return!1;if(0===o&&r>0||o>=e.contentHeight-e.containerHeight&&r<0)return!e.settings.wheelPropagation}var l=t.scrollLeft;if(0===r){if(!e.scrollbarXActive)return!1;if(0===l&&n<0||l>=e.contentWidth-e.containerWidth&&n>0)return!e.settings.wheelPropagation}return!0}var r=!1;e.event.bind(t,"mouseenter",function(){r=!0}),e.event.bind(t,"mouseleave",function(){r=!1});var i=!1;e.event.bind(e.ownerDocument,"keydown",function(c){if(!(c.isDefaultPrevented&&c.isDefaultPrevented()||c.defaultPrevented)){var u=l.matches(e.scrollbarX,":focus")||l.matches(e.scrollbarY,":focus");if(r||u){var d=document.activeElement?document.activeElement:e.ownerDocument.activeElement;if(d){if("IFRAME"===d.tagName)d=d.contentDocument.activeElement;else for(;d.shadowRoot;)d=d.shadowRoot.activeElement;if(o.isEditable(d))return}var p=0,f=0;switch(c.which){case 37:p=c.metaKey?-e.contentWidth:c.altKey?-e.containerWidth:-30;break;case 38:f=c.metaKey?e.contentHeight:c.altKey?e.containerHeight:30;break;case 39:p=c.metaKey?e.contentWidth:c.altKey?e.containerWidth:30;break;case 40:f=c.metaKey?-e.contentHeight:c.altKey?-e.containerHeight:-30;break;case 33:f=90;break;case 32:f=c.shiftKey?90:-90;break;case 34:f=-90;break;case 35:f=c.ctrlKey?-e.contentHeight:-e.containerHeight;break;case 36:f=c.ctrlKey?t.scrollTop:e.containerHeight;break;default:return}a(t,"top",t.scrollTop-f),a(t,"left",t.scrollLeft+p),s(t),i=n(p,f),i&&c.preventDefault()}}})}var o=t("../../lib/helper"),l=t("../../lib/dom"),i=t("../instances"),s=t("../update-geometry"),a=t("../update-scroll");e.exports=function(t){var e=i.get(t);r(t,e)}},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],13:[function(t,e,n){"use strict";function r(t,e){function n(n,r){var o=t.scrollTop;if(0===n){if(!e.scrollbarYActive)return!1;if(0===o&&r>0||o>=e.contentHeight-e.containerHeight&&r<0)return!e.settings.wheelPropagation}var l=t.scrollLeft;if(0===r){if(!e.scrollbarXActive)return!1;if(0===l&&n<0||l>=e.contentWidth-e.containerWidth&&n>0)return!e.settings.wheelPropagation}return!0}function r(t){var e=t.deltaX,n=-1*t.deltaY;return"undefined"!=typeof e&&"undefined"!=typeof n||(e=-1*t.wheelDeltaX/6,n=t.wheelDeltaY/6),t.deltaMode&&1===t.deltaMode&&(e*=10,n*=10),e!==e&&n!==n&&(e=0,n=t.wheelDelta),t.shiftKey?[-n,-e]:[e,n]}function o(e,n){var r=t.querySelector("textarea:hover, select[multiple]:hover, .ps-child:hover");if(r){if(!window.getComputedStyle(r).overflow.match(/(scroll|auto)/))return!1;var o=r.scrollHeight-r.clientHeight;if(o>0&&!(0===r.scrollTop&&n>0||r.scrollTop===o&&n<0))return!0;var l=r.scrollLeft-r.clientWidth;if(l>0&&!(0===r.scrollLeft&&e<0||r.scrollLeft===l&&e>0))return!0}return!1}function s(s){var c=r(s),u=c[0],d=c[1];o(u,d)||(a=!1,e.settings.useBothWheelAxes?e.scrollbarYActive&&!e.scrollbarXActive?(d?i(t,"top",t.scrollTop-d*e.settings.wheelSpeed):i(t,"top",t.scrollTop+u*e.settings.wheelSpeed),a=!0):e.scrollbarXActive&&!e.scrollbarYActive&&(u?i(t,"left",t.scrollLeft+u*e.settings.wheelSpeed):i(t,"left",t.scrollLeft-d*e.settings.wheelSpeed),a=!0):(i(t,"top",t.scrollTop-d*e.settings.wheelSpeed),i(t,"left",t.scrollLeft+u*e.settings.wheelSpeed)),l(t),a=a||n(u,d),a&&(s.stopPropagation(),s.preventDefault()))}var a=!1;"undefined"!=typeof window.onwheel?e.event.bind(t,"wheel",s):"undefined"!=typeof window.onmousewheel&&e.event.bind(t,"mousewheel",s)}var o=t("../instances"),l=t("../update-geometry"),i=t("../update-scroll");e.exports=function(t){var e=o.get(t);r(t,e)}},{"../instances":18,"../update-geometry":19,"../update-scroll":20}],14:[function(t,e,n){"use strict";function r(t,e){e.event.bind(t,"scroll",function(){l(t)})}var o=t("../instances"),l=t("../update-geometry");e.exports=function(t){var e=o.get(t);r(t,e)}},{"../instances":18,"../update-geometry":19}],15:[function(t,e,n){"use strict";function r(t,e){function n(){var t=window.getSelection?window.getSelection():document.getSelection?document.getSelection():"";return 0===t.toString().length?null:t.getRangeAt(0).commonAncestorContainer}function r(){c||(c=setInterval(function(){return l.get(t)?(s(t,"top",t.scrollTop+u.top),s(t,"left",t.scrollLeft+u.left),void i(t)):void clearInterval(c)},50))}function a(){c&&(clearInterval(c),c=null),o.stopScrolling(t)}var c=null,u={top:0,left:0},d=!1;e.event.bind(e.ownerDocument,"selectionchange",function(){t.contains(n())?d=!0:(d=!1,a())}),e.event.bind(window,"mouseup",function(){d&&(d=!1,a())}),e.event.bind(window,"keyup",function(){d&&(d=!1,a())}),e.event.bind(window,"mousemove",function(e){if(d){var n={x:e.pageX,y:e.pageY},l={left:t.offsetLeft,right:t.offsetLeft+t.offsetWidth,top:t.offsetTop,bottom:t.offsetTop+t.offsetHeight};n.xl.right-3?(u.left=5,o.startScrolling(t,"x")):u.left=0,n.yl.bottom-3?(n.y-l.bottom+3<5?u.top=5:u.top=20,o.startScrolling(t,"y")):u.top=0,0===u.top&&0===u.left?a():r()}})}var o=t("../../lib/helper"),l=t("../instances"),i=t("../update-geometry"),s=t("../update-scroll");e.exports=function(t){var e=l.get(t);r(t,e)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],16:[function(t,e,n){"use strict";function r(t,e,n,r){function o(n,r){var o=t.scrollTop,l=t.scrollLeft,i=Math.abs(n),s=Math.abs(r);if(s>i){if(r<0&&o===e.contentHeight-e.containerHeight||r>0&&0===o)return!e.settings.swipePropagation}else if(i>s&&(n<0&&l===e.contentWidth-e.containerWidth||n>0&&0===l))return!e.settings.swipePropagation;return!0}function a(e,n){s(t,"top",t.scrollTop-n),s(t,"left",t.scrollLeft-e),i(t)}function c(){w=!0}function u(){w=!1}function d(t){return t.targetTouches?t.targetTouches[0]:t}function p(t){return!(!t.targetTouches||1!==t.targetTouches.length)||!(!t.pointerType||"mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE)}function f(t){if(p(t)){Y=!0;var e=d(t);g.pageX=e.pageX,g.pageY=e.pageY,v=(new Date).getTime(),null!==y&&clearInterval(y),t.stopPropagation()}}function h(t){if(!Y&&e.settings.swipePropagation&&f(t),!w&&Y&&p(t)){var n=d(t),r={pageX:n.pageX,pageY:n.pageY},l=r.pageX-g.pageX,i=r.pageY-g.pageY;a(l,i),g=r;var s=(new Date).getTime(),c=s-v;c>0&&(m.x=l/c,m.y=i/c,v=s),o(l,i)&&(t.stopPropagation(),t.preventDefault())}}function b(){!w&&Y&&(Y=!1,clearInterval(y),y=setInterval(function(){return l.get(t)&&(m.x||m.y)?Math.abs(m.x)<.01&&Math.abs(m.y)<.01?void clearInterval(y):(a(30*m.x,30*m.y),m.x*=.8,void(m.y*=.8)):void clearInterval(y)},10))}var g={},v=0,m={},y=null,w=!1,Y=!1;n&&(e.event.bind(window,"touchstart",c),e.event.bind(window,"touchend",u),e.event.bind(t,"touchstart",f),e.event.bind(t,"touchmove",h),e.event.bind(t,"touchend",b)),r&&(window.PointerEvent?(e.event.bind(window,"pointerdown",c),e.event.bind(window,"pointerup",u),e.event.bind(t,"pointerdown",f),e.event.bind(t,"pointermove",h),e.event.bind(t,"pointerup",b)):window.MSPointerEvent&&(e.event.bind(window,"MSPointerDown",c),e.event.bind(window,"MSPointerUp",u),e.event.bind(t,"MSPointerDown",f),e.event.bind(t,"MSPointerMove",h),e.event.bind(t,"MSPointerUp",b)))}var o=t("../../lib/helper"),l=t("../instances"),i=t("../update-geometry"),s=t("../update-scroll");e.exports=function(t){if(o.env.supportsTouch||o.env.supportsIePointer){var e=l.get(t);r(t,e,o.env.supportsTouch,o.env.supportsIePointer)}}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],17:[function(t,e,n){"use strict";var r=t("../lib/helper"),o=t("../lib/class"),l=t("./instances"),i=t("./update-geometry"),s={"click-rail":t("./handler/click-rail"),"drag-scrollbar":t("./handler/drag-scrollbar"),keyboard:t("./handler/keyboard"),wheel:t("./handler/mouse-wheel"),touch:t("./handler/touch"),selection:t("./handler/selection")},a=t("./handler/native-scroll");e.exports=function(t,e){e="object"==typeof e?e:{},o.add(t,"ps-container");var n=l.add(t);n.settings=r.extend(n.settings,e),o.add(t,"ps-theme-"+n.settings.theme),n.settings.handlers.forEach(function(e){s[e](t)}),a(t),i(t)}},{"../lib/class":2,"../lib/helper":6,"./handler/click-rail":10,"./handler/drag-scrollbar":11,"./handler/keyboard":12,"./handler/mouse-wheel":13,"./handler/native-scroll":14,"./handler/selection":15,"./handler/touch":16,"./instances":18,"./update-geometry":19}],18:[function(t,e,n){"use strict";function r(t){function e(){a.add(t,"ps-focus")}function n(){a.remove(t,"ps-focus")}var r=this;r.settings=s.clone(c),r.containerWidth=null,r.containerHeight=null,r.contentWidth=null,r.contentHeight=null,r.isRtl="rtl"===u.css(t,"direction"),r.isNegativeScroll=function(){var e=t.scrollLeft,n=null;return t.scrollLeft=-1,n=t.scrollLeft<0,t.scrollLeft=e,n}(),r.negativeScrollAdjustment=r.isNegativeScroll?t.scrollWidth-t.clientWidth:0,r.event=new d,r.ownerDocument=t.ownerDocument||document,r.scrollbarXRail=u.appendTo(u.e("div","ps-scrollbar-x-rail"),t),r.scrollbarX=u.appendTo(u.e("div","ps-scrollbar-x"),r.scrollbarXRail),r.scrollbarX.setAttribute("tabindex",0),r.event.bind(r.scrollbarX,"focus",e),r.event.bind(r.scrollbarX,"blur",n),r.scrollbarXActive=null,r.scrollbarXWidth=null,r.scrollbarXLeft=null,r.scrollbarXBottom=s.toInt(u.css(r.scrollbarXRail,"bottom")),r.isScrollbarXUsingBottom=r.scrollbarXBottom===r.scrollbarXBottom,r.scrollbarXTop=r.isScrollbarXUsingBottom?null:s.toInt(u.css(r.scrollbarXRail,"top")),r.railBorderXWidth=s.toInt(u.css(r.scrollbarXRail,"borderLeftWidth"))+s.toInt(u.css(r.scrollbarXRail,"borderRightWidth")),u.css(r.scrollbarXRail,"display","block"),r.railXMarginWidth=s.toInt(u.css(r.scrollbarXRail,"marginLeft"))+s.toInt(u.css(r.scrollbarXRail,"marginRight")),u.css(r.scrollbarXRail,"display",""),r.railXWidth=null,r.railXRatio=null,r.scrollbarYRail=u.appendTo(u.e("div","ps-scrollbar-y-rail"),t),r.scrollbarY=u.appendTo(u.e("div","ps-scrollbar-y"),r.scrollbarYRail),r.scrollbarY.setAttribute("tabindex",0),r.event.bind(r.scrollbarY,"focus",e),r.event.bind(r.scrollbarY,"blur",n),r.scrollbarYActive=null,r.scrollbarYHeight=null,r.scrollbarYTop=null,r.scrollbarYRight=s.toInt(u.css(r.scrollbarYRail,"right")),r.isScrollbarYUsingRight=r.scrollbarYRight===r.scrollbarYRight,r.scrollbarYLeft=r.isScrollbarYUsingRight?null:s.toInt(u.css(r.scrollbarYRail,"left")),r.scrollbarYOuterWidth=r.isRtl?s.outerWidth(r.scrollbarY):null,r.railBorderYWidth=s.toInt(u.css(r.scrollbarYRail,"borderTopWidth"))+s.toInt(u.css(r.scrollbarYRail,"borderBottomWidth")),u.css(r.scrollbarYRail,"display","block"),r.railYMarginHeight=s.toInt(u.css(r.scrollbarYRail,"marginTop"))+s.toInt(u.css(r.scrollbarYRail,"marginBottom")),u.css(r.scrollbarYRail,"display",""),r.railYHeight=null,r.railYRatio=null}function o(t){return t.getAttribute("data-ps-id")}function l(t,e){t.setAttribute("data-ps-id",e)}function i(t){t.removeAttribute("data-ps-id")}var s=t("../lib/helper"),a=t("../lib/class"),c=t("./default-setting"),u=t("../lib/dom"),d=t("../lib/event-manager"),p=t("../lib/guid"),f={};n.add=function(t){var e=p();return l(t,e),f[e]=new r(t),f[e]},n.remove=function(t){delete f[o(t)],i(t)},n.get=function(t){return f[o(t)]}},{"../lib/class":2,"../lib/dom":3,"../lib/event-manager":4,"../lib/guid":5,"../lib/helper":6,"./default-setting":8}],19:[function(t,e,n){"use strict";function r(t,e){return t.settings.minScrollbarLength&&(e=Math.max(e,t.settings.minScrollbarLength)),t.settings.maxScrollbarLength&&(e=Math.min(e,t.settings.maxScrollbarLength)),e}function o(t,e){var n={width:e.railXWidth};e.isRtl?n.left=e.negativeScrollAdjustment+t.scrollLeft+e.containerWidth-e.contentWidth:n.left=t.scrollLeft,e.isScrollbarXUsingBottom?n.bottom=e.scrollbarXBottom-t.scrollTop:n.top=e.scrollbarXTop+t.scrollTop,s.css(e.scrollbarXRail,n);var r={top:t.scrollTop,height:e.railYHeight};e.isScrollbarYUsingRight?e.isRtl?r.right=e.contentWidth-(e.negativeScrollAdjustment+t.scrollLeft)-e.scrollbarYRight-e.scrollbarYOuterWidth:r.right=e.scrollbarYRight-t.scrollLeft:e.isRtl?r.left=e.negativeScrollAdjustment+t.scrollLeft+2*e.containerWidth-e.contentWidth-e.scrollbarYLeft-e.scrollbarYOuterWidth:r.left=e.scrollbarYLeft+t.scrollLeft,s.css(e.scrollbarYRail,r),s.css(e.scrollbarX,{left:e.scrollbarXLeft,width:e.scrollbarXWidth-e.railBorderXWidth}),s.css(e.scrollbarY,{top:e.scrollbarYTop,height:e.scrollbarYHeight-e.railBorderYWidth})}var l=t("../lib/helper"),i=t("../lib/class"),s=t("../lib/dom"),a=t("./instances"),c=t("./update-scroll");e.exports=function(t){var e=a.get(t);e.containerWidth=t.clientWidth,e.containerHeight=t.clientHeight,e.contentWidth=t.scrollWidth,e.contentHeight=t.scrollHeight;var n;t.contains(e.scrollbarXRail)||(n=s.queryChildren(t,".ps-scrollbar-x-rail"),n.length>0&&n.forEach(function(t){s.remove(t)}),s.appendTo(e.scrollbarXRail,t)),t.contains(e.scrollbarYRail)||(n=s.queryChildren(t,".ps-scrollbar-y-rail"),n.length>0&&n.forEach(function(t){s.remove(t)}),s.appendTo(e.scrollbarYRail,t)),!e.settings.suppressScrollX&&e.containerWidth+e.settings.scrollXMarginOffset=e.railXWidth-e.scrollbarXWidth&&(e.scrollbarXLeft=e.railXWidth-e.scrollbarXWidth),e.scrollbarYTop>=e.railYHeight-e.scrollbarYHeight&&(e.scrollbarYTop=e.railYHeight-e.scrollbarYHeight),o(t,e),e.scrollbarXActive?i.add(t,"ps-active-x"):(i.remove(t,"ps-active-x"),e.scrollbarXWidth=0,e.scrollbarXLeft=0,c(t,"left",0)),e.scrollbarYActive?i.add(t,"ps-active-y"):(i.remove(t,"ps-active-y"),e.scrollbarYHeight=0,e.scrollbarYTop=0,c(t,"top",0))}},{"../lib/class":2,"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-scroll":20}],20:[function(t,e,n){"use strict";var r,o,l=t("./instances"),i=function(t){var e=document.createEvent("Event");return e.initEvent(t,!0,!0),e};e.exports=function(t,e,n){if("undefined"==typeof t)throw"You must provide an element to the update-scroll function";if("undefined"==typeof e)throw"You must provide an axis to the update-scroll function";if("undefined"==typeof n)throw"You must provide a value to the update-scroll function";"top"===e&&n<=0&&(t.scrollTop=n=0,t.dispatchEvent(i("ps-y-reach-start"))),"left"===e&&n<=0&&(t.scrollLeft=n=0,t.dispatchEvent(i("ps-x-reach-start")));var s=l.get(t);"top"===e&&n>=s.contentHeight-s.containerHeight&&(n=s.contentHeight-s.containerHeight,n-t.scrollTop<=1?n=t.scrollTop:t.scrollTop=n,t.dispatchEvent(i("ps-y-reach-end"))),"left"===e&&n>=s.contentWidth-s.containerWidth&&(n=s.contentWidth-s.containerWidth,n-t.scrollLeft<=1?n=t.scrollLeft:t.scrollLeft=n,t.dispatchEvent(i("ps-x-reach-end"))),r||(r=t.scrollTop),o||(o=t.scrollLeft),"top"===e&&nr&&t.dispatchEvent(i("ps-scroll-down")),"left"===e&&no&&t.dispatchEvent(i("ps-scroll-right")),"top"===e&&(t.scrollTop=r=n,t.dispatchEvent(i("ps-scroll-y"))),"left"===e&&(t.scrollLeft=o=n,t.dispatchEvent(i("ps-scroll-x")))}},{"./instances":18}],21:[function(t,e,n){"use strict";var r=t("../lib/helper"),o=t("../lib/dom"),l=t("./instances"),i=t("./update-geometry"),s=t("./update-scroll");e.exports=function(t){var e=l.get(t);e&&(e.negativeScrollAdjustment=e.isNegativeScroll?t.scrollWidth-t.clientWidth:0,o.css(e.scrollbarXRail,"display","block"),o.css(e.scrollbarYRail,"display","block"),e.railXMarginWidth=r.toInt(o.css(e.scrollbarXRail,"marginLeft"))+r.toInt(o.css(e.scrollbarXRail,"marginRight")),e.railYMarginHeight=r.toInt(o.css(e.scrollbarYRail,"marginTop"))+r.toInt(o.css(e.scrollbarYRail,"marginBottom")),o.css(e.scrollbarXRail,"display","none"),o.css(e.scrollbarYRail,"display","none"),i(t),s(t,"top",t.scrollTop),s(t,"left",t.scrollLeft),o.css(e.scrollbarXRail,"display",""),o.css(e.scrollbarYRail,"display",""))}},{"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-geometry":19,"./update-scroll":20}]},{},[1]); \ No newline at end of file diff --git a/doc_theme/static/js/scrollspy.js b/doc_theme/static/js/scrollspy.js new file mode 100644 index 0000000000000..748fda5a5d194 --- /dev/null +++ b/doc_theme/static/js/scrollspy.js @@ -0,0 +1,225 @@ +/** + * Extend jquery with a scrollspy plugin. + * This watches the window scroll and fires events when elements are scrolled into viewport. + * + * throttle() and getTime() taken from Underscore.js + * https://github.com/jashkenas/underscore + * + * @author Copyright 2013 John Smart + * @license https://raw.github.com/thesmart/jquery-scrollspy/master/LICENSE + * @see https://github.com/thesmart + * @version 0.1.2 + */ +(function($) { + + var jWindow = $(window); + var elements = []; + var elementsInView = []; + var isSpying = false; + var ticks = 0; + var offset = { + top : 0, + right : 0, + bottom : 0, + left : 0, + } + + /** + * Find elements that are within the boundary + * @param {number} top + * @param {number} right + * @param {number} bottom + * @param {number} left + * @return {jQuery} A collection of elements + */ + function findElements(top, right, bottom, left) { + var hits = $(); + $.each(elements, function(i, element) { + var elTop = element.offset().top, + elLeft = element.offset().left, + elRight = elLeft + element.width(), + elBottom = elTop + element.height(); + + var isIntersect = !(elLeft > right || + elRight < left || + elTop > bottom || + elBottom < top); + + if (isIntersect) { + hits.push(element); + } + }); + + return hits; + } + + /** + * Called when the user scrolls the window + */ + function onScroll() { + // unique tick id + ++ticks; + + // viewport rectangle + var top = jWindow.scrollTop(), + left = jWindow.scrollLeft(), + right = left + jWindow.width(), + bottom = top + jWindow.height(); + + // determine which elements are in view + var intersections = findElements(top+offset.top, right+offset.right, bottom+offset.bottom, left+offset.left); + $.each(intersections, function(i, element) { + var lastTick = element.data('scrollSpy:ticks'); + if (typeof lastTick != 'number') { + // entered into view + element.triggerHandler('scrollSpy:enter'); + } + + // update tick id + element.data('scrollSpy:ticks', ticks); + }); + + // determine which elements are no longer in view + $.each(elementsInView, function(i, element) { + var lastTick = element.data('scrollSpy:ticks'); + if (typeof lastTick == 'number' && lastTick !== ticks) { + // exited from view + element.triggerHandler('scrollSpy:exit'); + element.data('scrollSpy:ticks', null); + } + }); + + // remember elements in view for next tick + elementsInView = intersections; + } + + /** + * Called when window is resized + */ + function onWinSize() { + jWindow.trigger('scrollSpy:winSize'); + } + + /** + * Get time in ms + * @license https://raw.github.com/jashkenas/underscore/master/LICENSE + * @type {function} + * @return {number} + */ + var getTime = (Date.now || function () { + return new Date().getTime(); + }); + + /** + * Returns a function, that, when invoked, will only be triggered at most once + * during a given window of time. Normally, the throttled function will run + * as much as it can, without ever going more than once per `wait` duration; + * but if you'd like to disable the execution on the leading edge, pass + * `{leading: false}`. To disable execution on the trailing edge, ditto. + * @license https://raw.github.com/jashkenas/underscore/master/LICENSE + * @param {function} func + * @param {number} wait + * @param {Object=} options + * @returns {Function} + */ + function throttle(func, wait, options) { + var context, args, result; + var timeout = null; + var previous = 0; + options || (options = {}); + var later = function () { + previous = options.leading === false ? 0 : getTime(); + timeout = null; + result = func.apply(context, args); + context = args = null; + }; + return function () { + var now = getTime(); + if (!previous && options.leading === false) previous = now; + var remaining = wait - (now - previous); + context = this; + args = arguments; + if (remaining <= 0) { + clearTimeout(timeout); + timeout = null; + previous = now; + result = func.apply(context, args); + context = args = null; + } else if (!timeout && options.trailing !== false) { + timeout = setTimeout(later, remaining); + } + return result; + }; + }; + + /** + * Enables ScrollSpy using a selector + * @param {jQuery|string} selector The elements collection, or a selector + * @param {Object=} options Optional. + throttle : number -> scrollspy throttling. Default: 100 ms + offsetTop : number -> offset from top. Default: 0 + offsetRight : number -> offset from right. Default: 0 + offsetBottom : number -> offset from bottom. Default: 0 + offsetLeft : number -> offset from left. Default: 0 + * @returns {jQuery} + */ + $.scrollSpy = function(selector, options) { + selector = $(selector); + selector.each(function(i, element) { + elements.push($(element)); + }); + options = options || { + throttle: 100 + }; + + offset.top = options.offsetTop || 0; + offset.right = options.offsetRight || 0; + offset.bottom = options.offsetBottom || 0; + offset.left = options.offsetLeft || 0; + + var throttledScroll = throttle(onScroll, options.throttle || 100); + var readyScroll = function(){ + $(document).ready(throttledScroll); + }; + + if (!isSpying) { + jWindow.on('scroll', readyScroll); + jWindow.on('resize', readyScroll); + isSpying = true; + } + + // perform a scan once, after current execution context, and after dom is ready + setTimeout(readyScroll, 0); + + return selector; + }; + + /** + * Listen for window resize events + * @param {Object=} options Optional. Set { throttle: number } to change throttling. Default: 100 ms + * @returns {jQuery} $(window) + */ + $.winSizeSpy = function(options) { + $.winSizeSpy = function() { return jWindow; }; // lock from multiple calls + options = options || { + throttle: 100 + }; + return jWindow.on('resize', throttle(onWinSize, options.throttle || 100)); + }; + + /** + * Enables ScrollSpy on a collection of elements + * e.g. $('.scrollSpy').scrollSpy() + * @param {Object=} options Optional. + throttle : number -> scrollspy throttling. Default: 100 ms + offsetTop : number -> offset from top. Default: 0 + offsetRight : number -> offset from right. Default: 0 + offsetBottom : number -> offset from bottom. Default: 0 + offsetLeft : number -> offset from left. Default: 0 + * @returns {jQuery} + */ + $.fn.scrollSpy = function(options) { + return $.scrollSpy($(this), options); + }; + +})(jQuery); \ No newline at end of file diff --git a/doc_theme/templates/breadcrumbs.html b/doc_theme/templates/breadcrumbs.html new file mode 100644 index 0000000000000..22f773a8e975d --- /dev/null +++ b/doc_theme/templates/breadcrumbs.html @@ -0,0 +1,24 @@ +{# Support for Sphinx 1.3+ page_source_suffix, but don't break old builds. #} + +{% if page_source_suffix %} +{% set suffix = page_source_suffix %} +{% else %} +{% set suffix = source_suffix %} +{% endif %} + +{% if meta is defined and 'github_url' in meta %} +{% set display_github = True %} +{% endif %} + +{% if meta is defined and 'bitbucket_url' in meta %} +{% set display_bitbucket = True %} +{% endif %} + +
+
    + {% for doc in parents %} +
  • {{ doc.title }} >
  • + {% endfor %} +
  • {{ title }}
  • +
+
diff --git a/doc_theme/templates/layout.html b/doc_theme/templates/layout.html new file mode 100644 index 0000000000000..9a27c34177841 --- /dev/null +++ b/doc_theme/templates/layout.html @@ -0,0 +1,191 @@ +{# TEMPLATE VAR SETTINGS #} +{%- set url_root = pathto('', 1) %} +{%- if url_root == '#' %}{% set url_root = '' %}{% endif %} +{%- if not embedded and docstitle %} + {%- set titlesuffix = " — "|safe + docstitle|e %} +{%- else %} + {%- set titlesuffix = "" %} +{%- endif %} + + + + + + + {{ metatags }} + + {% block htmltitle %} + {{ title|striptags|e }}{{ titlesuffix }} + {% endblock %} + + {# FAVICON #} + {% if favicon %} + + {% endif %} + + {# CSS #} + + {# OPENSEARCH #} + {% if not embedded %} + {% if use_opensearch %} + + {% endif %} + + {% endif %} + + {# RTD hosts this file, so just load on non RTD builds #} + {% if not READTHEDOCS %} + + {% endif %} + + {% for cssfile in css_files %} + + {% endfor %} + {% for cssfile in extra_css_files %} + + {% endfor %} + + {%- block linktags %} + {%- if hasdoc('about') %} + + {%- endif %} + {%- if hasdoc('genindex') %} + + {%- endif %} + {%- if hasdoc('search') %} + + {%- endif %} + {%- if hasdoc('copyright') %} + + {%- endif %} + + {%- if parents %} + + {%- endif %} + {%- if next %} + + {%- endif %} + {%- if prev %} + + {%- endif %} + {%- endblock %} + {%- block extrahead %} + + + + + + {% endblock %} + + {# Keep modernizr in head - http://modernizr.com/docs/#installing #} + + + + + + + {% block extrabody %} + + {% endblock %} +
+ + {# SIDE NAV, TOGGLES ON MOBILE #} + + {% if toc %} + + {% endif %} +
+ + {% include "breadcrumbs.html" %} + {# PAGE CONTENT #} +
+
+
+
+ {% block body %}{% endblock %} +
+
+ {% include "footer.html" %} +
+
+ +
+ +
+ {% include "versions.html" %} + + {% if not embedded %} + + + {%- for scriptfile in script_files %} + + {%- endfor %} + + {% endif %} + + {# RTD hosts this file, so just load on non RTD builds #} + {% if not READTHEDOCS %} + + {% endif %} + + + + + {%- block footer %} {% endblock %} + + + diff --git a/doc_theme/templates/search.html b/doc_theme/templates/search.html new file mode 100644 index 0000000000000..171ab915988db --- /dev/null +++ b/doc_theme/templates/search.html @@ -0,0 +1,52 @@ +{# + basic/search.html + ~~~~~~~~~~~~~~~~~ + + Template for the search page. + + :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. + :license: BSD, see LICENSE for details. +#} +{%- extends "layout.html" %} +{% set title = _('Search') %} +{% set script_files = script_files + ['_static/searchtools.js'] %} +{% block footer %} + + {# this is used when loading the search index using $.ajax fails, + such as on Chrome for documents on localhost #} + + {{ super() }} +{% endblock %} +{% block body %} + + + {% if search_performed %} +

{{ _('Search Results') }}

+ {% if not search_results %} +

{{ _('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.') }}

+ {% endif %} + {% endif %} +
+ {% if search_results %} +
    + {% for href, caption, context in search_results %} +
  • + {{ caption }} +

    {{ context|e }}

    +
  • + {% endfor %} +
+ {% endif %} +
+{% endblock %} diff --git a/paddle/scripts/tools/build_docs/Dockerfile b/paddle/scripts/tools/build_docs/Dockerfile index 5db0b29c47399..506b13210ba1e 100644 --- a/paddle/scripts/tools/build_docs/Dockerfile +++ b/paddle/scripts/tools/build_docs/Dockerfile @@ -1,6 +1,7 @@ FROM paddledev/paddle:cpu-devel-latest COPY build.sh / RUN pip install sphinx &&\ + pip install sphinx_rtd_theme &&\ apt install -y doxygen graphviz &&\ pip install breathe recommonmark numpy protobuf==2.6.1 CMD /build.sh From eae2699449fb8dc13d0bb006096d962bcb866f91 Mon Sep 17 00:00:00 2001 From: Shi-Liang <385936547@qq.com> Date: Fri, 2 Dec 2016 16:13:36 +0800 Subject: [PATCH 10/18] style tuning --- doc_theme/static/css/override.css | 74 +++++++++++++++---------------- 1 file changed, 35 insertions(+), 39 deletions(-) diff --git a/doc_theme/static/css/override.css b/doc_theme/static/css/override.css index 3b81de758de21..e6cd877a9cb3f 100644 --- a/doc_theme/static/css/override.css +++ b/doc_theme/static/css/override.css @@ -28,19 +28,19 @@ a, a:focus, a:hover, a:visited { background-color: #2f323a; padding: 0 30px; } -.site-header .site-logo{ +.site-header .site-logo { line-height: 80px; width: 290px; flex: 0 1 290px; } -.site-header .site-logo > a{ +.site-header .site-logo > a { display: inline-block; width: 230px; } -.site-header .site-nav-links{ +.site-header .site-nav-links { flex: 0 1 100%; } -.site-header .site-nav-links .site-menu{ +.site-header .site-nav-links .site-menu { height: 30px; line-height: 30px; font-size: 12px; @@ -56,11 +56,11 @@ a, a:focus, a:hover, a:visited { float: right; margin-right: 20px; } -.site-header .site-nav-links .site-menu .site-page-links> li{ +.site-header .site-nav-links .site-menu .site-page-links> li { display: inline-block; float: left; } -.site-header .site-nav-links .site-menu .site-page-links > li > a{ +.site-header .site-nav-links .site-menu .site-page-links > li > a { color: #a7adbd; display: inline-block; height: 30px; @@ -68,14 +68,14 @@ a, a:focus, a:hover, a:visited { font-size: 12px; } .site-header .site-nav-links .site-menu .site-page-links > li:hover > a, -.site-header .site-nav-links .site-menu .site-page-links > li.active > a{ +.site-header .site-nav-links .site-menu .site-page-links > li.active > a { background-color: #2f323a; color: #bcc1d0; } -.site-header .site-nav-links .site-menu .site-page-links > li.active > a{ +.site-header .site-nav-links .site-menu .site-page-links > li.active > a { font-weight: bold; } -.site-header .site-nav-links .site-menu .fork-on-github{ +.site-header .site-nav-links .site-menu .fork-on-github { color: #597cf1; line-height: 30px; display: inline-block; @@ -88,7 +88,7 @@ a, a:focus, a:hover, a:visited { font-size: 16px; vertical-align: middle; } -.site-header .site-nav-links .site-menu .language-switcher{ +.site-header .site-nav-links .site-menu .language-switcher { height: 30px; display: inline-block; float: right; @@ -96,30 +96,30 @@ a, a:focus, a:hover, a:visited { padding: 0 20px; position: relative; } -.site-header .site-nav-links .site-menu .language-switcher > a{ +.site-header .site-nav-links .site-menu .language-switcher > a { color: #a7adbd; } -.site-header .site-nav-links .site-menu .language-switcher.open > a{ +.site-header .site-nav-links .site-menu .language-switcher.open > a { background-color: #24272f; color: #bcc1d0; } -.site-header .site-nav-links .site-menu .language-switcher .fa{ +.site-header .site-nav-links .site-menu .language-switcher .fa { margin-left: 5px; } -.site-header .site-nav-links .site-menu .language-switcher .fa-angle-down{ +.site-header .site-nav-links .site-menu .language-switcher .fa-angle-down { display: inline; } -.site-header .site-nav-links .site-menu .language-switcher.open .fa-angle-down{ +.site-header .site-nav-links .site-menu .language-switcher.open .fa-angle-down { display: none; } -.site-header .site-nav-links .site-menu .language-switcher .fa-angle-up{ +.site-header .site-nav-links .site-menu .language-switcher .fa-angle-up { display: none; } -.site-header .site-nav-links .site-menu .language-switcher.open .fa-angle-up{ +.site-header .site-nav-links .site-menu .language-switcher.open .fa-angle-up { display: inline; } .site-header .site-nav-links .site-menu .fork-on-github:before, -.site-header .site-nav-links .site-menu .language-switcher:before{ +.site-header .site-nav-links .site-menu .language-switcher:before { width: 1px; height: 12px; top: 9px; @@ -129,7 +129,7 @@ a, a:focus, a:hover, a:visited { position: absolute; content: ""; } -.site-header .site-nav-links .site-menu .language-switcher .dropdown-menu{ +.site-header .site-nav-links .site-menu .language-switcher .dropdown-menu { display: none; position: absolute; box-shadow: #ccc 0 0 5px; @@ -142,19 +142,19 @@ a, a:focus, a:hover, a:visited { line-height: 30px; padding: 0 20px; } -.site-header .site-nav-links .site-menu .language-switcher .dropdown-menu > li:hover{ +.site-header .site-nav-links .site-menu .language-switcher .dropdown-menu > li:hover { background-color: #f7f8fe; } -.site-header .site-nav-links .site-menu .language-switcher .dropdown-menu > li + li{ +.site-header .site-nav-links .site-menu .language-switcher .dropdown-menu > li + li { border-top: 1px solid #dedfe5; } -.site-header .site-nav-links .site-menu .language-switcher .dropdown-menu > li > a{ +.site-header .site-nav-links .site-menu .language-switcher .dropdown-menu > li > a { color: #2f323a; } -.site-header .site-nav-links .site-menu .language-switcher.open .dropdown-menu{ +.site-header .site-nav-links .site-menu .language-switcher.open .dropdown-menu { display: inline-block; } -.site-header .site-nav-links .doc-module{ +.site-header .site-nav-links .doc-module { display: block; height: 50px; line-height: 50px; @@ -182,7 +182,7 @@ a, a:focus, a:hover, a:visited { .site-header .site-nav-links .doc-module [role="search"]{ float: right; } -.site-header .site-nav-links .doc-module [role="search"] input{ +.site-header .site-nav-links .doc-module [role="search"] input { background-color: #3a3d47; border-radius: 15px; color: #a7adbd; @@ -198,14 +198,14 @@ a, a:focus, a:hover, a:visited { background-position: 145px center; background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFWBUiwCwMIAoKxAIi4EwK4BgFm2MkcCgL0FAHaOWJAPQGAAgJlCLMwAIDgCAEMeE80DIEwDoDDSv+CpX3CFuEgBAMDLlc2XS9IzFLiV0Bp38vDg4iHiwmyxQmEXKRBmCeQinJebIxNI5wNMzgwAABr50cH+OD+Q5+bk4eZm52zv9MWi/mvwbyI+IfHf/ryMAgQAEE7P79pf5eXWA3DHAbB1v2upWwDaVgBo3/ldM9sJoFoK0Hr5i3k4/EAenqFQyDwdHAoLC+0lYqG9MOOLPv8z4W/gi372/EAe/tt68ABxmkCZrcCjg/1xYW52rlKO58sEQjFu9+cj/seFf/2OKdHiNLFcLBWK8ViJuFAiTcd5uVKRRCHJleIS6X8y8R+W/QmT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c7yfE/pSGTPwMABBFCGflm+rsAAAAASUVORK5CYII="); } -.site-header .site-nav-links .doc-module [role="search"] input:focus{ +.site-header .site-nav-links .doc-module [role="search"] input:focus { width: 300px; } -.site-header .site-nav-links .doc-module [role="search"] input:focus{ +.site-header .site-nav-links .doc-module [role="search"] input:focus { background-position: 265px center; } .site-header .site-nav-links .doc-module [role="search"] input:hover, -.site-header .site-nav-links .doc-module [role="search"] input:focus{ +.site-header .site-nav-links .doc-module [role="search"] input:focus { color: #fff; border-color: #597cf1; background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFWBUiwCwMIAoKxAIi4EwK4BgFm2MkcCgL0FAHaOWJAPQGAAgJlCLMwAIDgCAEMeE80DIEwDoDDSv+CpX3CFuEgBAMDLlc2XS9IzFLiV0Bp38vDg4iHiwmyxQmEXKRBmCeQinJebIxNI5wNMzgwAABr50cH+OD+Q5+bk4eZm52zv9MWi/mvwbyI+IfHf/ryMAgQAEE7P79pf5eXWA3DHAbB1v2upWwDaVgBo3/ldM9sJoFoK0Hr5i3k4/EAenqFQyDwdHAoLC+0lYqG9MOOLPv8z4W/gi372/EAe/tt68ABxmkCZrcCjg/1xYW52rlKO58sEQjFu9+cj/seFf/2OKdHiNLFcLBWK8ViJuFAiTcd5u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HOMkGAnasZKBFCTM+oi1LLvYRG+mkzz/UwYy8zMAmkpBg3fGpFUAAAAASUVORK5CYII="); @@ -238,7 +238,7 @@ a, a:focus, a:hover, a:visited { .doc-menu-vertical > ul.current > li.toctree-l1.current > a { display: none; } -.doc-menu-vertical .toctree-l2 a{ +.doc-menu-vertical .toctree-l2 a { width: 100%; overflow: hidden; text-overflow: ellipsis; @@ -275,7 +275,7 @@ a, a:focus, a:hover, a:visited { height: 0; overflow: hidden; } -.doc-menu-vertical .toctree-l2.current > a + ul{ +.doc-menu-vertical .toctree-l2.current > a + ul { border-bottom: 1px solid #dddfe3; height: auto; } @@ -283,7 +283,6 @@ a, a:focus, a:hover, a:visited { background-color: #597cf1; color: #fff; } - .doc-menu-vertical .toctree-l3 > a { font-size: 12px; color: #2f323a; @@ -291,7 +290,6 @@ a, a:focus, a:hover, a:visited { line-height: 40px; display: block; } - .doc-menu-vertical .toctree-l4 > a { font-size: 12px; color: #64697b; @@ -325,7 +323,7 @@ a, a:focus, a:hover, a:visited { top: 0; z-index: -1; } -.local-toc:hover a{ +.local-toc:hover a { width: auto; } .local-toc > ul > li a { @@ -357,7 +355,7 @@ a, a:focus, a:hover, a:visited { .local-toc > ul > li > ul li a:hover{ background-color: #e6eaf7 !important; } -.local-toc > ul > li > ul li a:hover:after{ +.local-toc > ul > li > ul li a:hover:after { background-color: #e6eaf7 !important; } .local-toc > ul > li > ul li.active > a { @@ -384,7 +382,7 @@ a, a:focus, a:hover, a:visited { .local-toc > ul > li > ul > li > a { color: #64697b; } -.local-toc > ul > li > ul > li > a + ul{ +.local-toc > ul > li > ul > li > a + ul { display: none; } .local-toc > ul > li > ul > li > a:before { @@ -433,7 +431,7 @@ a, a:focus, a:hover, a:visited { padding: 30px; height: 60px; } -.wy-breadcrumbs{ +.wy-breadcrumbs { line-height: 50px; height: 60px; background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAUCAYAAABMDlehAAAAGXRFWHRTb2Z0d2F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hMzAiIHN0UmVmOmRvY3VtZW50SUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDozZGVmZmY0OS1mNjA4LTExNzktYTRlZC1kZjJiNGY3N2YwNzMiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7FGmP1AAAAKUlEQVR42mK4/+DpfwY9Q0tBJgYGhv8g4h8uFoKLEGOAc9FYSARAgAEAUgMQYBNmQ7sAAAAASUVORK5CYII="); @@ -457,7 +455,6 @@ a, a:focus, a:hover, a:visited { padding: 0 30px; background-color: #fff; } - .wy-nav-content h1 { font-size: 24px; color: #2f323a; @@ -484,7 +481,6 @@ a, a:focus, a:hover, a:visited { .wy-nav-content p + h4 { margin-top: 20px; } - .wy-nav-content p{ color: #2f323a; margin-bottom: 20px; @@ -500,7 +496,7 @@ a, a:focus, a:hover, a:visited { #search-results ul.search > li { border-bottom: none; } -#search-results ul.search > li > a{ +#search-results ul.search > li > a { color: #597cf1; } .rst-content .highlighted{ From 2d777f0bf506f21a6d9b1d5a854b3bc308d80369 Mon Sep 17 00:00:00 2001 From: wangyanfei01 Date: Mon, 5 Dec 2016 13:25:43 +0800 Subject: [PATCH 11/18] fix word spelling error in detail_introduction.md --- doc/howto/cmd_parameter/detail_introduction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/howto/cmd_parameter/detail_introduction.md b/doc/howto/cmd_parameter/detail_introduction.md index 823a2266191b5..28fc5870d20e7 100644 --- a/doc/howto/cmd_parameter/detail_introduction.md +++ b/doc/howto/cmd_parameter/detail_introduction.md @@ -31,7 +31,7 @@ - type: string (default: null). * `--version` - - Whether to print version infomatrion. + - Whether to print version information. - type: bool (default: 0). * `--show_layer_stat` From ad59085a893c366ef6a9c51d7b91ba94dd9d0c32 Mon Sep 17 00:00:00 2001 From: Shi-Liang <385936547@qq.com> Date: Mon, 5 Dec 2016 13:33:08 +0800 Subject: [PATCH 12/18] 1. theme related static resources 2. add unit test library 3. remove useless comments 4. use js & css libs on the CDN --- .travis.yml | 2 +- doc/conf.py.in | 7 +- doc_cn/conf.py.in | 8 +- doc_theme/static/css/override.css | 506 +++++++++++++++++++++++++ doc_theme/static/images/PP_w.png | Bin 0 -> 3183 bytes doc_theme/static/js/paddle_doc_init.js | 31 ++ doc_theme/templates/breadcrumbs.html | 24 ++ doc_theme/templates/layout.html | 191 ++++++++++ doc_theme/templates/search.html | 52 +++ 9 files changed, 812 insertions(+), 9 deletions(-) create mode 100644 doc_theme/static/css/override.css create mode 100644 doc_theme/static/images/PP_w.png create mode 100644 doc_theme/static/js/paddle_doc_init.js create mode 100644 doc_theme/templates/breadcrumbs.html create mode 100644 doc_theme/templates/layout.html create mode 100644 doc_theme/templates/search.html diff --git a/.travis.yml b/.travis.yml index effcf90769647..6215060e336c7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,7 +50,7 @@ before_install: fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo paddle/scripts/travis/before_install.linux.sh; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then paddle/scripts/travis/before_install.osx.sh; fi - - pip install wheel protobuf sphinx breathe recommonmark virtualenv numpy + - pip install wheel protobuf sphinx breathe recommonmark virtualenv numpy sphinx_rtd_theme script: - paddle/scripts/travis/main.sh notifications: diff --git a/doc/conf.py.in b/doc/conf.py.in index 3d3bb9e8d5e40..5fb307e3a9b57 100644 --- a/doc/conf.py.in +++ b/doc/conf.py.in @@ -23,7 +23,7 @@ AutoStructify = transform.AutoStructify # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, '@PROJ_ROOT@/python') -templates_path = ["@PROJ_ROOT@/doc/templates"] +templates_path = ["@PROJ_ROOT@/doc_theme/templates"] # -- General configuration ------------------------------------------------ @@ -113,13 +113,12 @@ todo_include_todos = False # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -#html_theme = 'sphinx_rtd_theme' -html_theme = 'classic' +html_theme = 'sphinx_rtd_theme' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +html_static_path = ['@PROJ_ROOT@/doc_theme/static'] # Output file base name for HTML help builder. htmlhelp_basename = project + 'doc' diff --git a/doc_cn/conf.py.in b/doc_cn/conf.py.in index 93242ace40600..421e0c298d443 100644 --- a/doc_cn/conf.py.in +++ b/doc_cn/conf.py.in @@ -22,7 +22,7 @@ AutoStructify = transform.AutoStructify # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, '@PROJ_ROOT@/python') -templates_path = ["@PROJ_ROOT@/doc/templates"] +templates_path = ["@PROJ_ROOT@/doc_theme/templates"] # -- General configuration ------------------------------------------------ @@ -112,12 +112,12 @@ todo_include_todos = False # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -#html_theme = 'sphinx_rtd_theme' # sphinx_rtd_theme will cause table bad style -html_theme = 'classic' +html_theme = 'sphinx_rtd_theme' + # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +html_static_path = ['@PROJ_ROOT@/doc_theme/static'] # Output file base name for HTML help builder. htmlhelp_basename = project + 'doc' diff --git a/doc_theme/static/css/override.css b/doc_theme/static/css/override.css new file mode 100644 index 0000000000000..438a87848a017 --- /dev/null +++ b/doc_theme/static/css/override.css @@ -0,0 +1,506 @@ +body { + padding-top: 80px; + background-image: none !important; + font-family: Roboto; +} +a, a:focus, a:hover, a:visited { + color: #597cf1; +} +.site-header { + position: fixed; + top: 0; + width: 100%; + left: 0; + z-index: 99; + background: #333; + height: 80px; + display: -webkit-flex; + display: -ms-flex; + display: -o-flex; + display: flex; + flex-flow: row nowrap; + justify-content: space-between; + box-shadow: #ccc 0 3px 3px; +} +.site-header > div { + height: 80px; + display: inline-block; + background-color: #2f323a; + padding: 0 30px; +} +.site-header .site-logo { + line-height: 80px; + width: 290px; + flex: 0 1 290px; +} +.site-header .site-logo > a { + display: inline-block; + width: 230px; +} +.site-header .site-nav-links { + flex: 0 1 100%; +} +.site-header .site-nav-links .site-menu { + height: 30px; + line-height: 30px; + font-size: 12px; + background: -webkit-linear-gradient(#282b33, #2f323a); + background: -o-linear-gradient(#282b33, #2f323a); + background: -moz-linear-gradient(#282b33, #2f323a); + background: linear-gradient(to left, #282b33, #2f323a); + margin-right: -30px; + padding-right: 30px; +} +.site-header .site-nav-links .site-menu .site-page-links { + display: inline-block; + float: right; + margin-right: 20px; +} +.site-header .site-nav-links .site-menu .site-page-links> li { + display: inline-block; + float: left; +} +.site-header .site-nav-links .site-menu .site-page-links > li > a { + color: #a7adbd; + display: inline-block; + height: 30px; + padding: 0 20px; + font-size: 12px; +} +.site-header .site-nav-links .site-menu .site-page-links > li:hover > a, +.site-header .site-nav-links .site-menu .site-page-links > li.active > a { + background-color: #2f323a; + color: #bcc1d0; +} +.site-header .site-nav-links .site-menu .site-page-links > li.active > a { + font-weight: bold; +} +.site-header .site-nav-links .site-menu .fork-on-github { + color: #597cf1; + line-height: 30px; + display: inline-block; + padding: 0 0 0 20px; + float: right; + position: relative; +} +.site-header .site-nav-links .site-menu .fork-on-github .fa { + margin-right: 5px; + font-size: 16px; + vertical-align: middle; +} +.site-header .site-nav-links .site-menu .language-switcher { + height: 30px; + display: inline-block; + float: right; + line-height: 30px; + padding: 0 20px; + position: relative; +} +.site-header .site-nav-links .site-menu .language-switcher > a { + color: #a7adbd; +} +.site-header .site-nav-links .site-menu .language-switcher.open > a { + background-color: #24272f; + color: #bcc1d0; +} +.site-header .site-nav-links .site-menu .language-switcher .fa { + margin-left: 5px; +} +.site-header .site-nav-links .site-menu .language-switcher .fa-angle-down { + display: inline; +} +.site-header .site-nav-links .site-menu .language-switcher.open .fa-angle-down { + display: none; +} +.site-header .site-nav-links .site-menu .language-switcher .fa-angle-up { + display: none; +} +.site-header .site-nav-links .site-menu .language-switcher.open .fa-angle-up { + display: inline; +} +.site-header .site-nav-links .site-menu .fork-on-github:before, +.site-header .site-nav-links .site-menu .language-switcher:before { + width: 1px; + height: 12px; + top: 9px; + background-color: #3a3d47; + left: 0; + display: inline-block; + position: absolute; + content: ""; +} +.site-header .site-nav-links .site-menu .language-switcher .dropdown-menu { + display: none; + position: absolute; + box-shadow: #ccc 0 0 5px; + background-color: #fff; + width: 100%; + left: 0; + top: 30px; +} +.site-header .site-nav-links .site-menu .language-switcher .dropdown-menu > li { + line-height: 30px; + padding: 0 20px; +} +.site-header .site-nav-links .site-menu .language-switcher .dropdown-menu > li:hover { + background-color: #f7f8fe; +} +.site-header .site-nav-links .site-menu .language-switcher .dropdown-menu > li + li { + border-top: 1px solid #dedfe5; +} +.site-header .site-nav-links .site-menu .language-switcher .dropdown-menu > li > a { + color: #2f323a; +} +.site-header .site-nav-links .site-menu .language-switcher.open .dropdown-menu { + display: inline-block; +} +.site-header .site-nav-links .doc-module { + display: block; + height: 50px; + line-height: 50px; +} +.site-header .site-nav-links .doc-module > ul > li { + display: inline-block; + float: left; +} +.site-header .site-nav-links .doc-module > ul > li > a { + color: #c9cbd0; + font-size: 14px; + display: inline-block; + height: 50px; + line-height: 50px; + border-bottom: 2px solid transparent; + padding: 0 20px; +} +.site-header .site-nav-links .doc-module > ul > li:hover > a { + color: #fff; +} +.site-header .site-nav-links .doc-module > ul > li.current > a { + border-bottom-color: #fff; + color: #fff; +} +.site-header .site-nav-links .doc-module [role="search"]{ + float: right; +} +.site-header .site-nav-links .doc-module [role="search"] input { + background-color: #3a3d47; + border-radius: 15px; + color: #a7adbd; + border: 1px solid transparent; + padding: 6px 15px; + width: 180px; + box-shadow: none; + transition: all .2s; + -webkit-transition: all .2s; + -moz-transition: all .2s; + -o-transition: all .2s; + background-repeat: no-repeat; + background-position: 145px center; + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYA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PPnj8XdO5Mt1/3yfPe549d8Lxw9CL3Ytslt0utPa49R35w/eFIr1tv62X3y+1XPK509E3rO9Hv03/6asDVc9f41y5dn3m978bsG7duJt0cuCW69fh29u0XdwruTNxdeo94r/y+2v3qB/oP6n+0/rFlwG3g+GDAYM/DWQ/vDgmHnv6U/9OH4dJHzEfVI0YjjY+dHx8bDRq98mTOk+GnsqcTz8p+Vv9563Or59/94vtLz1j82PAL+YvPv655qfNy76uprzrHI8cfvM55PfGm/K3O233vuO+638e9H5ko/ED+UPPR+mPHp9BP9z7nfP78L/eE8/sl0p8zAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAEpSURBVHjanNO7K8dhFMfx1w8LBqVM5DLxF7hMTGSQpAwmJSkDizAZLSb5Ayi3clsMFgwWISGXkoSyGYRSym15fvr27duvH5/leTqd8+6c83ye1NLatohqMIgWVOEV+5jDAr7ElBO5j+IIH+hBJRqwjDHsoTQOyAvnCPpRi4tYziVmMY2dkPMc7aAG42hPKE7rAwMBNhEfYQgzOJNZ3xhGL4qigGasyk43OEdjFFCGe9nrNtT8Al5Q8AdAMd6jgFPU/QFwiN0oYD4sJzdLwBiuo4A5vGEKqQyF1ahPcuInOsJrrKMiwWx9OMAWWpOc+BD2MImr4Ik7FIb4AzqRH6zdhU1IxT4TlKAJ5XjCMU6CkaANi2lIXsKsj1jJsIsNdKc7yfE/pSGTPwMABBFCGflm+rsAAAAASUVORK5CYII="); +} +.site-header .site-nav-links .doc-module [role="search"] input:focus { + width: 300px; +} +.site-header .site-nav-links .doc-module [role="search"] input:focus { + background-position: 265px center; +} +.site-header .site-nav-links .doc-module [role="search"] input:hover, +.site-header .site-nav-links .doc-module [role="search"] input:focus { + color: #fff; + border-color: #597cf1; + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAKTWlDQ1BQaG90b3Nob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1XPK509E3rO9Hv03/6asDVc9f41y5dn3m978bsG7duJt0cuCW69fh29u0XdwruTNxdeo94r/y+2v3qB/oP6n+0/rFlwG3g+GDAYM/DWQ/vDgmHnv6U/9OH4dJHzEfVI0YjjY+dHx8bDRq98mTOk+GnsqcTz8p+Vv9563Or59/94vtLz1j82PAL+YvPv655qfNy76uprzrHI8cfvM55PfGm/K3O233vuO+638e9H5ko/ED+UPPR+mPHp9BP9z7nfP78L/eE8/sl0p8zAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAEpSURBVHjanNO9K4ZhFMfxz4MFg1Im8jJ5/gIvExMZJCnFpCRlYBEGGS0m+QMoLwOyGCwyWISEvJQklM0glFLeluvR3d3d08Nvua5O53w751y/K9Uz+SyiNIbRihq8Yh+LWMaXmPIi93Ec4QN9qEYjVjGBPZTHAQXhHMMg6nARy7nEAuawE3Keox2kMYWOhOKMPjAUYNPxEUYwjzPZ9Y1R9KMkCmjButx0g3M0RQEVuJe7bkPNL+AFRX8AlOI9CjhF/R8Ah9iNApbCcvJzBEzgOgpYxBtmkcpSWIuGJCd+ojO8xgaqEsw2gANsoy3JiQ9hDzO4Cp64Q3GIP6ALhcHa3diCVOwzQRmaUYknHOMkGAnasZKBFCTM+oi1LLvYRG+mkzz/UwYy8zMAmkpBg3fGpFUAAAAASUVORK5CYII="); +} +.doc-menu-vertical { + display: inline-block; + float: left; + width: 240px; + height: 100%; + background-color: #ecedee; + position: absolute; + left: 0; + top: 0; + overflow: hidden; + padding: 0; + border-right: 1px solid #dddfe3; +} +.doc-menu-vertical > ul { + display: none; +} +.doc-menu-vertical > ul.current{ + display: block; +} +.doc-menu-vertical > ul.current > li.toctree-l1 { + display: none; +} +.doc-menu-vertical > ul.current > li.toctree-l1.current { + display: block; +} +.doc-menu-vertical > ul.current > li.toctree-l1.current > a { + display: none; +} +.doc-menu-vertical .toctree-l2 a { + width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + padding-right: 30px; +} +.doc-menu-vertical .toctree-l2 > a { + font-size: 14px; + color: #2f323a; + padding-left: 30px; + line-height: 50px; + display: block; + font-weight: bold; + border-bottom: 1px solid #dddfe3; +} +.doc-menu-vertical .toctree-l2.has-child > a:after { + font-family: "FontAwesome"; + display: inline-block; + font-style: normal; + font-weight: normal; + text-decoration: inherit; + content: ""; + float: right; + line-height: 50px; + color: #a7adbd; + position: absolute; + right: 15px; +} +.doc-menu-vertical .toctree-l2.has-child.current > a:after { + content: ""; +} +.doc-menu-vertical .toctree-l2 > a + ul{ + background-color: #e4e6e9; + height: 0; + overflow: hidden; +} +.doc-menu-vertical .toctree-l2.current > a + ul { + border-bottom: 1px solid #dddfe3; + height: auto; +} +.doc-menu-vertical .toctree-l2 li.active > a { + background-color: #597cf1; + color: #fff; +} +.doc-menu-vertical .toctree-l3 > a { + font-size: 12px; + color: #2f323a; + padding-left: 30px; + line-height: 40px; + display: block; +} +.doc-menu-vertical .toctree-l4 > a { + font-size: 12px; + color: #64697b; + padding-left: 50px; + line-height: 30px; + display: block; +} +.doc-menu-vertical .toctree-l5 > a { + font-size: 14px; + color: #ccc; + padding-left: 40px; + display: block; +} +.local-toc { + position: absolute; + height: 100%; + background-color: #f6f7f8; + top: 0; + left: 240px; + padding: 0; + z-index: 9; +} +.local-toc:after { + content: ""; + position: absolute; + height: 100%; + width: 1px; + display: inline-block; + right: 0; + background-color: #dddfe3; + top: 0; + z-index: -1; +} +.local-toc:hover a { + width: auto; +} +.local-toc > ul > li a { + position: relative; + font-size: 12px; + overflow: hidden; + display: none; +} +.local-toc > ul > li > ul > li a { + display: block; + border-top: 1px solid transparent; + border-bottom: 1px solid transparent; + padding-right: 20px; + width: 50px; +} +.local-toc > ul > li > ul > li > ul > li > ul a { + display: none; +} +.local-toc > ul > li > ul li > a:after { + content: ""; + display: inline-block; + width: 1px; + height: 100%; + background-color: transparent; + position: absolute; + right: 0; + top: 0; +} +.local-toc > ul > li > ul li a:hover{ + background-color: #e6eaf7 !important; +} +.local-toc > ul > li > ul li a:hover:after { + background-color: #e6eaf7 !important; +} +.local-toc > ul > li > ul li.active > a { + color: #ff9711; + background-color: #fff; + border-top: 1px solid #dddfe3; + border-bottom: 1px solid #dddfe3; +} +.local-toc > ul > li > ul li.active > a:before { + background-color: #ff9711; + width: 10px; + height: 10px; + margin: 15px 20px; + border-radius: 5px; +} +.local-toc > ul > li > ul li.active > a:after { + background-color: #fff; +} +.local-toc > ul > li > ul > li { + position: relative; + line-height: 40px; + white-space: nowrap; +} +.local-toc > ul > li > ul > li > a { + color: #64697b; +} +.local-toc > ul > li > ul > li > a + ul { + display: none; +} +.local-toc > ul > li > ul > li > a:before { + display: inline-block; + content: ""; + width: 6px; + height: 6px; + background-color: #ccc; + border-radius: 3px; + margin: 17px 22px; + float: left; +} +.local-toc > ul > li > ul > li > ul > li > a { + color: #a7adbd; +} +.local-toc > ul > li > ul > li > ul > li > a:before { + display: inline-block; + content: ""; + width: 6px; + height: 6px; + background-color: #ccc; + border-radius: 3px; + margin: 17px 22px; + float: left; +} +.main-content-wrap { + position: absolute; + width: 100%; + top: 80px; + bottom: 0; + overflow: auto; + background-color: #f6f7f8; +} +.doc-content-wrap { + margin-left: 290px; + height: 100%; + position: relative; + padding-top: 60px; + background-color: #fff; +} +.doc-content-wrap > div[role='navigation'] { + position: absolute; + top: 0; + width: 100%; + left: 0; + padding: 0 30px; + height: 60px; +} +.wy-breadcrumbs { + line-height: 50px; + height: 60px; + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAUCAYAAABMDlehAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0Y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Q9InIiPz7FGmP1AAAAKUlEQVR42mK4/+DpfwY9Q0tBJgYGhv8g4h8uFoKLEGOAc9FYSARAgAEAUgMQYBNmQ7sAAAAASUVORK5CYII="); + background-repeat: repeat no-repeat; + background-position: center 50px; +} +.wy-breadcrumbs > li { + color: #ccc; +} +.wy-breadcrumbs > li a { + color: #ff9711; + padding: 0; +} +.wy-breadcrumbs > li:first-child a { + color: #597cf1; +} +.wy-nav-content{ + max-width: none; + overflow: auto; + position: relative; + padding: 30px; + background-color: #fff; +} +.wy-nav-content h1 { + font-size: 24px; + color: #2f323a; + margin-bottom: 30px; +} +.wy-nav-content h2 { + font-size: 20px; + color: #2f323a; + margin-bottom: 30px; +} +.wy-nav-content h3 { + font-size: 18px; + color: #2f323a; + margin-bottom: 30px; +} +.wy-nav-content h4 { + font-size: 16px; + color: #2f323a; + margin-bottom: 30px; +} +.wy-nav-content p + h1, +.wy-nav-content p + h2, +.wy-nav-content p + h3, +.wy-nav-content p + h4 { + margin-top: 20px; +} +.wy-nav-content p{ + color: #2f323a; + margin-bottom: 20px; + font-size: 14px; +} +#search-results h2 { + font-size: 24px; + margin: 20px 0 10px 0; +} +#search-results p { + color: #a7adbd; +} +#search-results ul.search > li { + border-bottom: none; +} +#search-results ul.search > li > a { + color: #597cf1; +} +.rst-content .highlighted{ + background-color: transparent; + color: #ff9711; + padding: 0; +} diff --git a/doc_theme/static/images/PP_w.png b/doc_theme/static/images/PP_w.png new file mode 100644 index 0000000000000000000000000000000000000000..bc58b0b458135773fcde5ee941ea095e3d4d07a0 GIT binary patch literal 3183 zcmV-#43P7QP)cD;W6Zok*>brWT#zpAeL`rgy0@4fHz zx#ym9y6eo03@{wn19$|OlLf;N8i5mm&wxJwA7{)z#|DnNltR2UumIR9RQCcB=(TAW zJ6r)=4%E5x7T^cKlni+1Xd_4~#4iJ1^VH7-4oSlpH~^UCsW*4e*HZG&(MC|8;@Zve z3oyX`DfkAsET+B=xFiGqIob%)2=SI>+8R>u4bZJjTh9#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%qjT`kj ze+T)*SE1<947Bt99NA>Q3eg60;7ddGArOdq3J***2p*!Vfv3vQMfWAAqyKdsS}|5f z+Q*`Yq8W|xQO9E)`tHY1LbSmcl8m`y0-8z)?sq2gb$byO;wcnzbZ-QHiH!G)(9*gP z30S`f4?~)(R$PykjbTXJN0W|bxqIH^`VroYM*C6;%h9S4hZ9_R29-Bk!OF9B!h5ek zTCykbR>Et-c-xiB&}JtomXU1CWAK0HBaFaoN;2lvNC9n0?Qi4+V_rax(x-el@>LF@G}-8lxPjG(?ymIZK}Vy9 zfi@iGp>3d46P2S+l72eFm8W}n2iPu)!QYE)gH7>U3(c9!Q3$VtOpPAVl_xs!s{h=oJUlh-q zlA5Byj@x6#HqVunf*n0W{V>Nr96Wh9L|ZP{5k7V^x#j`{TVV`g7h4B2 zo9Ur#F(qG_RStIaH@WlzEVJU^$y}dzVjXg(Ux)0OaTIHno)p|YAE1p=Idnox%?Amd zJW!lJ(1MR3*U<{}{Z!A8D@@ z$Q^krva6#@?1|`wfg_OjV-a$7EeDQ^@Scve(2`JHGs^QAjZD4mkw$+LExq@IXzy_2 zeX+urpFyk1#Ynp^cm22-eI8**gvXt(A7>$N#XHDFIStL*st|1p(xT&#_U?>UyBm>- zIhtZSJm_eXtW#Li*X@c?YcRg?yg&lN`93`k#h}R<5TY&z^4bt6DUNx?u;LfS1 zuvF#9QG&Ez0BWZA1KTT6XfsI|wi3or8mSpiF3dS1NGrrgqbOb&@1pp97N47XgVMzN z^GN2N$#tf@pn?c8V;%#WoTNRv1kvOq>=EBPV|t zb;ymCG~An`jUx*oegS{N`dIuao7G|jrAaHDP=qKek4TOU7+HSW^;uw-NL?#R ul').addClass('nav nav-stacked'); + $('#doc-content').scrollspy({ + target: '.local-toc' + }); + $('.local-toc').perfectScrollbar(); + } else { + $('.doc-content-wrap').css('margin-left', '-=50px'); + $('.local-toc').remove(); + } + + if (!$('.doc-menu-vertical > ul > li.current > ul').length) { + $('.doc-content-wrap').css('margin-left', '-=240px'); + $('.doc-menu-vertical').remove(); + $('.local-toc').css('left', '0'); + } + + $('.doc-menu-vertical .toctree-l2').each(function (i, e){ + $(e).toggleClass('has-child', !!$(e).find('ul').length); + }); + + $('.doc-menu-vertical').find('li.current').last().addClass('active'); + + $('.doc-menu-vertical').perfectScrollbar(); +}); diff --git a/doc_theme/templates/breadcrumbs.html b/doc_theme/templates/breadcrumbs.html new file mode 100644 index 0000000000000..22f773a8e975d --- /dev/null +++ b/doc_theme/templates/breadcrumbs.html @@ -0,0 +1,24 @@ +{# Support for Sphinx 1.3+ page_source_suffix, but don't break old builds. #} + +{% if page_source_suffix %} +{% set suffix = page_source_suffix %} +{% else %} +{% set suffix = source_suffix %} +{% endif %} + +{% if meta is defined and 'github_url' in meta %} +{% set display_github = True %} +{% endif %} + +{% if meta is defined and 'bitbucket_url' in meta %} +{% set display_bitbucket = True %} +{% endif %} + +
+
    + {% for doc in parents %} +
  • {{ doc.title }} >
  • + {% endfor %} +
  • {{ title }}
  • +
+
diff --git a/doc_theme/templates/layout.html b/doc_theme/templates/layout.html new file mode 100644 index 0000000000000..034740369ed10 --- /dev/null +++ b/doc_theme/templates/layout.html @@ -0,0 +1,191 @@ +{# TEMPLATE VAR SETTINGS #} +{%- set url_root = pathto('', 1) %} +{%- if url_root == '#' %}{% set url_root = '' %}{% endif %} +{%- if not embedded and docstitle %} + {%- set titlesuffix = " — "|safe + docstitle|e %} +{%- else %} + {%- set titlesuffix = "" %} +{%- endif %} + + + + + + + {{ metatags }} + + {% block htmltitle %} + {{ title|striptags|e }}{{ titlesuffix }} + {% endblock %} + + {# FAVICON #} + {% if favicon %} + + {% endif %} + + {# CSS #} + + {# OPENSEARCH #} + {% if not embedded %} + {% if use_opensearch %} + + {% endif %} + + {% endif %} + + {# RTD hosts this file, so just load on non RTD builds #} + {% if not READTHEDOCS %} + + {% endif %} + + {% for cssfile in css_files %} + + {% endfor %} + {% for cssfile in extra_css_files %} + + {% endfor %} + + {%- block linktags %} + {%- if hasdoc('about') %} + + {%- endif %} + {%- if hasdoc('genindex') %} + + {%- endif %} + {%- if hasdoc('search') %} + + {%- endif %} + {%- if hasdoc('copyright') %} + + {%- endif %} + + {%- if parents %} + + {%- endif %} + {%- if next %} + + {%- endif %} + {%- if prev %} + + {%- endif %} + {%- endblock %} + {%- block extrahead %} + + + + + + {% endblock %} + + {# Keep modernizr in head - http://modernizr.com/docs/#installing #} + + + + + + + {% block extrabody %} + + {% endblock %} +
+ + {# SIDE NAV, TOGGLES ON MOBILE #} + + {% if toc %} + + {% endif %} +
+ + {% include "breadcrumbs.html" %} + {# PAGE CONTENT #} +
+
+
+
+ {% block body %}{% endblock %} +
+
+ {% include "footer.html" %} +
+
+ +
+ +
+ {% include "versions.html" %} + + {% if not embedded %} + + + {%- for scriptfile in script_files %} + + {%- endfor %} + + {% endif %} + + {# RTD hosts this file, so just load on non RTD builds #} + {% if not READTHEDOCS %} + + {% endif %} + + + + + {%- block footer %} {% endblock %} + + + diff --git a/doc_theme/templates/search.html b/doc_theme/templates/search.html new file mode 100644 index 0000000000000..171ab915988db --- /dev/null +++ b/doc_theme/templates/search.html @@ -0,0 +1,52 @@ +{# + basic/search.html + ~~~~~~~~~~~~~~~~~ + + Template for the search page. + + :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. + :license: BSD, see LICENSE for details. +#} +{%- extends "layout.html" %} +{% set title = _('Search') %} +{% set script_files = script_files + ['_static/searchtools.js'] %} +{% block footer %} + + {# this is used when loading the search index using $.ajax fails, + such as on Chrome for documents on localhost #} + + {{ super() }} +{% endblock %} +{% block body %} + + + {% if search_performed %} +

{{ _('Search Results') }}

+ {% if not search_results %} +

{{ _('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.') }}

+ {% endif %} + {% endif %} +
+ {% if search_results %} +
    + {% for href, caption, context in search_results %} +
  • + {{ caption }} +

    {{ context|e }}

    +
  • + {% endfor %} +
+ {% endif %} +
+{% endblock %} From 290ee32f2d36e4ce328113fcf862ef7bf4c558af Mon Sep 17 00:00:00 2001 From: wangyanfei01 Date: Mon, 5 Dec 2016 14:38:35 +0800 Subject: [PATCH 13/18] fix confliction --- paddle/trainer/Trainer.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/paddle/trainer/Trainer.cpp b/paddle/trainer/Trainer.cpp index 6ba5d99f5aa3b..2ffc3e18d96ad 100644 --- a/paddle/trainer/Trainer.cpp +++ b/paddle/trainer/Trainer.cpp @@ -39,7 +39,6 @@ limitations under the License. */ #include "TrainerConfigHelper.h" P_DEFINE_string(config, "", "Trainer config file"); -<<<<<<< HEAD P_DEFINE_int32(test_period, 0, "if equal 0, do test on all test data at the end of " From ff0b521e5bbf442928d859d1a8a002a304fdb226 Mon Sep 17 00:00:00 2001 From: wangyanfei01 Date: Mon, 5 Dec 2016 15:02:38 +0800 Subject: [PATCH 14/18] add execute property by default for some top scripts --- demo/image_classification/predict.sh | 0 demo/semantic_role_labeling/predict.sh | 0 demo/semantic_role_labeling/test.sh | 0 demo/semantic_role_labeling/train.sh | 0 4 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 demo/image_classification/predict.sh mode change 100644 => 100755 demo/semantic_role_labeling/predict.sh mode change 100644 => 100755 demo/semantic_role_labeling/test.sh mode change 100644 => 100755 demo/semantic_role_labeling/train.sh diff --git a/demo/image_classification/predict.sh b/demo/image_classification/predict.sh old mode 100644 new mode 100755 diff --git a/demo/semantic_role_labeling/predict.sh b/demo/semantic_role_labeling/predict.sh old mode 100644 new mode 100755 diff --git a/demo/semantic_role_labeling/test.sh b/demo/semantic_role_labeling/test.sh old mode 100644 new mode 100755 diff --git a/demo/semantic_role_labeling/train.sh b/demo/semantic_role_labeling/train.sh old mode 100644 new mode 100755 From 1f2423a9191dc13ada9b97b29699b6d7bd57dda9 Mon Sep 17 00:00:00 2001 From: wangyanfei01 Date: Mon, 5 Dec 2016 15:22:53 +0800 Subject: [PATCH 15/18] follow comments: more docs --- doc/howto/cmd_parameter/detail_introduction.md | 2 +- paddle/trainer/Trainer.cpp | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/doc/howto/cmd_parameter/detail_introduction.md b/doc/howto/cmd_parameter/detail_introduction.md index 28fc5870d20e7..510396b629e39 100644 --- a/doc/howto/cmd_parameter/detail_introduction.md +++ b/doc/howto/cmd_parameter/detail_introduction.md @@ -110,7 +110,7 @@ - type: int32 (default: -1). * `--test_period` - - if equal 0, do test on all test data at the end of each pass while if equal non-zero, do test on all test data once each test_period batches passed while training is going on. + - if equal 0, do test on all test data at the end of each pass. While if equal non-zero, do test on all test data every test_period batches. - type: int32 (default: 0). * `--test_wait` diff --git a/paddle/trainer/Trainer.cpp b/paddle/trainer/Trainer.cpp index 2ffc3e18d96ad..99bf45d247a9c 100644 --- a/paddle/trainer/Trainer.cpp +++ b/paddle/trainer/Trainer.cpp @@ -42,9 +42,8 @@ P_DEFINE_string(config, "", "Trainer config file"); P_DEFINE_int32(test_period, 0, "if equal 0, do test on all test data at the end of " - "each pass while if equal non-zero, do test on all test " - "data once each test_period batches passed while " - "training is going on"); + "each pass. While if equal non-zero, do test on all test " + "data every test_period batches"); P_DEFINE_bool(test_all_data_in_one_period, false, "This option was deprecated, since we will always do " "test on all test set "); @@ -634,9 +633,8 @@ std::unique_ptr Trainer::createTesterConfig() { LOG(WARNING) << "The meaning of --test_period is changed: " << "if equal 0, do test on all test data at the end of " - << "each pass while if equal non-zero, do test on all test " - << "data once each test_period batches passed while " - << "training is going on"; + << "each pass. While if equal non-zero, do test on all test " + << "data every test_period batches "; } if (FLAGS_test_all_data_in_one_period) { LOG(WARNING) From 7c76d0eeac9baa14ccff55b7edbdea2e2833d6ae Mon Sep 17 00:00:00 2001 From: hanchao Date: Mon, 28 Nov 2016 14:20:37 +0800 Subject: [PATCH 16/18] config_parser new feature at ISSUE #726 --- python/paddle/trainer/config_parser.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/python/paddle/trainer/config_parser.py b/python/paddle/trainer/config_parser.py index a19a9a7cd658c..01ff586c4f1c9 100644 --- a/python/paddle/trainer/config_parser.py +++ b/python/paddle/trainer/config_parser.py @@ -3377,7 +3377,20 @@ def parse_config(config_file, config_arg_str): g_root_submodel.is_recurrent_layer_group = False g_current_submodel = g_root_submodel - execfile(config_file, make_config_environment(config_file, config_args)) + # for paddle on spark, need support non-file config. + # you can use parse_config like below: + # + # from paddle.trainer.config_parser import parse_config + # def configs(): + # #your paddle config code, which is same as config file. + # + # config = parse_config(configs, "is_predict=1") + # # then you get config proto object. + if hasattr(config_file, '__call__'): + config_file.func_globals.update(make_config_environment("", config_args)) + config_file() + else: + execfile(config_file, make_config_environment(config_file, config_args)) for k, v in settings.iteritems(): if v is None: continue From 8ac9e9a8dc238554bd56b2acd9f808d4d46e9813 Mon Sep 17 00:00:00 2001 From: Luo Tao Date: Mon, 5 Dec 2016 17:14:07 +0800 Subject: [PATCH 17/18] fix protobuf size limit of seq2seq demo --- demo/seqToseq/dataprovider.py | 35 +++++++++++++++++++++++--------- demo/seqToseq/seqToseq_net.py | 14 +++++-------- doc_cn/faq/index.rst | 38 +++++++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+), 19 deletions(-) diff --git a/demo/seqToseq/dataprovider.py b/demo/seqToseq/dataprovider.py index c5da1b7685f47..0614d54aaf8bb 100755 --- a/demo/seqToseq/dataprovider.py +++ b/demo/seqToseq/dataprovider.py @@ -19,27 +19,38 @@ END = "" -def hook(settings, src_dict, trg_dict, file_list, **kwargs): +def hook(settings, src_dict_path, trg_dict_path, is_generating, file_list, + **kwargs): # job_mode = 1: training mode # job_mode = 0: generating mode - settings.job_mode = trg_dict is not None - settings.src_dict = src_dict + settings.job_mode = not is_generating + settings.src_dict = dict() + for line_count, line in enumerate(open(src_dict_path, "r")): + settings.src_dict[line.strip()] = line_count + settings.trg_dict = dict() + for line_count, line in enumerate(open(trg_dict_path, "r")): + settings.trg_dict[line.strip()] = line_count + settings.logger.info("src dict len : %d" % (len(settings.src_dict))) settings.sample_count = 0 if settings.job_mode: - settings.trg_dict = trg_dict - settings.slots = [ + settings.slots = { + 'source_language_word': integer_value_sequence(len(settings.src_dict)), + 'target_language_word': integer_value_sequence(len(settings.trg_dict)), + 'target_language_next_word': integer_value_sequence(len(settings.trg_dict)) - ] + } settings.logger.info("trg dict len : %d" % (len(settings.trg_dict))) else: - settings.slots = [ + settings.slots = { + 'source_language_word': integer_value_sequence(len(settings.src_dict)), + 'sent_id': integer_value_sequence(len(open(file_list[0], "r").readlines())) - ] + } def _get_ids(s, dictionary): @@ -69,6 +80,10 @@ def process(settings, file_name): continue trg_ids_next = trg_ids + [settings.trg_dict[END]] trg_ids = [settings.trg_dict[START]] + trg_ids - yield src_ids, trg_ids, trg_ids_next + yield { + 'source_language_word': src_ids, + 'target_language_word': trg_ids, + 'target_language_next_word': trg_ids_next + } else: - yield src_ids, [line_count] + yield {'source_language_word': src_ids, 'sent_id': [line_count]} diff --git a/demo/seqToseq/seqToseq_net.py b/demo/seqToseq/seqToseq_net.py index ad5e3339c1461..fc9db05ba706e 100644 --- a/demo/seqToseq/seqToseq_net.py +++ b/demo/seqToseq/seqToseq_net.py @@ -37,17 +37,10 @@ def seq_to_seq_data(data_dir, """ src_lang_dict = os.path.join(data_dir, 'src.dict') trg_lang_dict = os.path.join(data_dir, 'trg.dict') - src_dict = dict() - for line_count, line in enumerate(open(src_lang_dict, "r")): - src_dict[line.strip()] = line_count - trg_dict = dict() - for line_count, line in enumerate(open(trg_lang_dict, "r")): - trg_dict[line.strip()] = line_count if is_generating: train_list = None test_list = os.path.join(data_dir, gen_list) - trg_dict = None else: train_list = os.path.join(data_dir, train_list) test_list = os.path.join(data_dir, test_list) @@ -57,8 +50,11 @@ def seq_to_seq_data(data_dir, test_list, module="dataprovider", obj="process", - args={"src_dict": src_dict, - "trg_dict": trg_dict}) + args={ + "src_dict_path": src_lang_dict, + "trg_dict_path": trg_lang_dict, + "is_generating": is_generating + }) return { "src_dict_path": src_lang_dict, diff --git a/doc_cn/faq/index.rst b/doc_cn/faq/index.rst index 73f7a0e06a7db..f611255aaccd5 100644 --- a/doc_cn/faq/index.rst +++ b/doc_cn/faq/index.rst @@ -214,3 +214,41 @@ PaddlePaddle的参数使用名字 :code:`name` 作为参数的ID,相同名字 cmake .. -DPYTHON_EXECUTABLE= -DPYTHON_LIBRARY= -DPYTHON_INCLUDE_DIR= 用户需要指定本机上Python的路径:````, ````, ```` + +10. A protocol message was rejected because it was too big +---------------------------------------------------------- + +如果在训练NLP相关模型时,出现以下错误: + +.. code-block:: bash + + [libprotobuf ERROR google/protobuf/io/coded_stream.cc:171] A protocol message was rejected because it was too big (more than 67108864 bytes). To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h. + F1205 14:59:50.295174 14703 TrainerConfigHelper.cpp:59] Check failed: m->conf.ParseFromString(configProtoStr) + +可能的原因是:传给dataprovider的某一个args过大,一般是由于直接传递大字典导致的。错误的define_py_data_sources2类似: + +.. code-block:: python + + src_dict = dict() + for line_count, line in enumerate(open(src_dict_path, "r")): + src_dict[line.strip()] = line_count + + define_py_data_sources2( + train_list, + test_list, + module="dataprovider", + obj="process", + args={"src_dict": src_dict}) + +解决方案是:将字典的地址作为args传给dataprovider,然后在dataprovider里面根据该地址加载字典。即define_py_data_sources2应改为: + +.. code-block:: python + + define_py_data_sources2( + train_list, + test_list, + module="dataprovider", + obj="process", + args={"src_dict_path": src_dict_path}) + +完整源码可参考 `seqToseq `_ 示例。 \ No newline at end of file From 11b7625d48a0204910bfcb6b7798202d2ff57d13 Mon Sep 17 00:00:00 2001 From: Luo Tao Date: Mon, 5 Dec 2016 19:10:34 +0800 Subject: [PATCH 18/18] use dictionary comprehension to pythonic code --- demo/seqToseq/dataprovider.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/demo/seqToseq/dataprovider.py b/demo/seqToseq/dataprovider.py index 0614d54aaf8bb..5174092df2608 100755 --- a/demo/seqToseq/dataprovider.py +++ b/demo/seqToseq/dataprovider.py @@ -25,11 +25,17 @@ def hook(settings, src_dict_path, trg_dict_path, is_generating, file_list, # job_mode = 0: generating mode settings.job_mode = not is_generating settings.src_dict = dict() - for line_count, line in enumerate(open(src_dict_path, "r")): - settings.src_dict[line.strip()] = line_count + with open(src_dict_path, "r") as fin: + settings.src_dict = { + line.strip(): line_count + for line_count, line in enumerate(fin) + } settings.trg_dict = dict() - for line_count, line in enumerate(open(trg_dict_path, "r")): - settings.trg_dict[line.strip()] = line_count + with open(trg_dict_path, "r") as fin: + settings.trg_dict = { + line.strip(): line_count + for line_count, line in enumerate(fin) + } settings.logger.info("src dict len : %d" % (len(settings.src_dict))) settings.sample_count = 0