Skip to content

Commit 8baf8fb

Browse files
authored
Merge pull request #6 from robinharms/master
Py3-version with working packaging
2 parents afd6f1c + ce4aed8 commit 8baf8fb

59 files changed

Lines changed: 1665 additions & 1329 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.coveragerc

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
# fail-fast: true
10+
max-parallel: 5
11+
matrix:
12+
python-version: ['3.10', '3.11', '3.12', '3.13']
13+
os: [ ubuntu-latest, macos-latest ]
14+
steps:
15+
- uses: actions/checkout@v3
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v3
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
- name: Install dependencies
21+
run: |
22+
pip install --upgrade pip poetry
23+
poetry install --with dev
24+
- name: PyTest testrunner
25+
run: |
26+
poetry run pytest

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ __pycache__
1111
*.wpr
1212
*.wpu
1313
.venv
14+
.coverage
15+
venv/

.travis.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

Changelog

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ A library for working with graphs in Python
44

55
CHANGELOG
66

7-
Unreleased:
7+
Unreleased 2.0.0:
8+
9+
Backwards incompatibilities:
10+
Needs at least python3.10
11+
Package unified, install pydot if you need it or install python-graph[dot]
812

913
Enhancements:
1014
New location, and new main maintainers.
@@ -13,7 +17,7 @@ Enhancements:
1317
Make shortest_path (Dijkstra's algorithm) run in O(E log V) instead of O(E^2) (dkorduban)
1418
Make graph.add_edge run in O(1) instead of O(degree(V)) (dkorduban)
1519
Added implementation of Kruskal's Minimum Spanning Tree construction algorithm (goldragoon)
16-
20+
Repackaged and updated to python3 (robinharms)
1721

1822
Release 1.8.2 [July 14, 2012]
1923

Makefile renamed to Makefile.old

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# python-graph
22
# Makefile
3+
# Note! This file is only kept as a reference
34

45

56
# Module directories -------------------------------------------------

README.rst

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,11 @@
22
python-graph
33
============
44

5-
.. image:: https://travis-ci.org/Shoobx/python-graph.png?branch=master
6-
:target: https://travis-ci.org/Shoobx/python-graph
7-
8-
.. image:: https://coveralls.io/repos/github/Shoobx/python-graph/badge.svg?branch=master
9-
:target: https://coveralls.io/github/Shoobx/python-graph?branch=master
10-
11-
.. image:: https://img.shields.io/pypi/v/python-graph-core.svg
12-
:target: https://pypi.org/project/python-graph-core/
13-
14-
.. image:: https://img.shields.io/pypi/pyversions/python-graph-core.svg
15-
:target: https://pypi.org/project/python-graph-core/
16-
17-
.. image:: https://api.codeclimate.com/v1/badges/8e78b3479160f2c5cdd0/maintainability
18-
:target: https://codeclimate.com/github/Shoobx/python-graph/maintainability
19-
:alt: Maintainability
205

216
A library for working with graphs in Python
227
-------------------------------------------
238

24-
This software provides a suitable data structure for representing graphs and a
9+
This software provides a suitable data structure for representing graphs and a
2510
whole set of important algorithms.
2611

2712

@@ -30,27 +15,41 @@ INSTALLING
3015

3116
To install the core module, run:
3217

33-
make install-core
18+
.. code-block::
19+
20+
pip install python-graph
3421
3522
To install the dot language support, run:
3623

37-
make install-dot
24+
.. code-block::
3825
39-
Alternatively, if you don't have make, you can install the modules by running:
26+
pip install python-graph[dot]
4027
41-
./setup.py install
28+
If you want the development version, use poetry. This will also install pytest and pydot.
4229

43-
inside the module directory.
30+
.. code-block::
4431
32+
pip install poetry
33+
poetry install --with dev
4534
46-
DOCUMENTATION
47-
-------------
35+
And to run tests:
4836

49-
To generate the API documentation for this package, run:
37+
.. code-block::
5038
51-
make docs
39+
pytest
40+
41+
Coverage has some defaults set so simply run:
42+
43+
.. code-block::
44+
45+
coverage run
46+
coverage report
47+
48+
49+
DOCUMENTATION
50+
-------------
5251

53-
You'll need epydoc installed in your system.
52+
FIXME: Module documentation isn't available
5453

5554

5655
WEBSITE
@@ -147,6 +146,9 @@ Daniel Merritt <dmerritt@gmail.com>
147146
Sandro Tosi <morph@debian.org>
148147
* Some improvements to Makefile
149148

149+
Robin Harms Oredsson <robin@betahaus.net>
150+
* Py3-fixes and modern distribution.
151+
* Unified package with optional install instead.
150152

151153
LICENSE
152154
-------

core/setup.py

Lines changed: 0 additions & 27 deletions
This file was deleted.

dot/pygraph/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

dot/pygraph/readwrite/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)