Skip to content

Commit

Permalink
Significant cleanup x 1.
Browse files Browse the repository at this point in the history
This commit is the first in a commit chain quietly resurrecting BETSE
for a modern audience and the modern Python ecosystem. Specifically,
this commit:

* Resolves all deprecation warnings issued by Matplotlib and NumPy when
  running the `betse info` subcommand.
* Bumps our mandatory runtime dependencies to Matplotlib 3.9.0 and
  NumPy 2.0.0 to avoid issues with newly introduced APIs.
* Bumps all copyright preambles throughout the codebase.

(*Elation station!*)
  • Loading branch information
leycec committed Sep 10, 2024
1 parent 5da9c54 commit c121237
Show file tree
Hide file tree
Showing 310 changed files with 408 additions and 375 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# --------------------( LICENSE )--------------------
# Copyright 2014-2023 by Alexis Pietak & Cecil Curry.
# Copyright 2014-2025 by Alexis Pietak & Cecil Curry.
# See "LICENSE" for further details.
#
# --------------------( SYNOPSIS )--------------------
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2014-2023 by Alexis Pietak & Cecil Curry.
Copyright 2014-2025 by Alexis Pietak & Cecil Curry.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion betse/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# --------------------( LICENSE )--------------------
# Copyright 2014-2023 by Alexis Pietak & Cecil Curry.
# Copyright 2014-2025 by Alexis Pietak & Cecil Curry.
# See "LICENSE" for further details.

'''
Expand Down
2 changes: 1 addition & 1 deletion betse/__main__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# --------------------( LICENSE )--------------------
# Copyright 2014-2023 by Alexis Pietak & Cecil Curry.
# Copyright 2014-2025 by Alexis Pietak & Cecil Curry.
# See "LICENSE" for further details.

'''
Expand Down
2 changes: 1 addition & 1 deletion betse/appmeta.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# --------------------( LICENSE )--------------------
# Copyright 2014-2023 by Alexis Pietak & Cecil Curry.
# Copyright 2014-2025 by Alexis Pietak & Cecil Curry.
# See "LICENSE" for further details.

'''
Expand Down
2 changes: 1 addition & 1 deletion betse/cli/__main__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# --------------------( LICENSE )--------------------
# Copyright 2014-2023 by Alexis Pietak & Cecil Curry.
# Copyright 2014-2025 by Alexis Pietak & Cecil Curry.
# See "LICENSE" for further details.

'''
Expand Down
2 changes: 1 addition & 1 deletion betse/cli/cliinfo.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# --------------------( LICENSE )--------------------
# Copyright 2014-2023 by Alexis Pietak & Cecil Curry.
# Copyright 2014-2025 by Alexis Pietak & Cecil Curry.
# See "LICENSE" for further details.

'''
Expand Down
2 changes: 1 addition & 1 deletion betse/cli/climain.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# --------------------( LICENSE )--------------------
# Copyright 2014-2023 by Alexis Pietak & Cecil Curry.
# Copyright 2014-2025 by Alexis Pietak & Cecil Curry.
# See "LICENSE" for further details.

'''
Expand Down
2 changes: 1 addition & 1 deletion betse/data/yaml/INITS/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# --------------------( LICENSE )--------------------
# Copyright 2014-2023 by Alexis Pietak & Cecil Curry.
# Copyright 2014-2025 by Alexis Pietak & Cecil Curry.
# See "LICENSE" for further details.
#
# --------------------( SYNOPSIS )--------------------
Expand Down
2 changes: 1 addition & 1 deletion betse/data/yaml/RESULTS/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# --------------------( LICENSE )--------------------
# Copyright 2014-2023 by Alexis Pietak & Cecil Curry.
# Copyright 2014-2025 by Alexis Pietak & Cecil Curry.
# See "LICENSE" for further details.
#
# --------------------( SYNOPSIS )--------------------
Expand Down
2 changes: 1 addition & 1 deletion betse/data/yaml/RESULTS/init_1/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# --------------------( LICENSE )--------------------
# Copyright 2014-2023 by Alexis Pietak & Cecil Curry.
# Copyright 2014-2025 by Alexis Pietak & Cecil Curry.
# See "LICENSE" for further details.
#
# --------------------( SYNOPSIS )--------------------
Expand Down
2 changes: 1 addition & 1 deletion betse/data/yaml/RESULTS/sim_1/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# --------------------( LICENSE )--------------------
# Copyright 2014-2023 by Alexis Pietak & Cecil Curry.
# Copyright 2014-2025 by Alexis Pietak & Cecil Curry.
# See "LICENSE" for further details.
#
# --------------------( SYNOPSIS )--------------------
Expand Down
2 changes: 1 addition & 1 deletion betse/data/yaml/SIMS/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# --------------------( LICENSE )--------------------
# Copyright 2014-2023 by Alexis Pietak & Cecil Curry.
# Copyright 2014-2025 by Alexis Pietak & Cecil Curry.
# See "LICENSE" for further details.
#
# --------------------( SYNOPSIS )--------------------
Expand Down
2 changes: 1 addition & 1 deletion betse/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# --------------------( LICENSE )--------------------
# Copyright 2014-2023 by Alexis Pietak & Cecil Curry.
# Copyright 2014-2025 by Alexis Pietak & Cecil Curry.
# See "LICENSE" for further details.

