summaryrefslogtreecommitdiff
path: root/networkx/readwrite/json_graph
Commit message (Collapse)AuthorAgeFilesLines
* Use unpacking operator on dicts to prevent constructing intermediate objects ↵DiamondJoseph2023-05-023-15/+8
| | | | (#6040)
* Lint using Ruff (#6371)danieleades2023-02-194-25/+37
| | | | | | | | | | | | | | | * lint and fix using ruff * add flake8-pie lints * remove useless import alias * bump version * bump deps --------- Co-authored-by: daniel.eades <daniel.eades@hotmail.com>
* Update developer requirements (#6429)Jarrod Millman2023-02-141-1/+0
| | | | | * Update developer requirements * Run linter
* Add missing asserts to tests (#6039)DiamondJoseph2022-10-124-7/+7
| | | Fixes gh-5981: Add missing asserts to tests
* Propose to make new node_link arguments keyword only. (#5928)Ross Barnowski2022-08-171-1/+9
| | | Propose to make new node_link args kwarg only.
* Bump nodelink args deprecation expiration to v3.2 (#5933)Ross Barnowski2022-08-171-6/+6
| | | | | * Bump deprecation expiration for nodelink params to v3.2. * Fixup warnings filter.
* signature change for `node_link` functions: for issue #5787 (#5899)Kevin Brown2022-08-112-44/+232
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * added tests for new signature - kept all the original tests. Tagged the tests to remove after signature change is complete. - leveraged a test from test_cyctoscape.py, checks for warnings. - made new versions of tests that use attrs in the signature. * Verified that the new tests fail. Good. * update signatures with keywords * added warning message * adapted code to use keywords * move test with recwarn fixture outside of class when recwarn was used in a method, got an error. work fine in a function. * add warning to node_link_graph() * update node_link_graph() to use keywords * use recwarn in test to dectect warnings * added deprecation notices to doc strings. Needs version number for when deprecation will happen * added example code from doc string to tests * gave default values to elements of attrs the example code passes a dict with only some of the keywords defined. So the defaults needed to be provided * fixed name conflict * brace in docstring * drop braces in doc string example * Changed namespace to nx in doc string examples * update the examples - show the results of the examples - add more examples of serialization with json * Update doc desc and notes - Add reference to Serialization in the method description. - add a note that the keywords chose for the attributes names must match if the two functions are to be used together * clean up wording * document the version numbers for deprecating deprecate the change in 2.8.6 remove the change in 3.1 * Add note, on using old and new keywords together * Add Deprecation Warning to conftest.py * Add a reminder to remove code & docs in 3.1
* remove old attr keyword from json_graph/tree (#5785)Matt Schwennesen2022-06-162-86/+2
|
* update cytoscape functions to drop old signature (#5784)Dan Schult2022-06-162-88/+2
| | | update cytoscape functions with new signature
* Rm jit.py (#5751)Dilara Tekinoglu2022-06-153-185/+0
| | | Co-authored-by: dtuncturk <dilaramemis@sabanciuniv.edu>
* Use isort with pre-commit to enforce import guidelines (#5659)Mridul Seth2022-06-029-1/+15
| | | | | * Add isort to pre-commit * Run isort on all python files (except __init__.py ones)
* Deprecate `to_tuple` (#5430)Ross Barnowski2022-03-281-2/+18
| | | | | | | | | * Add _to_tuple private fn to node_link.py. * Deprecate utils.misc.to_tuple. * Add deprecation note. * Add release note.
* Add exception for unconnected graph (#5287)Dimitrios Papageorgiou2022-01-282-0/+7
|
* Compatibility updates from testing with numpy/scipy/pytest rc's (#5226)Ross Barnowski2021-12-122-10/+12
| | | | | | | * Rm deprecated scipy subpkg access. * Use recwarn fixture in place of deprecated pytest pattern. * Rm unnecessary try/except from tests.
* Remove dictionary from signature of tree_graph and tree_data (#4786)Ross Barnowski2021-05-184-158/+243
| | | | | | | | | | | | | | | * Deprecate attrs dict in json_graph.tree fns. Replace attrs dict in signature with explicit kwargs and add deprecation warning. Adds tests that the behavior isn't changed and that warnings are raised when expected. * Add deprecations to list and ignore warnings in conftest. * Modify cytoscape functions attrs deprecation. * Cleanup cytoscape test suite.
* Fix docstrings and remove unused variables (#4501)Andrea Tomassilli2021-01-092-10/+9
| | | | Co-authored-by: Dan Schult <dschult@colgate.edu> Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* DOC: Switch from napoleon to numpydoc sphinx extension (#4447)Ross Barnowski2020-12-121-2/+2
| | | | | | | * Setup for numpydoc. * Add to doc requirements. * Replace napoleon with numpydoc in conf.py. * DOC: Fixups from numpydoc.
* Deprecate jit (#4428)Jarrod Millman2020-12-101-0/+14
| | | | | * Remove example * Deprecate jit_graph / jit_data
* Add FutureWarning in preparation for simplifying cytoscape function ↵Ross Barnowski2020-11-122-8/+69
| | | | | | | | | | | | | | | | | | | | signatures. (#4284) * MAINT: refactor param parsing and checking. * Add futurewarning for changing cytoscape signature. If attrs kwarg is used, raise a detailed future warning about how the function signature will change. * TST: Add tests for cytoscape futurewarning. This test should fail if the future warning is removed - useful to remind developers that the function signature should change in 3.0 * Add cytoscape signature change to deplist in docs Co-authored-by: Jarrod Millman <jarrod.millman@gmail.com>
* Improve readwrite test coverage (#4310)Jarrod Millman2020-10-311-1/+7
| | | | - tree_graph - edgelist
* fix "see also" links in json_graph.tree (#4222)wim glenn2020-09-281-2/+2
| | | one is duplicate and one is self-referential. https://networkx.github.io/documentation/stable/reference/readwrite/generated/networkx.readwrite.json_graph.tree_data.html
* DOC: Update docstrings in cytoscape module (#4180)Ross Barnowski2020-09-101-2/+81
| | | | | | | * DOC: Add sections to cytoscape_data docstring * DOC: Add docstring to cytoscape_graph * DOC: Fix incorrect dict in parameter spec
* fix issue #4173: cytoscape_graph(input_data) did modify the original data ↵Carlos González Rotger2020-08-252-2/+11
| | | | | | | | | | | (#4176) * fix issue #4173: readwrite.json_graph.cytoscape_graph(input_data) did modify the original data * improve test function * improve test function with @rossbar suggestion * improve function cytoscape_graph as suggested by @rossbar: direct access is better, to raise exception if "source" or "target" are not present.
* Format python in docstrings (#4168)Jarrod Millman2020-08-194-13/+15
| | | | | | | | | | | | | | | | | | | * Format code w/ black * Format docstrings w/ black * Manual cleanup * Tell pytest to ignore planned deprecations * Don't call plt.show during testing * Another known deprecation * DOC: rm duplicate line from docstring example * Minor cleanup Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Format w/ blackJarrod Millman2020-07-1010-153/+160
|
* added default arg for json dumps for jit_data func (#3891)Pedro Ortale2020-04-061-2/+6
| | | | | | | * added default arg for json dumps for jit_data func * added function docstring for the default parameter Co-authored-by: Pedro Ortale <pedro.ortale@rackspace.co.uk>
* Upgrade to Py36 syntaxJarrod Millman2020-01-014-12/+12
| | | | find networkx -name \*.py -exec pyupgrade --py36-plus {} \;
* Remove superfluous encoding informationJarrod Millman2019-11-111-1/+0
|
* Remove boiler plate from top of modulesJarrod Millman2019-11-115-32/+2
| | | | | | | | | The copyright and author stuff is not necessary, out-of-date, and inconsistent. It takes up visual space and is a pain to police everyone doing the same thing on the top of the module. Git handles authorship in a comprehensive and authoritative way. The LICENSE.txt file applies to all project code.
* Remove old Python 2 codeJarrod Millman2019-11-101-1/+1
|
* Deprecate make_strJarrod Millman2019-10-212-7/+6
|
* PEP8 fixesJarrod Millman2019-10-184-13/+6
|
* Replace nose.raises with pytest.raises context managerJarrod Millman2019-10-124-21/+21
|
* Replace nose.assert_raises with pytest.raisesJarrod Millman2019-10-121-2/+2
|
* Remove unused importsJarrod Millman2019-10-125-5/+5
|
* Convert nose.tools.assert_* functions into assertsJarrod Millman2019-10-125-56/+56
|
* First round of pytest fixesStefan van der Walt2019-10-121-0/+0
|
* Allow jit_graph to read json string or json object (#3628)Dan Schult2019-10-032-4/+14
| | | Fixes #3197
* Update copyrightJarrod Millman2019-03-302-2/+2
|
* Replacing `Return` to `Returns` in docs for functions (#3301)Moradnejad2019-02-185-8/+8
| | | | | | * Fixed problem in documentation view of this function * Replacing `Return` to `Returns` in function docs
* Pep8 fixesJarrod Millman2018-01-206-77/+76
|
* Update copyrightJarrod Millman2018-01-202-2/+2
|
* Add directed graphs support for jit_graph reading (#2753)Louis Gatin2018-01-082-4/+40
| | | | | | | | * Add directed graphs support for jit_graph reading * Solving spaces/tabs error * Add create_using argument to jit_graph. Add tests.
* Removed unused imports (#2653)James Lamb2017-10-018-10/+7
|
* Fix links (#2663)Jarrod Millman2017-09-111-4/+4
| | | | | | * Fix links * Comply with pep8
* Simplify base classes. (#2604)Dan Schult2017-08-129-26/+26
| | | | | | | | | | * move selfloop methods out of graph classes into function.py * replace G.node with G.nodes. fix Pickle of views * Replace G.edge with G.edges * Add a few lines of docs for release realted to this PR.
* Update copyrightJarrod Millman2017-07-252-2/+2
|
* Move data structure to private names and replace with readonly structures ↵Dan Schult2017-06-263-13/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#2475) * Dont assume iterators for nodes/edges/degrees (prep for views) * Add graph view classes for nodes/edges/degree * Add right set operations (not present in python3.3 KeysView * Add nodes before adding edges so python36 tests work By only adding edges, the nodes were added in order (0,1,3,2) and with the ordered nature of python3.6 dicts the tests failed. Could also fix by using nodelist on each call to to_convert_... * weighted graph convert tests testing empty graphs The edge iterator was exhausted for source before being used for dest * allow DegreeView to include case of nbunch * Make node/edge/degree properties of Graph * View contains fix and Viewers can return self. More tests * Add more tests including one for #2347 * Add nbunch tests and pep8 * Rename to EdgeView and EdgeDataView * docs tweaks and pep8 * fix up nodeDataView contains. Add and clean up tests. * Change the graph attributes to read-only properties * Reframe views code and extend _node to all networkx (still need examples) * Clean up and pep8 for view changes * ername AtlasViews, simplify code and add docstrings * Make G[u] return a view, and catch some doc bugs * Update views to use _node,_adj. Add len to EdgeDataView * minor adjustments to example subclass/printgraph
* Fixed bug on custom attrs usage: unavailable iteritems method for dict.Ramil Nugmanov2017-05-252-7/+20
| | | | also set and dict creation changed.
* Merge pull request #2366 from rhilenova/bugfix-for-issues-2328-and-2332Aric Hagberg2017-04-022-16/+29
|\ | | | | Fix for issues #2328 and #2332