| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
* Update developer requirements
* Run linter
|
| |
|
| |
Minor formatting fixups to get rid of doc build warnings.
|
| |
|
|
|
| |
* Add isort to pre-commit
* Run isort on all python files (except __init__.py ones)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add minimal mypy configuration file.
* Add mypy workflow to GH.
* Properly import sentinels from traversal.edgedfs.
* mypy doesn't like variables named \"e\".
* Rm annotations from single function.
* Fix name collisions in test suite.
Make sure all tests have unique names.
* Rm unused random seed in test setup.
* Rm redundant __all__ specification.
* Silence mypy error from sum(). Mypy bug?
* Fix tsp test instantiation nit.
* \"type: ignore\" to suppress conditional fn sigature errors.
* Remaining \"type: ignore\" to appease mypy.
* Configure mypy to ignore inheritance issues.
* Update exclude conf for CI.
- Add yaml
- Reformat regex containing reportviews
* Rm partial annotations from lukes.py.
Fixes mypy errors due to unannotated code.
* Reorg defaultdict to reduce type: ignore cruft.
* Homogenize signatures for fns defined in conditionals.
* err as varname only in exception catching.
* Fix name collision in Bellman-Ford test suite.
|
| |
|
|
| |
A more descriptive variable name for exceptions. This reduces local var naming conflicts when
\`e\` is used e.g. to represent edges as a loop variable.
|
| |
|
|
|
|
|
|
|
| |
* Add tests that fail on uninformative exception.
* Raise informative exception when non-supported type used.
* Add importorskip to new tests.
* Change naming scheme for backward compatibility.
|
| |
|
|
|
|
|
|
|
| |
* added security warning for graphml files
* Update networkx/readwrite/graphml.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
| |
Allow selection of an edge attribute to be the edge id when writing GraphML.
Adds edge_id_from_attribute kwarg.
|
| |
|
|
| |
Decode and preserve GraphML/yEd shape type
and add tests for description and yworks GenericNode
|
| |
|
|
| |
* Add test case for handling default node attributes from graphML
* Add decode conversion to key defaults analogous to decode_data_elements
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#4296)
* move scipy imports into functions
* run black
* Move xml and lxml import inside functions in graphml.py
* Move imports inside functions
* Add tests to graphml.py to appease the codecov CI
* rearrange KDTree import handling
* remove global np from alg_connectivity code
* fix black
* fix black
|
| | |
|
| |
|
| |
closes: #4188
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* MultiGraph from graphml with explicit edge ids #3470
Prior this commit, a graph with explicit edge ids
but no parallel edges stored in a graphml was converted to
a Graph and the edge ids were moved to the edge data.
This behaviour has been removed.
* clean up multigraph handling in read_graphml and friends
Added changes to parse_graphml too.
multigraph returned when parallel edges exist in file or when
new argument "force_multigraph" is True
* test parse_graphml and edge_key_type better and cleanup
* more tests
Co-authored-by: Dan Schult <dschult@colgate.edu>
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
np.int is just int--it is not a numpy type, and is deprecated.
Numpy has changed to np.int_
|
| |
|
|
|
|
|
|
|
|
|
| |
* Add option for named key ids to GraphML writing.
* Remove 'is True' for PEP8 compliance.
* Added tests to confirm the named key ids are written as expected.
* Add test showing the read graph's nodes and edges are the same when written with both the default behavior and with the named id attributes.
Co-authored-by: dnp <you@example.com>
|
| |
|
|
|
|
|
|
|
| |
find -name "*py" | xargs grep -n '" % '
find -name "*py" | xargs grep -n '"\.format('
find -name "*py" | xargs grep -n "' %"
find -name "*py" | xargs grep -n 'msg % '
find -name "*py" | xargs grep -n ' %d '
find -name "*py" | xargs grep -n '\.format('
|
| |
|
|
| |
find networkx -name \*.py -exec pyupgrade --py36-plus {} \;
|
| | |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
| |
Fixes #3167
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
* Expand graphml numeric types for numpy int/floats
Fixes #1556
* fix typoes in tests for float
* add write_graphml update to release doc
|
| |
|
|
|
|
|
|
|
|
| |
Found via `codespell -q 3 -I ../networkx-whitelist.txt` where whitelist consisted of:
```
ans
childs
iff
nd
te
```
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* use dict comprehensions in kcomponents.py
* use dict comprehensions in test_kcomponents
* use dict comprehensions in test_kcutsets
* use dict comprehensions in test_maxflow
* use dict comprehensions in test_maxflow_large_graph
* use dict comprehensions in flow/utils.py
* use dict comprehensions in weighted.py
* use dict comprehensions in graphml.py
* use dict comprehensions in nx_pylab.py
* use dict comprehensions in relabel.py
* use dict comprehensions in assortavity/mixing.py
* conform to pep8 guidelines in mixing.py
* Minor tweaks to kcomponents to update to v2.0
|
| |
|
|
| |
groups would only be parsed if they were connected to non-grouped nodes via edges (#2644)
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#2559)
* Graphml: read and write key and data attributes of edges in multi-graphs.
Before this commit, key and attribute of multi edges were both stored as `data` xml elements of graphml. This caused difference in edges of multigraphs with key and data attributes after consequent write and reads of graphml. `test_preserve_multi_edge_data` was added to `test_graphml.py` to show this inconsistency.
This commit changes graphml reader and writer behavior to:
* read and write `key` of networkx edges only in `id` attribute of `<edge id="...">` elements of graphml.
* read and write `data` of networkx edges only in `<data></data>` elements of graphml.
Only in non-multigraphs, `id` attribute of `<edge id="...">` elements will be read into `data` of networkx edges, because we have no `key` for edges.
* Fix pep8 errors for graphml
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Added graphmlxml class
* Allow graphml to read Cytoscape files with incomplete headers
Fixes #2197
* graphml pep8 changes
* Add a test and some docstring for graphml json unicode treatment
addresses #1880
* Change read_graphml and parse_graphml docstring
Fixes #1398
* Update LXML writer to include attributes, work with py36 etc.
Set LXML as default write_graphml if present.
Fixes #448 using code from #1219
* Attempt to get travis to load lxml.
* Correct testing both xml and lxml writers in graphml
* skip docstring test
|
| |
|
|
|
|
| |
Combing through the code for any point where it pushes a dictionary to
the add_node method rather than keywords; augmenting these arguments
with ** to turn them into keyword arguments.
|
| | |
|
| | |
|
| | |
|