From 0c5c8ff178e88f63da5dc7c9781889b37671b80a Mon Sep 17 00:00:00 2001 From: Jonathan Beezley Date: Tue, 13 Jun 2017 14:25:12 -0400 Subject: [PATCH 1/3] Add a new jsdoc plugin to fix event names --- jsdoc.conf.json | 1 + jsdoc/plugins/events.js | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 jsdoc/plugins/events.js diff --git a/jsdoc.conf.json b/jsdoc.conf.json index 3965ce9848..b405231994 100644 --- a/jsdoc.conf.json +++ b/jsdoc.conf.json @@ -3,6 +3,7 @@ "template": "node_modules/jaguarjs-jsdoc" }, "plugins": [ + "jsdoc/plugins/events", "node_modules/jsdoc-autoprivate/autoprivate.js", "plugins/markdown" ], diff --git a/jsdoc/plugins/events.js b/jsdoc/plugins/events.js new file mode 100644 index 0000000000..8419c483fa --- /dev/null +++ b/jsdoc/plugins/events.js @@ -0,0 +1,34 @@ +function fixEventName(event) { + return event.replace('event:', ''); +} + +/** + * Define a jsdoc plugin to replace the `longname` of + * event doclets from `geo.event.event:pan` to `geo.event.pan`. + */ +exports.handlers = { + /** + * Replace the `longname` of all event doclets. + */ + newDoclet: function (e) { + var doclet = e.doclet; + if (doclet.kind === 'event') { + doclet.longname = fixEventName(doclet.longname); + } + }, + + /** + * Replace the displayed name of events to match the changed + * doclet names. + */ + parseComplete: function (e) { + e.doclets.forEach(function (doclet) { + if (doclet.fires) { + doclet.fires = doclet.fires.map(fixEventName); + } + if (doclet.listens) { + doclet.listens = doclet.listens.map(fixEventName); + } + }); + } +}; From cd928872cd5a0ca4bf0a11a0ac0aa98c9033f4c9 Mon Sep 17 00:00:00 2001 From: David Manthey Date: Wed, 14 Jun 2017 12:52:09 -0400 Subject: [PATCH 2/3] Add an API link to the Sphinx documentation. Prior to this, the only link to the full API docs was in an under-construction sort of message. This also removes the outdated upload_test_cases.rst file and cleans up all Sphinx-build warnings. --- docs/conf.py | 4 +++- docs/index.rst | 1 + docs/testingutils.rst | 1 - docs/upload_test_cases.rst | 5 ----- docs/users.rst | 6 +++--- 5 files changed, 7 insertions(+), 10 deletions(-) delete mode 100644 docs/upload_test_cases.rst diff --git a/docs/conf.py b/docs/conf.py index fd36ce2689..6a411b9b95 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -153,7 +153,9 @@ # 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 = [] +# html_static_path = ['_static'] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied diff --git a/docs/index.rst b/docs/index.rst index be79875c1e..037b9ae8cd 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -27,6 +27,7 @@ If you have any questions or comments, feel free to join us on our developers provisioning testingutils + API Reference Indices and tables ================== diff --git a/docs/testingutils.rst b/docs/testingutils.rst index c416a3d8d8..05f8b1fc6c 100644 --- a/docs/testingutils.rst +++ b/docs/testingutils.rst @@ -7,4 +7,3 @@ Testing infrastructure :maxdepth: 2 baseline_images - upload_test_cases diff --git a/docs/upload_test_cases.rst b/docs/upload_test_cases.rst deleted file mode 100644 index 228039a4ac..0000000000 --- a/docs/upload_test_cases.rst +++ /dev/null @@ -1,5 +0,0 @@ -upload_test_cases -================= - -.. automodule:: upload_test_cases - :members: diff --git a/docs/users.rst b/docs/users.rst index 27eb270ade..c5b4b47948 100644 --- a/docs/users.rst +++ b/docs/users.rst @@ -141,6 +141,9 @@ class definition inside GeoJS. Class overview --------------- +The latest version of the full API documentation is at +`http://opengeoscience.github.io/geojs/apidocs/geo.html `_. + GeoJS is made up of the following core classes. Click on the link to go to the documentation for each of the classes. @@ -215,9 +218,6 @@ documentation for each of the classes. `geo.jsonReader `_, which is an extendable geojson reader. -The API documentation is in the process of being updated. You can always find the latest version -at `http://opengeoscience.github.io/geojs/apidocs/geo.html `_. - Coordinate systems ------------------ From 95c17366a7233c96460a0c840494e05a2eaf3002 Mon Sep 17 00:00:00 2001 From: David Manthey Date: Thu, 15 Jun 2017 10:16:43 -0400 Subject: [PATCH 3/3] Add a codecov configuration file. Minor variations in testing result in codecov showing failures when we should let the changes through. --- .codecov.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .codecov.yml diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 0000000000..66eb5f317f --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,15 @@ +comment: false +coverage: + status: + # We have some variation in tests due to variations in the test runs. We + # want to ignore these changes, but not let code coverage slip too much. + project: + default: + threshold: 0.1 + # This applies to the changed code. We allow it to be much less covered + # than the main code, since we use the project threshold for that. + patch: + default: + threshold: 25 + only_pulls: true +