summaryrefslogtreecommitdiff
path: root/networkx/readwrite/graph6.py
Commit message (Collapse)AuthorAgeFilesLines
* Use generator to limit memory footprint of read_graph6. (#6519)Ross Barnowski2023-03-191-1/+1
|
* Remove old Appveyor cruft (#5924)Jarrod Millman2022-08-111-2/+2
| | | | | * Remove old Appveyor cruft * Fix Windows issue
* Use isort with pre-commit to enforce import guidelines (#5659)Mridul Seth2022-06-021-1/+1
| | | | | * Add isort to pre-commit * Run isort on all python files (except __init__.py ones)
* Don't use graph6 with directed graphs (#5443) (#5444)Riccardo Bucco2022-03-311-0/+2
| | | | | | | * Don't use graph6 with directed graphs (#5443) * Parametrize graph6 tests * Test graph6 on multigraphs
* Update black (#5438)Mridul Seth2022-03-291-1/+1
| | | | | | | * CI: sync up black dev requirements version with precommit * Run black Co-authored-by: Jarrod Millman <jarrod.millman@gmail.com>
* Format python in docstrings (#4168)Jarrod Millman2020-08-191-3/+3
| | | | | | | | | | | | | | | | | | | * 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-101-22/+38
|
* MAINT: Update from_graph6_bytes arg/docs. (#4034)Ross Barnowski2020-07-051-8/+8
| | | | | | The argument for from_graph6_bytes was originally named "string" but the function expected a bytes object. Fixes the mismatch between implementation and naming convention by updating argument name from "string" to "bytes_in". Updates associated docstring accordingly.
* Convert %-format to fstringJarrod Millman2020-01-011-1/+1
|
* Remove boiler plate from top of modulesJarrod Millman2019-11-111-10/+0
| | | | | | | | | 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 unused importsJarrod Millman2019-10-181-1/+0
|
* Enable more doctestsJarrod Millman2019-10-181-3/+3
|
* Remove old Python 2 codeJarrod Millman2019-10-181-4/+1
|
* Update copyrightJarrod Millman2019-03-301-1/+1
|
* Replacing `Return` to `Returns` in docs for functions (#3301)Moradnejad2019-02-181-1/+1
| | | | | | * Fixed problem in documentation view of this function * Replacing `Return` to `Returns` in function docs
* Pep8 fixesJarrod Millman2018-01-201-14/+14
|
* Update copyrightJarrod Millman2018-01-201-1/+1
|
* Merge branch 'jfinkels-reduce-memory-graph6'Aric Hagberg2017-11-251-96/+207
|\
| * Fixes #2739 additional bugAric Hagberg2017-11-251-2/+2
| | | | | | | | Use sorted graph to find edges. Includes tests.
| * Makes write_graph6 less memory-intensive.Jeffrey Finkelstein2016-12-151-96/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes the implementation of the `write_graph6` function so that it makes better use of iterators and writes directly to file instead of buffering the entire encoding of the graph as a string in memory before writing. This commit also removes the `generate_graph6` function, since it's functionality can be simulated by using the `write_graph6` function to write to a file. This change requires updating the code to explicitly require `bytes` when reading and writing graph6 data. This means updating `sparse6` code as well. Finally, this commit standardizes the graph6 and sparse6 encoding/decoding functions into four functions each: `to_graph6_bytes`, `from_graph6_bytes`, `read_graph6`, and `write_graph6`, and the corresponding functions for sparse6.
* | Update copyrightJarrod Millman2017-07-251-1/+1
|/
* Fix test ordering in readwriteAric Hagberg2016-07-311-4/+3
| | | | | | | | | | Some interesting finds here and one that I don't understand. Using OrderedGraph is helpful in writing tests of output to get deterministic order. But OrderedDict __repr__ is 'OrderedDict()' so I made an ugly modification in generate_edgelist. I don't understand why the sparse6 write requires the sorted order to pass the tests. There might be a bug here. I fixed a bug in graph6 where the nodes needed to be sorted
* Remove sphinx errors that have crept in.Dan Schult2016-04-141-1/+1
| | | | Also remove outdated sphinx.ext.pngmath (RTD uses mathjax now)
* Cleans documentation for graph6 and sparse6 I/O.Jeffrey Finkelstein2016-02-171-23/+27
|
* Update copyrightsMridul Seth2016-01-011-1/+1
|
* Fix copyrightsJGab2015-04-211-1/+1
|
* Ensure that graph6 and sparse6 tests do no leave behind temporary filesYingchong Situ2014-10-301-0/+6
|
* Add back linefeed on writeAric Hagberg2013-12-151-1/+2
|
* Typos, spell checkAric Hagberg2013-12-151-2/+2
|
* Fix StringIO to work with python2/3Aric Hagberg2013-12-151-6/+3
|
* Add nodes argumentAric Hagberg2013-12-151-6/+1
|
* Add docuementation, formattingAric Hagberg2013-12-151-28/+160
|
* Drop *list functions in graph6Aric Hagberg2013-12-151-27/+13
| | | | Use read_graph6 instead of read_graph6_list
* Split sparsegraph6 into sparse6 and graph6Aric Hagberg2013-12-131-0/+179