'''
Expand Down
2 changes: 1 addition & 1 deletion betse/gui/interact.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# Copyright 2014-2023 by Alexis Pietak & Cecil Curry.
# Copyright 2014-2025 by Alexis Pietak & Cecil Curry.
# See "LICENSE" for further details.


Expand Down
2 changes: 1 addition & 1 deletion betse/lib/libs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# --------------------( LICENSE )--------------------
# Copyright 2014-2023 by Alexis Pietak & Cecil Curry.
# Copyright 2014-2025 by Alexis Pietak & Cecil Curry.
# See "LICENSE" for further details.

'''
Expand Down
27 changes: 15 additions & 12 deletions betse/lib/matplotlib/matplotlibs.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/usr/bin/env python3
# --------------------( LICENSE )--------------------
# Copyright 2014-2023 by Alexis Pietak & Cecil Curry.
# --------------------( LICENSE )--------------------
# Copyright 2014-2025 by Alexis Pietak & Cecil Curry.
# See "LICENSE" for further details.

'''
High-level support facilities for matplotlib, a mandatory runtime dependency.
Backends
----------
--------
matplotlib supports numerous **interactive backends** (i.e., bindings to
external GUI-specific widget toolkits), only one of which will be imported by
matplotlib at runtime. If the caller specifies no such backend, a default
Expand Down Expand Up @@ -68,7 +68,10 @@
from betse.util.io.log import logs
from betse.util.io.log.conf import logconf
from betse.util.io.log.logenum import LogLevel
from betse.util.os import displays, kernels, oses
from betse.util.os import (
displays,
kernels,
)
from betse.util.os.brand import macos
from betse.util.py.module import pymodname
from betse.util.type.iterable import itersort
Expand Down Expand Up @@ -841,29 +844,29 @@ def backend_names(self) -> SequenceTypes:
'''

# Importing this submodule may have side effects and is thus deferred.
#
# "all_backends" is the canonical sequence of all publicly supported
# backends, defined as the concatenation of these subsidiary sequences:
#
from matplotlib.backends import backend_registry

# List of all publicly supported backends, defined as the concatenation
# of these subsidiary lists:
# * "interactive_bk", listing all supported interative backends.
# * "non_interactive_bk", listing all supported non-interative
# backends.
#
# Note that this sequence excludes numerous privately supported
# backends residing in the "matplotlib.backends" subpackage (e.g.,
# Note that this list excludes numerous privately supported backends
# residing in the "matplotlib.backends" subpackage (e.g.,
# "matplotlib.backends.backend_webagg_core"). Obsolete versions of
# Matplotlib permitted callers to enable these backends; ergo, this
# property was previously implemented to dynamically introspect the
# local filesystem to collect the set of all backend names from the set
# of all "backend_"-prefixed submodules residing in this subpackage.
# Modern versions of Matplotlib prohibit callers from enabling these
# backends; ergo, this property now defers to this sequence.
from matplotlib.rcsetup import all_backends
backend_names = backend_registry.list_builtin()

