summaryrefslogtreecommitdiff
path: root/doc/reference/utils.rst
Commit message (Collapse)AuthorAgeFilesLines
* Fix defect and update docs for MappedQueue, related to gh-5681 (#5939)Kevin Brown2022-10-041-0/+8
| | | | | | | | - Update exception message for MappedQueue when queue elements are not comparable. - Adds tests for MappedQueue elements - Adds MappedQueue to the refguide and improve documentation, esp. examples. Co-authored-by: Dan Schult <dschult@colgate.edu> Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Fix docbuild warnings: is_string_like is removed and identation in corona ↵Mridul Seth2022-07-051-1/+2
| | | | | product (#5845) Fix docbuild warnings
* Remove generate_unique_node (#5780)Jarrod Millman2022-06-161-1/+0
| | | | | | | | * Remove generate_unique_node * [skip ci] rm from refguide. Co-authored-by: Ross Barnowski <rossbar@berkeley.edu> Co-authored-by: Mridul Seth <seth.mridul@gmail.com>
* Remove deprecated function iterable (#5742)Mridul Seth2022-06-161-1/+0
| | | | Co-authored-by: Ross Barnowski <rossbar@berkeley.edu> Co-authored-by: Jarrod Millman <jarrod.millman@gmail.com>
* Remove deprecated function utils.default_opener (#5747)Mridul Seth2022-06-161-1/+0
| | | Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Remove deprecated function make_str (#5739)Mridul Seth2022-06-151-1/+0
| | | | | | | * Remove deprecated function make_str * [skip ci] rm from reference guide. Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Deprecate `random_state` decorator (#5055)Ross Barnowski2021-09-121-2/+2
| | | | | | | | | | | | | | | | | * Reorganize aliases and deprecate random_state. * Rm internal uses of random_state. * Update tests. Rm tests or rename to use np_random_state. * Update reference guide. * Update deprecations.rst. * Remove preserve_random_state from refguide. * Add deprecation to release notes.
* Remove decorator dependency (#4739)Kelly Boothby2021-06-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * added argmap decorator * removed most dependency on decorator * removed last reference to decorator? * Made the compilation of argmap-decorated functions lazy to reduce import time. * black * reworked try_finally to make cleanup cleaner * first pass at documentation; general cleanup * incorporated dschult's comments * rest formatted docstrings * added unit tests and fixed a few bugs that cropped up * Apply suggestions from code review Co-authored-by: Ross Barnowski <rossbar@berkeley.edu> Co-authored-by: Dan Schult <dschult@colgate.edu> * Exapnd docstrings for decorators.py * * refactored try_finally into a keyword-only argument * more tweaks to documentation re: @stefanv's comments * additional unit test for signature-clobbering decorators * spellcheck my txt and expand new test to help me grok it * rehash docstrings for sphinx * rewrite docs to provide some examples where argmap used without @argmap * doc tweak * last touches * documentation clarifications * run black * doc review * remove decorator module from github workflows and INSTALL.rst * add text to release_dev to describe highlights and improvements here Co-authored-by: Ross Barnowski <rossbar@berkeley.edu> Co-authored-by: Dan Schult <dschult@colgate.edu>
* Refactor testing utilities (#4829)Jarrod Millman2021-05-261-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Refactor testing utilities Change `assert_edges_equal`, `assert_graphs_equal`, and `assert_nodes_equal` to be more pytest-idiomatic. For example, `assert_edges_equal` becomes the Boolean function `edges_equal` and then the assert is done the testing file (i.e., `assert edges_equal(edges1, edges2)`). This also makes these utility functions useful in nontesting situations where you want to compare edges, but not raise an exception based on the result. * Move testing utility functions * Use new testing utilities * Deprecate assert_*_equal testing utilities * Document node, edge, and graph equality helper functions * text nits. * Update networkx/tests/test_convert_pandas.py Co-authored-by: Ross Barnowski <rossbar@berkeley.edu> * Update networkx/readwrite/tests/test_sparse6.py Co-authored-by: Ross Barnowski <rossbar@berkeley.edu> * Update networkx/readwrite/tests/test_graph6.py Co-authored-by: Ross Barnowski <rossbar@berkeley.edu> * Update networkx/generators/tests/test_classic.py Co-authored-by: Ross Barnowski <rossbar@berkeley.edu> * Update networkx/algorithms/tree/tests/test_operations.py Co-authored-by: Ross Barnowski <rossbar@berkeley.edu> * Update networkx/algorithms/tree/tests/test_coding.py Co-authored-by: Ross Barnowski <rossbar@berkeley.edu> * Update networkx/algorithms/tests/test_dag.py Co-authored-by: Ross Barnowski <rossbar@berkeley.edu> * Update networkx/algorithms/minors/tests/test_contraction.py Co-authored-by: Ross Barnowski <rossbar@berkeley.edu> * add short equality description to docstring * Suppress known warnings Co-authored-by: Ross Barnowski <rossbar@berkeley.edu> Co-authored-by: Dan Schult <dschult@colgate.edu>
* Update documentation and testing of arbitrary_element (#4451)Ross Barnowski2021-01-271-0/+1
| | | | | | | | | | | | | | * Update documentation for arbitrary_element. * Add numpydoc sections to docstring and extensive examples. * Add to reference documentation. * Add tests for arbitrary_element. * Update networkx/utils/misc.py Co-authored-by: Stefan van der Walt <sjvdwalt@gmail.com> Co-authored-by: Stefan van der Walt <sjvdwalt@gmail.com>
* Deprecate utils.is_list_of_ints (#4280)Ross Barnowski2020-10-241-1/+0
| | | | | | | | | | | | | * Add deprecation warning to is_list_of_ints. * Modify misc module doc examples. Use non-deprecated functions in doc examples. * Add deprecation to list in docs. * Remove is_list_of_ints from refguide autosummary. * Add release note about deprecation.
* Deprecate context_manager reversed in favor of reversed_view (#3983)Dan Schult2020-06-021-8/+0
| | | | | | | * Deprecate context_manager reversed in favor of reversed_view * change pep8 stuff Fixes #3936
* Change is_list_of_ints to make_list_of_ints (#3617)Dan Schult2019-10-041-0/+1
| | | | | | | | | | | | * Make is_list_of_ints work with nonlists Idea is to use make_list_of_ints which converts floats to ints * Add tests of nonintegeres to is_<special>graph * Fix error added to exception handling in tests for no numpy. Replaces #3335 Fixes #3322
* Add seed keyword argument to random_layout and spring_layout (#2766)Harry2017-12-031-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add random_state keyword arguments to random_layout and fruchterman_reingold_layout * Change random_seed function argument to seed for consistency with NetworkX * Improve docstring wording * spring_layout and random_layout use instances of RandomState, rather than seeding the global rng * Add check_random_state helper function * Use check_random_state to generate the rng * Add random_state decorator function to generate numpy.random.RandomState instances from functions with the random_state keyword argument * Add random_state decorators to random_layout and fruchterman_reingold_layout * Change rng to random_state in _fruchterman_reingold and _sparse_fruchterman_reingold * Fix random_state_index for fruchterman_reingold_layout after threshold argument was added * None or np.random returns an instance of RandomState * Add tests for check_random_state * Decorate _fruchterman_reingold and _sparse_fruchterman_reingold so tests pass * Import numpy in try block * Don't import NumPy in global namespace * Make docstrings compatible with Sphinx * Remove import numpy from try block * Rename test funtion for preserve_random_state * Add tests for random_state decorator * Import SkipTest * doc tweaks and name change to create_random_state * Add exception tests
* Remove zipf_sequenceJarrod Millman2017-07-251-1/+0
|
* Remove pareto_sequenceJarrod Millman2017-07-251-1/+0
|
* Remove uniform_sequenceJarrod Millman2017-07-251-1/+0
|
* Remove create_degree_sequence deprecated in 2013Jarrod Millman2017-07-251-1/+0
| | | | See a02b65560.
* Flatten doc hierarchy (#2520)Jarrod Millman2017-07-171-0/+73
* Silence some sphinx warnings * Update structure of documentation See https://github.com/networkx/networkx/pull/2054