diff --git a/docs/source/_static/js/apitoc.js b/docs/source/_static/js/apitoc.js index b2ed952..befbed6 100644 --- a/docs/source/_static/js/apitoc.js +++ b/docs/source/_static/js/apitoc.js @@ -1,6 +1,6 @@ $(document).ready(function() { (function ($) { - if (window.location.href.match("/api/*") !== null) { + if (window.location.href.match("/api/pronto.*") !== null) { $(".nav-list") .children() .filter("li") @@ -18,6 +18,22 @@ $(document).ready(function() { ); $("#apitoc").append(html); }); + } else if (window.location.href.match("/api/warnings*") !== null) { + $(".nav-list") + .children() + .filter("li") + .append(""); + $( "dt" ) + .each(function( index ) { + var html = ( + "
  • " + + $( this ).find(".sig-name").text() + + "
  • " + ); + $("#apitoc").append(html); + }); } })(window.$jqTheme || window.jQuery); }) diff --git a/docs/source/api.rst b/docs/source/api.rst index d2ff3e2..6c02f66 100644 --- a/docs/source/api.rst +++ b/docs/source/api.rst @@ -78,3 +78,20 @@ exception of custom parser implementations. pronto.RelationshipData pronto.SynonymData pronto.TermData + + +Warnings +-------- + +.. toctree:: + :hidden: + + warnings + +.. autosummary:: + :nosignatures: + + pronto.warnings.ProntoWarning + pronto.warnings.NotImplementedWarning + pronto.warnings.SyntaxWarning + pronto.warnings.UnstableWarning diff --git a/docs/source/api/warnings.rst b/docs/source/api/warnings.rst new file mode 100644 index 0000000..07dd4d3 --- /dev/null +++ b/docs/source/api/warnings.rst @@ -0,0 +1,12 @@ +Warnings +======== + +.. currentmodule:: pronto.warnings + +.. autoexception:: ProntoWarning + +.. autoexception:: NotImplementedWarning + +.. autoexception:: SyntaxWarning + +.. autoexception:: UnstableWarning diff --git a/docs/source/conf.py b/docs/source/conf.py index d30fcc6..99a749f 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -28,9 +28,6 @@ # -- Sphinx Setup ------------------------------------------------------------ def setup(app): - # Force regenerating autosummary - if os.path.exists(os.path.join(docssrc_dir, "api")): - shutil.rmtree(os.path.join(docssrc_dir, "api")) # Add custom stylesheet app.add_css_file("css/main.css") app.add_js_file("js/apitoc.js")