Skip to content

Commit

Permalink
Mark 3.12 support in release
Browse files Browse the repository at this point in the history
Also upgrade pre-commit configuration and fix
a warning from flake8
  • Loading branch information
ronaldoussoren committed Sep 25, 2023
1 parent e288b53 commit fc154b5
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 28 deletions.
26 changes: 13 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ default_language_version:
python: python3.9
repos:
- repo: https://github.com/psf/black
rev: 22.8.0
rev: 23.9.1
hooks:
- id: black
# override until resolved: https://github.com/ambv/black/issues/402
files: \.pyi?$
types: []

- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
exclude: ^altgraph_tests/
Expand All @@ -23,19 +23,19 @@ repos:
- flake8-mutable
- flake8-todo

- repo: https://github.com/asottile/seed-isort-config
rev: v2.2.0
hooks:
- id: seed-isort-config
# - repo: https://github.com/asottile/seed-isort-config
# rev: v2.2.0
# hooks:
# - id: seed-isort-config

- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1
hooks:
- id: isort
additional_dependencies: [toml]
# - repo: https://github.com/pre-commit/mirrors-isort
# rev: v5.10.1
# hooks:
# - id: isort
# additional_dependencies: [toml]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand Down
6 changes: 0 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ graphviz output.
altgraph includes some additional usage of Python 2.6+ features and
enhancements related to modulegraph and macholib.

CI status
---------

.. image:: https://github.com/ronaldoussoren/altgraph/workflows/Lint/badge.svg
.. image:: https://github.com/ronaldoussoren/altgraph/workflows/Test/badge.svg

Project links
-------------

Expand Down
4 changes: 2 additions & 2 deletions altgraph/Dot.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def save_dot(self, file_name=None):
"""

if not file_name:
warnings.warn(DeprecationWarning, "always pass a file_name")
warnings.warn(DeprecationWarning, "always pass a file_name", stacklevel=2)
file_name = self.temp_dot

with open(file_name, "w") as fp:
Expand All @@ -299,7 +299,7 @@ def save_img(self, file_name=None, file_type="gif", mode="dot"):
"""

if not file_name:
warnings.warn(DeprecationWarning, "always pass a file_name")
warnings.warn(DeprecationWarning, "always pass a file_name", stacklevel=2)
file_name = "out"

if mode == "neato":
Expand Down
2 changes: 1 addition & 1 deletion altgraph/GraphStat.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def degree_dist(graph, limits=(0, 0), bin_num=10, mode="out"):
return results


_EPS = 1.0 / (2.0 ** 32)
_EPS = 1.0 / (2.0**32)


def _binning(values, limits=(0, 0), bin_num=10):
Expand Down
1 change: 0 additions & 1 deletion altgraph_tests/test_graphstat.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def test_simple(self):

class TestBinning(unittest.TestCase):
def test_simple(self):

# Binning [0, 100) into 10 bins
a = list(range(100))
out = GraphStat._binning(a, limits=(0, 100), bin_num=10)
Expand Down
6 changes: 3 additions & 3 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ def get_version():
master_doc = "index"

# General information about the project.
project = u"altgraph"
copyright = u"2010-2011, Ronald Oussoren, Bob Ippolito, 2004 Istvan Albert"
project = "altgraph"
copyright = "2010-2011, Ronald Oussoren, Bob Ippolito, 2004 Istvan Albert"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -185,7 +185,7 @@ def get_version():
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
("index", "altgraph.tex", u"altgraph Documentation", u"Ronald Oussoren", "manual")
("index", "altgraph.tex", "altgraph Documentation", "Ronald Oussoren", "manual")
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[x-metadata]
name = altgraph
version = 0.17.3
version = 0.17.4
description = Python graph (network) package
long_description_file =
README.rst
Expand Down Expand Up @@ -28,6 +28,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Software Development :: Libraries :: Python Modules
Topic :: Scientific/Engineering :: Mathematics
Topic :: Scientific/Engineering :: Visualization
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = isort,black,py27,py37,py38,py39,py310,py311,flake8,coverage-report
envlist = py27,py37,py38,py39,py310,py311,py312,flake8,coverage-report

[testenv]
commands = {envbindir}/python -m coverage run --parallel setup.py test
Expand Down

0 comments on commit fc154b5

Please sign in to comment.