summaryrefslogtreecommitdiff
path: root/numpydoc
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix Warnings section in validate (#335)MatthewFlamm2021-10-252-0/+23
| | | | | * Add Warnings to validate tests * Add Warnings to allowed sections.
* MAINT: Python3 classes do not need to inherit from object (#325)Mike Taves2021-05-192-2/+2
|
* MAINT: changes related to renaming default branch (#314)Ross Barnowski2021-04-131-1/+1
| | | | | | | | | | | * Update CI config. * Rm travis badge from readme. * Fix link to GH. * Rm master_doc - default is index anyways. * Add back master_doc w/ note.
* MAINT: use super() as described by PEP 3135 (#315)Mike Taves2021-03-223-3/+3
|
* ENH: Enable validation during sphinx-build process (#302)Ross Barnowski2021-02-088-53/+243
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * WIP: Move get_doc_obj to docscrape * WIP: mv _obj property to NumpyDocString * Proof-of-concept: Docstring attrs covered by refactor. Running the test suite on this patch demonstrates that refactoring the boundary between NumpyDocString and SphinxDocString provides the necessary info to (potentially) do away with the validate.Docstring class. * NOTE TO SELF: get_doc_object in docscrape_sphinx * Docstring -> Validator. * Activate validation during sphinx-build. Add a conf option to turn on/off. TODO: test * Replace logger.warn with warning. logger.warn is apparently deprecated * DOC: Add numpydoc_validate to conf docs. * Add mechanism for validation check selection. Adds a config option with a set to allow users to select which validation checks are used. Default is an empty set, which means none of the validation checks raise warnings during the build process. Add documentation for new option and activate in the doc build. * TST: modify how MockApp sets builder app. * TST: Add test of validation warnings. * Specify some sensible validation defaults. * Add docstring name to validation warnings. * Add all keyword to validation_check configuration. More flexibility in configuring which validation checks to run during sphinx build. If 'all' is present, treat the rest of the set as a blocklist, else an allowlist. * Fix failing test. * Make validation error mapping easier to read. * Add check for invalid error codes in configuration. plus test. * Add feature to exclude patterns from docstring validation. Modify updated config name to avoid sphinx warning. Add documentation for exclusion config value. * Be explicit about regex syntax for exclude config val Co-authored-by: Eric Larson <larson.eric.d@gmail.com> * Rm redundant numpydoc_validate config param. Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
* BUG: fix an incomplete check in `Reader._error_location`Ralf Gommers2021-01-011-1/+1
| | | | | | | It's unclear why `self._obj` can be None, but that's what I'm seeing when trying numpydoc master to build SciPy master. This fix gives the right traceback.
* Merge pull request #295 from rossbar/xref_confRalf Gommers2021-01-013-8/+130
|\ | | | | ENH: Add configuration option for parameter cross-referencing
| * ALTERNATIVE: overload xref_ignore config valueRoss Barnowski2020-08-215-21/+26
| |
| * DOC: document config value/kwargRoss Barnowski2020-08-171-0/+5
| |
| * Add config value to control behaviorRoss Barnowski2020-08-173-2/+10
| |
| * WIP: kwarg to ignore unknown terms in make_xref.Ross Barnowski2020-08-172-3/+107
| | | | | | | | | | Add a kwarg to make_xref to toggle the automatic wrapping of every term not in xref_ignore in an :obj: role.
* | Merge pull request #272 from rossbar/maint/rm_codepathRalf Gommers2021-01-011-4/+0
|\ \ | | | | | | MAINT: remove unreachable codepath.
| * | MAINT: remove un-reachable codepath.Ross Barnowski2020-06-301-4/+0
| | | | | | | | | | | | Removes conditional after a return statement.
* | | Improve error messages for see also parsing (#306)Ross Barnowski2020-12-093-31/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | * More informative error message for see also parse error. * Improve _error_location method output. * TST: Update test suite. * CI: Update sphinx==1.6.5 job from Python 3.5 to 3.6
* | | MAINT: minor refactoring in docscrape (#297)Ross Barnowski2020-08-191-24/+5
| | | | | | | | | | | | | | | | | | | | | * MAINT: rm unnecessary elses in _str methods * rm unused indent method from NDS * rm unused header method from NDS
* | | Missed argument renameRoss Barnowski2020-08-171-1/+1
| | |
* | | DOC: fix inaccuracy in validate docstring.Ross Barnowski2020-08-121-3/+6
| |/ |/|
* | Fix param parsing. (#286)Matthias Bussonnier2020-08-102-14/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix param parsing. Closes #285 This fixes two tings: - When first sentence of the docstring is onteh first line, Parameters is not properly parse, which for example mis parsed numpy.array docstring. - many project have paremeters description list with ` :` afer the name, even if no type is present. If there is no space after the `:` the parameter name includes the ` :` which is most likely wrong. * test fixture * make doc a fixture * Update numpydoc/tests/test_docscrape.py Co-authored-by: Eric Larson <larson.eric.d@gmail.com> * Update numpydoc/tests/test_docscrape.py Co-authored-by: Eric Larson <larson.eric.d@gmail.com> Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
* | MAINT: Updates related to xref (#292)Ross Barnowski2020-08-052-39/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | * TST: use default links in xref test. Switch to numpydoc's default link mapping for test_xref instead of the custom (less comprehensive) link mapping. * DOC: rm statements about xref_alias dict. Default aliases are not an empty dict, nor are they dependent on intersphinx. * DOC: Update make_xref docstring.
* | BUG: Properly parse See Also when summary on first line. (#283)Matthias Bussonnier2020-07-162-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in a case like: """signature See Also -------- a,b,c,d """" Numpydoc would incorrectly assign `a, b, c, d` as a description with no name, or type associated items. Closes #281
* | fix spliting of parameter lines. (#279)Matthias Bussonnier2020-07-142-3/+21
| | | | | | | | if ' : ' is present twice in the line this drops any test after the second ' : ', which happens in some docstring that have the `default : stuff` idiom
* | ENH: Better warning for sections. (#278)Matthias Bussonnier2020-07-142-2/+36
| | | | | | | | | | | | | | | | | | | | | | * ENH: Better warning for sections. 1) if the number of -/= is too short/ too long warn, Especially too short it won't be detected as a section. 2) for duplicate section print the docstring to figure out where the problem is. * add warn test
* | BUG: fix role regex.Matthias Bussonnier2020-07-132-1/+6
| | | | | | | | | | Spyder sometime uses the full :py:meth: role, this make sure it is properly handled.
* | MAINT: Tick versionEric Larson2020-07-011-1/+1
| |
* | MAINT: Remove dev, update notesv1.1.0Eric Larson2020-07-011-1/+1
|/
* MAINT: Refactor test_xref to use parametrization.Ross Barnowski2020-06-301-9/+7
| | | | | Each pair of input/output in data is treated as an individual test, aiding in detection of specific failures.
* MAINT: Py3k rm explicit inherit from object.Ross Barnowski2020-06-302-7/+7
|
* MAINT: Fix code comments.Ross Barnowski2020-06-301-2/+3
| | | | | | | | A comment pertaining to docutils_namespace() had been separated from the code that it was referring to. Moved comment back to appropriate location and added a separate comment to unrelated code to differentiate the two.
* MAINT: Refactor - parametrize test_referenceRoss Barnowski2020-06-301-17/+12
| | | | | | Refactors test_full.test_reference using the parametrization facilities of pytest. In principle, improves readibility and makes it easier to extend the test.
* MAINT: Update test docstring.Ross Barnowski2020-06-301-1/+1
| | | | | Description appears to have been ported directly over from sphinx-gallery example. Updated to match current test function.
* BUG: Connect to earlier event (#269)Joel Nothman2020-06-271-4/+13
|\
| * FIX: Old SphinxEric Larson2020-06-251-2/+9
| |
| * BUG: Connect to earlier eventEric Larson2020-06-251-4/+6
| |
* | BUG: Defer to autodoc for signatures (#221)Peter Quackenbush2020-06-275-22/+47
|/
* MAINT: Bump to 1.1.0.dev0 (#266)Eric Larson2020-05-261-1/+1
|
* MAINT: Add release notes and bump versionEric Larson2020-05-231-1/+1
|
* FIX: Get doc of actual class (#262)Eric Larson2020-05-231-2/+1
|
* TST: Add inherited method (#260)Eric Larson2020-04-197-13/+23
| | | | | | | | | | | * TST: Add inherited method * FIX: Check version * FIX: Simpler * FIX: Simplify * FIX: Old Sphinx
* Fixes references outside function (#214) (#259)Hoxbro2020-04-194-7/+54
| | | | | | | | | * Fixes references outside function (#214) * Fixes reference in class with a method in it (#259) * Added unittest to reference * Check if reference list in test_full is correct size
* MAINT: clean-up unused objects (#254)Mike Taves2020-04-123-28/+9
| | | | | | * F401: Add pytest.main() or clean-up unused import * F811: remove second identical 'test_returnyield' function * F821: 'tags' is a special object from sphinx-build; mark with noqa * F841: clean-up unused local variables
* Disable escaping "*" on signature (#256)Takeshi KOMIYA2020-04-123-4/+4
| | | | | | | | | | | On handling autodoc-process-signature event, it's not needed to escape "*" characters. The escaping is mainly allowed for highlighting feature of editors. So it's not necessary for generating contents by autodoc. In addition, since Sphinx-3.0, the escaping is not recommended by default (see strip_signature_backslash) refs: https://github.com/sphinx-doc/sphinx/issues/7439
* Delay import of Sphinx (#248)Christoph Gohlke2019-12-041-1/+5
| | | | | | | | * Delay import of Sphinx * ENH: do not import Sphinx unless it has already been imported * Delay import of Sphinx
* Adding --validate option __main__ and run new validation (#240)Marc Garcia2019-11-134-85/+129
| | | | | | | | * Adding --validate option __main__ and run new validation * Fixing main tests, and minor improvements to the code * Fixing travis negation of exit status
* BUG: Allow no . at end if indented (#239)Eric Larson2019-10-252-28/+40
| | | | | | | | | | | | | | | | | | | | * BUG: Allow no . at end if indented * BUG: Returns, too * MAINT: Simplify * MAINT: Clean up the returns check, too * BUG: Debug cruft * MAINT: Unify * MAINT: Unify sanitizing and processing of desc * STY: Cleaner * STY: extend rather than +=
* Add docstring validation script (from pandas) (#238)Marc Garcia2019-10-242-0/+1883
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * First version of the script with no pandas stuff (some tests will need to be removed) * Updating tests * Removing the part of the validation that gets the public API objects, and receiving them as a parameter * Updating tests * Fixed bug making examples fail when pytest was called in verbose mode * Replacing pandas by a stdlib module to pass tests when pandas is not available * Making code py2 compatible * Simplified script (just one validate function + Docstring), and removed concept of warning * Fixing imports in py2 * Changing import to see if py2 is happy * Restoring imports, and calling pytest as a module * Getting new changes from pandas sprint, and removing py2 stuff * Fixing import error in tests * Adding tests and removing unused code (improving coverage) * Better implementation of module import based on code review * Remove running examples * Require first letter to be upper case only if it's a letter * Allow one liner docstrings with quotes in the same line.
* Drop Python 2.7 and 3.4 supportRoman Yurchak2019-10-237-68/+22
|
* ENH: Test full output and coverage (#230)Eric Larson2019-08-095-0/+155
| | | | | | | | | | | | | | | | * ENH: Test full output and coverage * FIX: Add new files to setup.py * ENH: dvipng * FIX: Cleaner test * ENH: Update * BUG: Remove StringIO * STY: Better naming and explanations
* BUG: Fix full rebuilds (#226)Eric Larson2019-06-213-6/+31
|
* Py3fy some doctests. (#224)Antony Lee2019-05-311-6/+6
|
* MAINT: fix trivial source comment typosluz.paz2019-05-292-2/+2
| | | Found via `codespell`