Skip to content

Commit

Permalink
Add README badges (#26)
Browse files Browse the repository at this point in the history
* Remove old config files for Gitpod and Readthedocs.

* Update license year.

* Remove build and publish targets (now using Actions).

* Poetry update.

* Add badges and remove old demo from README.
  • Loading branch information
MHenderson authored Nov 4, 2024
1 parent 0ef0f25 commit 20a9d8f
Show file tree
Hide file tree
Showing 6 changed files with 478 additions and 392 deletions.
10 changes: 0 additions & 10 deletions .gitpod.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .readthedocs.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Matthew Henderson
Copyright (c) 2024 Matthew Henderson

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
5 changes: 0 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,3 @@ install:
test:
poetry run pytest

build:
poetry build

publish:
poetry publish
23 changes: 5 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
# listcolouring
List colouring in Python with NetworkX.

```python
import networkx as nx
import matplotlib.pyplot as plt
[![PyPI version](https://badge.fury.io/py/listcolouring.svg)](https://badge.fury.io/py/listcolouring)
![python package](https://github.com/MHenderson/listcolouring/actions/workflows/python-package.yml/badge.svg)
![python publish](https://github.com/MHenderson/listcolouring/actions/workflows/python-publish.yml/badge.svg)

import listcolouring
from listcolouring import list_init, greedy_list_edge_colouring, print_list_edge_colouring

G = nx.petersen_graph()
# listcolouring

G = list_init(G, range(0, 10), 3, 0)
G = greedy_list_edge_colouring(G)

options = {'with_labels': True, 'node_color': "white"}
colors = nx.get_edge_attributes(G,'colour').values()
nx.draw_shell(G, nlist = [range(5, 10), range(5)], edge_color = colors, **options)
List colouring of graphs in Python.

plt.savefig("img/petersen-shell.png", format = "PNG"
```
Loading

0 comments on commit 20a9d8f

Please sign in to comment.