[project] name = "glue-core" classifiers = [ "Intended Audience :: Science/Research", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", "Topic :: Scientific/Engineering :: Visualization", "License :: OSI Approved :: BSD License", ] description = "Core library for the glue multidimensional data visualization project" readme = "README.rst" requires-python = ">=3.10" dynamic = [ "version",] authors = [ {name = "Thomas Robitaille", email = "glueviz@gmail.com"}, {name = "Chris Beaumont"}, ] dependencies = [ "numpy>=1.17", "matplotlib>=3.2", "scipy>=1.1", "pandas>=1.2", "astropy>=4.0", "echo>=0.12", "fast_histogram>=0.12", "ipython>=4.0", "dill>=0.2", "h5py>=2.10", "xlrd>=1.2", "openpyxl>=3.0", "mpl-scatter-density>=0.8", "shapely>=2.0", ] [project.urls] Homepage = "http://glueviz.org" [project.optional-dependencies] recommended = [ "scikit-image"] all = [ "scipy", "scikit-image", "PyAVM", "astrodendro", "spectral-cube", "pillow!=7.1.0", ] astronomy = [ "PyAVM", "astrodendro", "spectral-cube", ] docs = [ "sphinx<7", "sphinx-automodapi", "sphinxcontrib-spelling", "numpydoc", "sphinx-book-theme", ] test = [ "pytest", "pytest-cov", "pytest-faulthandler", "pytest-flake8", "h5py>=2.10; platform_system=='Linux'", "objgraph", ] visualtest = [ "pytest-mpl"] [project.scripts] glue-config = "glue.config_gen:main" [build-system] requires = ["setuptools>=61.2", "setuptools_scm", "wheel"] build-backend = 'setuptools.build_meta' [tool.setuptools] zip-safe = false include-package-data = false [project.entry-points."glue.plugins"] coordinate_helpers = "glue.plugins.coordinate_helpers:setup" wcs_autolinking = "glue.plugins.wcs_autolinking:setup" dendro_factory = "glue.plugins.dendro_viewer:setup" data_exporters = "glue.core.data_exporters:setup" fits_format = "glue.io.formats.fits:setup" export_python = "glue.plugins.tools:setup" [tool.setuptools.package-data] "*" = [ "*.png", "*.ui", "*.glu", "*.hdf5", "*.fits", "*.xlsx", "*.txt", "*.csv", "*.svg", "*.vot",] "glue.core.data_factories.tests" = [ "data/*.jpg",] [tool.pytest.ini_options] addopts = "-p no:logging" # Legacy ignores? # E402, E741 (permanently) in ruff lint.ignore # E402, E501, E731, F841, W605 (temporarily) in .ruff.toml flake8-ignore = "E226,E501,E731,F841,E127,E741,E402,W504,W605" filterwarnings = [ "ignore::PendingDeprecationWarning:xlrd", "ignore:Session._key_changed is deprecated", "ignore:zmq.* is deprecated", "ignore:can't be aliased because it is another magic command", "ignore:DragAndDropTerminal._style_sheet_changed is deprecated", "ignore:::ipykernel", "ignore:Accessing zmq Socket attribute", ] [tool.coverage.run] omit = [ "glue/tests/*", "glue/*/tests/*", "glue/*/*/tests/*", "glue/*/*/*/tests/*", "glue/external/*", "*/glue/tests/*", "*/glue/*/tests/*", "*/glue/*/*/tests/*", "*/glue/*/*/*/tests/*", "*/glue/external/*", ] [tool.coverage.paths] source = [ "glue/", "*/site-packages/glue", "*\\site-packages\\glue", ] [tool.coverage.report] exclude_lines = [ "pragma: no cover", "except ImportError", "raise AssertionError", "raise NotImplementedError", "def main\\(.*\\):", "pragma: py{ignore_python_version}", "def _ipython_key_completions_", ] [tool.setuptools.packages.find] namespaces = false [tool.setuptools_scm] version_file = "glue/_version.py" [tool.gilesbot] [tool.gilesbot.circleci_artifacts] enabled = true [tool.gilesbot.circleci_artifacts.figure_report] url = "results/fig_comparison.html" message = "Click details to see the image test comparisons, for py311-test-visual" report_on_fail = true [tool.ruff] # ruff check: pycodestyle, Pyflakes, McCabe, flake8-bugbear, flake8-simplify lint.select = ["ALL"] exclude=[ "glue/external/*", "*_parsetab.py", "*_lextab.py" ] lint.ignore = [ # NOTE: non-permanent exclusions should be added to `.ruff.toml` instead. # flake8-builtins (A) : shadowing a Python built-in. # New ones should be avoided and is up to maintainers to enforce. "A00", # flake8-commas (COM) "COM812", # TrailingCommaMissing "COM819", # TrailingCommaProhibited # pydocstyle (D) # Missing Docstrings "D102", # Missing docstring in public method. Don't check b/c docstring inheritance. "D105", # Missing docstring in magic method. Don't check b/c class docstring. # Whitespace Issues "D200", # FitsOnOneLine # Docstring Content Issues "D410", # BlankLineAfterSection. Using D412 instead. "D400", # EndsInPeriod. NOTE: might want to revisit this. # pycodestyle (E, W) "E711", # NoneComparison (see unfixable) "E741", # AmbiguousVariableName. Physics variables are often poor code variables # flake8-fixme (FIX) "FIX002", # Line contains TODO | notes for improvements are OK iff the code works # ISC001 shouldn't be used with ruff format # https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules "ISC001", # pep8-naming (N) "N803", # invalid-argument-name. Physics variables are often poor code variables "N806", # non-lowercase-variable-in-function. Physics variables are often poor code variables # pandas-vet (PD) "PD", # Pylint (PLC, PLE, PLR, PLW) "PLC0415", # `import` should be at the top-level of a file # flake8-self (SLF) "SLF001", # private member access # flake8-todos (TD) "TD002", # Missing author in TODO # Ruff-specific rules (RUF) "RUF001", # ambiguous-unicode-character-string "RUF002", # ambiguous-unicode-character-docstring "RUF005", # unpack-instead-of-concatenating-to-collection-literal -- it's not clearly faster. "RUF010", # use conversion in f-string "RUF012", # Mutable class attributes should be annotated with `typing.ClassVar` "RUF015", # Prefer `next(iter(datasets.keys()))` over single element slice "RUF021", # Parenthesize `a and b` expressions when chaining `and` and `or` together "RUF022", # `__all__` is not sorted "RUF100", # Unused blanket `noqa` directive ] [tool.ruff.lint.extend-per-file-ignores] "setup.py" = ["INP001"] # Part of configuration, not a package. ".github/workflows/*.py" = ["INP001"] "test_*.py" = [ "ANN201", # Public function without return type annotation "B018", # UselessExpression "D", # pydocstyle "S101", # Use of assert detected ] "glue/__init__.py" = ["PT028"] # Test function with default parameter - `test` is not a standard unit test function here. "glue/config.py" = ["E402"] # Imports are done as needed. "glue/conftest.py" = ["INP001"] # Part of configuration, not a package. "doc/*.py" = [ "INP001", # implicit-namespace-package. The examples are not a package. ] [tool.ruff.lint.flake8-annotations] ignore-fully-untyped = true mypy-init-return = true [tool.ruff.lint.flake8-comprehensions] allow-dict-calls-with-keyword-arguments = true [tool.ruff.lint.flake8-type-checking] exempt-modules = [] [tool.ruff.lint.isort] known-first-party = ["glue", "glue_core"] [tool.ruff.lint.pydocstyle] convention = "numpy"