# Return a new sequence containing all items from "all_backends"
# lowercased and lexicographically sorted.
return itersort.sort_ascending(
backend_name.lower() for backend_name in all_backends)
backend_name.lower() for backend_name in backend_names)

# ..................{ PROPERTIES ~ backend : names: pri }..................
@property_cached
Expand Down
2 changes: 1 addition & 1 deletion betse/lib/matplotlib/mplcolormap.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# --------------------( LICENSE )--------------------
# Copyright 2014-2023 by Alexis Pietak & Cecil Curry.
# Copyright 2014-2025 by Alexis Pietak & Cecil Curry.
# See "LICENSE" for further details.

'''
Expand Down
2 changes: 1 addition & 1 deletion betse/lib/matplotlib/mplfigure.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# --------------------( LICENSE )--------------------
# Copyright 2014-2023 by Alexis Pietak & Cecil Curry.
# Copyright 2014-2025 by Alexis Pietak & Cecil Curry.
# See "LICENSE" for further details.

'''
Expand Down
2 changes: 1 addition & 1 deletion betse/lib/matplotlib/mplutil.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# --------------------( LICENSE )--------------------
# Copyright 2014-2023 by Alexis Pietak & Cecil Curry.
# Copyright 2014-2025 by Alexis Pietak & Cecil Curry.
# See "LICENSE" for further details.

'''
Expand Down
2 changes: 1 addition & 1 deletion betse/lib/matplotlib/mplzorder.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# --------------------( LICENSE )--------------------
# Copyright 2014-2023 by Alexis Pietak & Cecil Curry.
# Copyright 2014-2025 by Alexis Pietak & Cecil Curry.
# See "LICENSE" for further details.

'''
Expand Down
2 changes: 1 addition & 1 deletion betse/lib/matplotlib/writer/mplcls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# --------------------( LICENSE )--------------------
# Copyright 2014-2023 by Alexis Pietak & Cecil Curry.
# Copyright 2014-2025 by Alexis Pietak & Cecil Curry.
# See "LICENSE" for further details.

'''
Expand Down
2 changes: 1 addition & 1 deletion betse/lib/matplotlib/writer/mplvideo.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# --------------------( LICENSE )--------------------
# Copyright 2014-2023 by Alexis Pietak & Cecil Curry.
# Copyright 2014-2025 by Alexis Pietak & Cecil Curry.
# See "LICENSE" for further details.

'''
Expand Down
2 changes: 1 addition & 1 deletion betse/lib/numpy/nparray.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# --------------------( LICENSE )--------------------
# Copyright 2014-2023 by Alexis Pietak & Cecil Curry.
# Copyright 2014-2025 by Alexis Pietak & Cecil Curry.
# See "LICENSE" for further details.

'''
Expand Down
2 changes: 1 addition & 1 deletion betse/lib/numpy/npcsv.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# --------------------( LICENSE )--------------------
# Copyright 2014-2023 by Alexis Pietak & Cecil Curry.
# Copyright 2014-2025 by Alexis Pietak & Cecil Curry.
# See "LICENSE" for further details.

'''
Expand Down
2 changes: 1 addition & 1 deletion betse/lib/numpy/npscalar.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# --------------------( LICENSE )--------------------
# Copyright 2014-2023 by Alexis Pietak & Cecil Curry.
# Copyright 2014-2025 by Alexis Pietak & Cecil Curry.
# See "LICENSE" for further details.

'''
Expand Down
2 changes: 1 addition & 1 deletion betse/lib/numpy/nptest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# --------------------( LICENSE )--------------------
# Copyright 2014-2023 by Alexis Pietak & Cecil Curry.
# Copyright 2014-2025 by Alexis Pietak & Cecil Curry.
# See "LICENSE" for further details.

'''
Expand Down
Loading

0 comments on commit c121237

Please sign in to comment.