Science Score: 54.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 6 committers (16.7%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.5%) to scientific vocabulary
Keywords
Repository
Isomorphism testing and automorphisms of graphs
Basic Info
Statistics
- Stars: 64
- Watchers: 8
- Forks: 10
- Open Issues: 9
- Releases: 0
Topics
Metadata Files
README.md
Pynauty
Pynauty can be used to compare graphs for isomorphism and to determine their automorphism group in a Python programming environment. Pynauty is a Python/C extension module using library components from the Nauty package by Brendan McKay.
Current version is distributed and has been tested with nauty2_8_8.
Usage
Here is an example of pynauty's usage in an interactive session.
```python
from pynauty import * g = Graph(5) g.connectvertex(0, [1, 2, 3]) g.connectvertex(2, [1, 3, 4]) g.connectvertex(4, [3]) print(g) Graph(numberofvertices=5, directed=False, adjacencydict = { 0: [1, 2, 3], 2: [1, 3, 4], 4: [3], }, vertex_coloring = [ ], ) autgrp(g) ([[3, 4, 2, 0, 1]], 2.0, 0, [0, 1, 2, 0, 1], 3)
g.connect_vertex(1, [3]) autgrp(g) ([[0, 1, 3, 2, 4], [1, 0, 2, 3, 4]], 4.0, 0, [0, 0, 2, 2, 4], 3)
g.setvertexcoloring([set([3])]) print(g) Graph(numberofvertices=5, directed=False, adjacencydict = { 0: [1, 2, 3], 1: [3], 2: [1, 3, 4], 4: [3], }, vertexcoloring = [ set([3]), set([0, 1, 2, 4]), ], ) autgrp(g) ([[1, 0, 2, 3, 4]], 2.0, 0, [0, 0, 2, 3, 4], 4)
```
Please note that multigraphs are not supported, but this limitation can be worked around by encoding multigraphs as simple graphs. For details, see the documentation and Nauty's manual.
Installation
Installing from PyPi
You can install pynauty using pip, just type
bash
pip install --upgrade pynauty
Many binary wheels are provided for recent Linux and macOS systems.
When your system is not compatible with any of the provided binary
wheels pip attempts to build the wheel of the extension module in your
local system. This happens automatically and the process is transparent
to the user. For local builds pip expects that the required
tools are available.
You can force the local (re)compilation during install by issuing
bash
pip install --no-binary pynauty pynauty
Regardless of which way the installation was accomplished, afterwards you can test the result by running the provided tests.
bash
python <path-to-installed-package>/pynauty/tests/test_minimal.py
If you have pytest installed then you can run the full test suit by
issuing
bash
pip install pytest
python -m pytest <path-to-installed-package>/pynauty
That takes a few seconds but then you can be sure in having a binary compatible module.
Documentation
The pynauty package comes with an HTML documentation with examples.
You can read it with your favorite browser:
bash
<your-browser> <path-to-installed-package>/pynauty/docs/html/index.html
Building manually from sources
Requirements
Apart from Python the requirements are the same as for building Nauty.
- Python 3.8 - 3.12
- An ANSI C compiler
- GNU make
Download sources
You can download the source distribution form PyPi by issuing:
bash
pip download --no-binary pynauty pynauty
Please note, the source distribution also contains Nauty288's source.
Build, test, install
If you really are interested in the low level details then unpack the
downloaded source distribution, change into pynauty's directory and
type make. The Makefile is self-documenting in the sense that
invoking make without arguments will list all available targets with
short explanations.
Contributing
Questions, bug reports, pull requests, especially the ones extending the Python module's functionality, are welcome. Please, open an issue first to discuss what you would like to change.
Pull requests must be made on a dedicated topic-branch of your choice
and not against upstream/main. Before submitting a pull request, make
sure that your fork is up to date with upstream. Also update tests,
documentation, examples as appropriate with the changes in your PR.
Contributors
@goens helped creating
pytestcomponents.Sam Morley-Short (@sammorley-short) added
canon_label()function.Frank Bryce fixed the issue of misleadingly accepting multigraphs.
License
Pynauty is distributed under the terms of GPL v3 WITHOUT ANY WARRANTY.
For the exact details on licensing see the file COPYING.
Please note, Nauty is covered by its own licensing terms. For the exact
details see the file src/nauty2_8_8/COPYRIGHT.
Owner
- Name: Peter Dobsan
- Login: pdobsan
- Kind: user
- Twitter: pdobsan
- Repositories: 3
- Profile: https://github.com/pdobsan
Citation (CITATION.cff)
# YAML 1.2
---
abstract: "The Pynauty Python/C extension module can be used to compare graphs for isomorphism and to determine their automorphism group in a Python programming environment."
authors:
-
family-names: Dobsan
given-names: Peter
cff-version: "2.8.x"
date-released: 2022 November
keywords:
- "Graph Theory"
- "Group Theory"
- "Scientific Computing"
license: "GNU General Public License version 3 or any later version"
message: "If you use this software, please cite it using these metadata."
repository-code: "https://github.com/pdobsan/pynauty"
title: Pynauty
version: "2.8.x"
...
GitHub Events
Total
- Issues event: 3
- Watch event: 11
- Issue comment event: 3
- Fork event: 1
Last Year
- Issues event: 3
- Watch event: 11
- Issue comment event: 3
- Fork event: 1
Committers
Last synced: almost 3 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Peter Dobsan | p****n@g****m | 176 |
| Peter Dobsan | p****n@u****m | 12 |
| Sam Morley-Short | s****t@g****m | 5 |
| Andres Goens | g****s@g****e | 4 |
| Doug Torrance | d****e@p****u | 1 |
| Frank Bryce | j****7@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: over 1 year ago
All Time
- Total issues: 30
- Total pull requests: 13
- Average time to close issues: about 2 months
- Average time to close pull requests: 4 days
- Total issue authors: 26
- Total pull request authors: 6
- Average comments per issue: 3.0
- Average comments per pull request: 1.46
- Merged pull requests: 7
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 8
- Pull requests: 2
- Average time to close issues: 24 days
- Average time to close pull requests: 1 day
- Issue authors: 8
- Pull request authors: 1
- Average comments per issue: 1.5
- Average comments per pull request: 1.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- pdobsan (4)
- yurivict (2)
- chiyuri (1)
- JonathonMisiewicz (1)
- FruitfulApproach (1)
- goens (1)
- DaveDRoberts (1)
- Viech (1)
- tueboesen (1)
- sammorley-short (1)
- thomasahle (1)
- BaseMax (1)
- kaushikcfd (1)
- robkh (1)
- Over-TheRainbow (1)
Pull Request Authors
- goens (6)
- toonijn (4)
- pdobsan (2)
- d-torrance (1)
- sammorley-short (1)
- frankbryce (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- pypi 1,676 last-month
- Total docker downloads: 388
-
Total dependent packages: 3
(may contain duplicates) -
Total dependent repositories: 6
(may contain duplicates) - Total versions: 12
- Total maintainers: 1
pypi.org: pynauty
Isomorphism testing and automorphisms of graphs.
- Homepage: https://github.com/pdobsan/pynauty
- Documentation: https://pynauty.readthedocs.io/
- License: GNU General Public License v3
-
Latest release: 2.8.6
published over 3 years ago
Rankings
Maintainers (1)
conda-forge.org: pynauty
Pynauty can be used to compare graphs for isomorphism and to determine their automorphism group in a Python programming environment. Pynauty is a Python/C extension module using library components from the Nauty package by Brendan McKay.
- Homepage: https://github.com/pdobsan/pynauty
- License: GPL-3.0-or-later
-
Latest release: 1.1.2
published over 3 years ago
Rankings
Dependencies
- actions/checkout v2 composite
- actions/setup-python v2 composite
- actions/checkout v2 composite
- egor-tensin/setup-cygwin v3 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite