| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
(#6040)
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
* Add test that fails with current default ('None')
* Update default alpha value.
Co-authored-by: Dan Schult <dschult@colgate.edu>
---------
Co-authored-by: Dan Schult <dschult@colgate.edu>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
* Run linter
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add graph_str
Formatted
Fix bug in choosing the source
Fix test
* Fixed issue in choosing source verticies for directed graphs
* reasonable working state
* Fixed logic issues
Fix test, cleanup, formatting
more tests, better comments, fix parent labels
fix pypy issue
Fix format
* Fixes based on review
* Cleaned up test names
* Use open_file decor and remove graph_str
* Remove useage of forest_str from doctest
* Fix style
* style
* Update networkx/readwrite/text.py
Co-authored-by: Dan Schult <dschult@colgate.edu>
* Fixed half sentense
* Add max_depth
* moved comment position
* Describe max depth in algo description
* Allow with_labels to be specified as a str
* Update networkx/readwrite/text.py
Co-authored-by: Mridul Seth <mail@mriduls.com>
* Add network text autodoc stub
* Add removal note for forest_str
---------
Co-authored-by: Dan Schult <dschult@colgate.edu>
Co-authored-by: Mridul Seth <mail@mriduls.com>
|
| |
|
| |
Minor formatting fixups to get rid of doc build warnings.
|
| |
|
|
|
| |
* Fix_Typos
* Commit_Suggestions
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fixes #6036
* test load centrality
* test dispersion
* test dispersion
* dispersion test
* test dispersion
* bug-fixes-for-issue-6088
* deleted
* fixes for 5911
* bugfix for 5911
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(#6093)
* Add failing test for empty list corner case.
* Rm test case that rejects empty lists as attributes.
* Beef up test by checking full round-trip.
* Modify gml parsing to handle empty lists.
* Parametrize test: lists and tuples.
|
| |
|
| |
Fixes gh-5981: Add missing asserts to tests
|
| |
|
| |
Propose to make new node_link args kwarg only.
|
| |
|
|
|
| |
* Bump deprecation expiration for nodelink params to v3.2.
* Fixup warnings filter.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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 Appveyor cruft
* Fix Windows issue
|
| |
|
|
|
|
| |
Removes the deprecated OrderedGraph classes.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Dan Schult <dschult@colgate.edu>
|
| |
|
|
|
|
|
|
| |
* Remove pyyaml dependency
* Make mypy happy.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Mridul Seth <seth.mridul@gmail.com>
|
| |
|
|
|
|
|
|
| |
* Remove gdal dependency
* [skip ci] Rm mention of gdal from roadmap.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Mridul Seth <seth.mridul@gmail.com>
|
| | |
|
| | |
|
| |
|
| |
update cytoscape functions with new signature
|
| |
|
| |
Co-authored-by: dtuncturk <dilaramemis@sabanciuniv.edu>
|
| |
|
|
|
| |
* Add isort to pre-commit
* Run isort on all python files (except __init__.py ones)
|
| | |
|
| |
|
|
|
|
|
| |
* Don't use graph6 with directed graphs (#5443)
* Parametrize graph6 tests
* Test graph6 on multigraphs
|
| |
|
|
|
|
|
| |
* CI: sync up black dev requirements version with precommit
* Run black
Co-authored-by: Jarrod Millman <jarrod.millman@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
* Add _to_tuple private fn to node_link.py.
* Deprecate utils.misc.to_tuple.
* Add deprecation note.
* Add release note.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Add deprecated directive to reversed docstring.
* Add missing dep directives to shpfiles.
* Remove defn of INF sentinel.
* typo.
* str -> comment in forloop.
* STY: appropriate casing for var name.
|
| |
|
| |
[ci skip]
|
| | |
|
| |
|
| |
Hi, we've recently put the GEXF website again into its own domain http://gexf.net/ so this documentation should be updated. Thanks!
|
| |
|
|
|
|
|
| |
* Rm deprecated scipy subpkg access.
* Use recwarn fixture in place of deprecated pytest pattern.
* Rm unnecessary try/except from tests.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Drop Py37
* XML serialization issue
* Use math.comb
Co-authored-by: Simone Gasperini <simone.gasperini2@studio.unibo.it>
* Run pyupgrade --py38-plus
* Run black
* More documentation
* Deprecate euclidean
Co-authored-by: Simone Gasperini <simone.gasperini2@studio.unibo.it>
|
| |
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
| |
* Add support for comments=None in parse_edgelist.
* Update docstrings.
* if instead of try/except.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add greedy algorithm for solving TSP
Many problems of Combinational Optimization can be represented as
graphs.
These problems have enormous significance in many aspects of science,
but there are not any algorithms to solve some of them in polynomial
time.
However many, heuristic and metaheuristic algorithms have been published
over the past years in order to solve / approximate the solutions to
these problems.
The purpose of this commit is to add implementation of such algorithms
for solve one of the most famous problems of Combinational
Optimizations, Travelling Salesman Problem (TSP). A greedy algorithm has
been implemented at the moment for this reason.
"applications" package has been created which include modules that
represent a problem.
Each module contains several algorithms for solving the specific
problem.
At this commit, tsp.py module is added which contains greedy_tsp()
function; a implementation of a greedy algorithm.
* Fix example error
* Trivial changes
List of changes:
Removal of unnesecary _is_weighted() function
Improvements on documentation
* Add applications package to setup.py file
* Change output of greedy algorithm
Algorithm's output is a list of nodes now
* Add simulated annealing algorithm
Add a metaheuristic local search algorithm for solving TSP
* Minor changes
* Fix example doc errors
* Compatible with python 3
* Move tsp module to algorithms package
* Code improvements
* Handle small graphs and fix doc examples
* Documentation changes and rename variables
* Adds Threshold Accepting algorithm for TSP
* Implemented maximal matching of minimal weight and created test suite.
* Removed useless print
* Implemented Christofides.
* Coding was missing
* Add more general traveling_salesman_problem using christofides
Also reconfigure import structure and remove min_weight_matching from
module since it is now in matching.py
* Add new functions to the docs and minor typos
* pep8 fixes
* fix pep8 and change .gitignore
* Add tests of the approximation namespace
update docs in approximation/__init__.py
* Fix is_matching to check if edges in G. Other tweaks:
doc changes
and put not_implemented_for on find_matching functions
* Improve is_matching selfloop handling and expand tests
* Move tsp to approximation directory. Apply black.
* Move tsp tests to approximation tests folder
* Attempt to bring tsp up to current code.
* commit pep8 that my black didnt change, but pep8speaks did find. ??
* tweak a few things and run black
* combine #4083 and #3585 into traveling_salesman.py
* Match chistofides output to other tsp functions
and adjust calling syntax of tests
tweak docs
tweak see also section
* Put big-O complexity in in-line math env.
Prevents sphinx from trying to do variable substitution between
pipes.
* Minor touchups to christofides docstring.
* RST touchups to tsp module docstring.
* Rm extra string from tsp module.
* Docstring touchups for traveling_salesman_problem.
* rst fixups for greedy_tsp docstring.
* rst formatting for simulated annealing docstring.
* More math in-lining for simulated annealing docstring.
* rst and minor grammatical fixes to TA docstring.
* Fix path-finding and test all methods for tsp function
* the refactoring was incomplete. Now maybe is
- Add tests of TSP with all methods.
- Refactor tests to match simulated_annealing tests and threshold tests.
- Unify treatment of weight so unweighted edges use default weight 1.
weight now defaults to "weight" with a default value of 1.
- Rename tolerance to max_iterations (tolerance is used for error bound)
- Rename iterations to N_inner (each iteration takes this many inner loops)
- Introduce idioms like `pairwise` and `cycle.copy()` (over cycle[:])
- Allow passthrough of method kwargs for traveling_salesman_problem
Still need to:
- add test of case where path is more than one edge less that cycle
(incomplete_graph)
- require cycle input (maybe make default list(G)??)
- consider the complexity claims in the doc_strings
* More api changes to TSP functions
- `chritofides` now allows (and ignores) selfloops
- `move` can be a function as well as "1-1" and "1-0"
- `method` for traveling_salesman_problem must have 2 arguments
instead of passing kwargs. User must "curry" to set parameters
- changed doc_string typos in matching.py
* Add test to check that cycle=False can remove many edges
* Change init_cycle api to require input from user
The idea is to make the user specify the initial cycle to start from
rather than relying on the programmers default of a greedy algorithm.
To easy usage, I check for a string "greedy" as a shortcut.
* Update docs with more correct complexity info.
* Check for complete graph now more efficient and selfloops ignored
* merge is_matching changes
* New Networkx changes
* Stub for Asadpour. Needed to create GSoC PR
* Update to integrate changes from main
* Added function stubs and draft docstrings for the Asadpour algorithm
* Skeleton classes and methods for tree iterators
* Attempting to set up basic tests for MST of a partition
* testing
* I'm not entirly sure how the commit hook works...
* Moved iterators into the correct files to maintain proper codebase visibility
* Including Black reformat
* Revert "Merge branch 'networkx:main' into main"
This reverts commit 0616a2331adfcc02976d305937aa52272ed48266, reversing
changes made to 1ea769371f54c4c6f9a51f860caf4a60aef7d094.
* Trying to merge again
* Attempting to merge (4)
* Now passes all tests except test_namespace_alias in /tests/test_import.py
* Everything should FINALLY pass (I wipped my networkx dir and re-download from upstream)
* reinstall the pre-commit hook
* Grabbing black reformats
* Working on debugging ascent method plus black reformats
* Ascent method terminating, but at non-optimal solution
* minor edits
* Fixed termination condition, still given non-optimal result
* Minor bugfix, still non-optimal result
* Fixed subtle bug in find_epsilon()
* Cleaned code and tried something which didn't work
* Modified the ArborescenceIterator to accept init partition
* Black formats
* Branch and bound returning optimal solution
* Working Ascent method, code needs cleaning
* black formatting changes
* Performance tweaks and testing fractional answers
* Fixed test bug, I hope
* Asadpour output for ascent method
* Fixed numpy imports crashing pypi tests
* Removed branch and bound method. One unit test misbehaving
* Added asymmetric fractional test for the ascent method
* Removed printn statements and tweaked final test to be more asymmetric
* Draft of spanning_tree_distribution
* Black changes
* Changed HK to only report on the support of the answer
* Fixed contraction bug by changing to MultiGraph. Problem with prob > 1
* Black reformats
* Fixed pypi test error
* Further testing of dist fix
* Can sample spanning trees
* Developing test for sampling spanning tree
* Changed sample_spanning_tree test to Chi squared test
* Tweaked signifiance level
* Found true minimum sample size
* fixed typo
* untested implementation of asadpour_tsp
* Fixed issue reading flow_dict
* Fixed runtime errors in asadpour_tsp
* black reformats
* Adding test cases
* documentation update
* Fixed rounding error with tests
* One new test and check
* Documentation update for the iterators
* Attempting to fix class documentation
* Pull out the style changes into a separate branch
* fix mixed history
* more
Co-authored-by: Thodoris Sotiropoulos <theosotr@windowslive.com>
Co-authored-by: Luca Cappelletti <cappelletti.luca94@gmail.com>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: mjschwenne <mjschwenne@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
* fix typo
* fix pyyaml typo
* Apply changes to other relevant __getattrs__.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
| |
* Added security warning to gefx parser
* apply proposed changes from other pull request.
|
| |
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
| |
* Added security warning to the pickle documentation
This text should warn developers about the risks involved using this format.
* add changed proposed from other pull request
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update read_gml docstring with destringizer ex
Responding to issue 4877 by adding a simple destringizer example to the
read_gml docstring.
* Update doc strings
The documentation stated that the code can read data types other than
str without specifying a destringizer. While the code can write several
other data types, a destringizer is required for any type other than
str. The documentation is repeated in the file and was updated in all 5
places: the gml.py module docstring, as well as the read_gml, parse_gml,
generate_gml, and write_gml docstrings.
Co-authored-by: Randy Weaver <randyweaver@randys-mbp.attlocal.net>
|
| |
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
| |
* Fix links, use DOI links, wayback machine where required
* Add nx-guides to intersphinx mapping.
* Replace external mpl link w/ intersphinx.
* Update mpl intersphinx mapping.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|