diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1df7c91..f672bb1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,3 +35,16 @@ repos: - python - pyi - jupyter + - repo: https://github.com/glotzerlab/fix-license-header + rev: v0.4.1 + hooks: + - id: fix-license-header + name: Fix License Headers (Python) + exclude: ^docs/|^tests/ + types_or: [python] + args: + - --license-file=LICENSE + - --start=0 + - --num=1 + - --add=This file is from the dupin project, released under the BSD 3-Clause License. + - --keep-before=#! diff --git a/conftest.py b/conftest.py index 6e22cb5..a73692b 100644 --- a/conftest.py +++ b/conftest.py @@ -1,3 +1,6 @@ +# Copyright (c) 2023-2025 The Regents of the University of Michigan. +# This file is from the dupin project, released under the BSD 3-Clause License. + """Provide fixture and other testing helpers.""" import freud diff --git a/docs/environment.yml b/docs/environment.yml index a8f1888..018c866 100644 --- a/docs/environment.yml +++ b/docs/environment.yml @@ -3,17 +3,17 @@ channels: - conda-forge - defaults dependencies: - - python - - pip - - bottleneck - - freud - - kneed - - numpy - - ruptures - - scikit-learn - - pandas - - sphinx - - furo - - nbsphinx - - jupyter_sphinx - - pandoc + - python==3.13.2 + - pip==25.0.1 + - bottleneck==1.4.2 + - freud==3.2.0 + - kneed==0.8.5 + - numpy==2.2.3 + - ruptures==1.0.6 + - scikit-learn==1.6.1 + - pandas==2.2.3 + - sphinx==8.1.3 + - furo==2024.8.6 + - nbsphinx==0.9.6 + - jupyter_sphinx==0.5.3 + - pandoc==3.6.3 diff --git a/dupin/__init__.py b/dupin/__init__.py index 9780b57..46c5a98 100644 --- a/dupin/__init__.py +++ b/dupin/__init__.py @@ -1,3 +1,6 @@ +# Copyright (c) 2023-2025 The Regents of the University of Michigan. +# This file is from the dupin project, released under the BSD 3-Clause License. + """Top-level package for event-detection.""" __author__ = """Brandon Butler""" diff --git a/dupin/data/__init__.py b/dupin/data/__init__.py index a751cab..8a6f573 100644 --- a/dupin/data/__init__.py +++ b/dupin/data/__init__.py @@ -1,3 +1,6 @@ +# Copyright (c) 2023-2025 The Regents of the University of Michigan. +# This file is from the dupin project, released under the BSD 3-Clause License. + """Classes and functions for generating and recording system descriptors. Data Model diff --git a/dupin/data/aggregate.py b/dupin/data/aggregate.py index 66f1e71..999a88d 100644 --- a/dupin/data/aggregate.py +++ b/dupin/data/aggregate.py @@ -1,3 +1,6 @@ +# Copyright (c) 2023-2025 The Regents of the University of Michigan. +# This file is from the dupin project, released under the BSD 3-Clause License. + """Helper module for generating/storing features across an entire trajectory. This class provides the `SignalAggregator` class which takes a pipeline and diff --git a/dupin/data/base.py b/dupin/data/base.py index f18d55d..b30707b 100644 --- a/dupin/data/base.py +++ b/dupin/data/base.py @@ -1,3 +1,6 @@ +# Copyright (c) 2023-2025 The Regents of the University of Michigan. +# This file is from the dupin project, released under the BSD 3-Clause License. + """Base classes for the data module.""" import typing diff --git a/dupin/data/freud.py b/dupin/data/freud.py index b369fdd..0f88f69 100644 --- a/dupin/data/freud.py +++ b/dupin/data/freud.py @@ -1,3 +1,6 @@ +# Copyright (c) 2023-2025 The Regents of the University of Michigan. +# This file is from the dupin project, released under the BSD 3-Clause License. + """Interface from `freud` to dupin. freud is a Python package for analyzing molecular trajectory data. diff --git a/dupin/data/logging.py b/dupin/data/logging.py index ab5e99c..bb3881d 100644 --- a/dupin/data/logging.py +++ b/dupin/data/logging.py @@ -1,3 +1,6 @@ +# Copyright (c) 2023-2025 The Regents of the University of Michigan. +# This file is from the dupin project, released under the BSD 3-Clause License. + """Functions and classes for allowing logging extra data from pipelines. Logging serves as the only directly supported means of introspecting into the diff --git a/dupin/data/map.py b/dupin/data/map.py index 5a708ca..351a61d 100644 --- a/dupin/data/map.py +++ b/dupin/data/map.py @@ -1,3 +1,6 @@ +# Copyright (c) 2023-2025 The Regents of the University of Michigan. +# This file is from the dupin project, released under the BSD 3-Clause License. + """`dupin.data.base.DataMap` subclasses to transform distributional data. Mapping in dupin is the idea of taking one distribution and transforming it diff --git a/dupin/data/reduce.py b/dupin/data/reduce.py index 47b6141..61ddd36 100644 --- a/dupin/data/reduce.py +++ b/dupin/data/reduce.py @@ -1,3 +1,6 @@ +# Copyright (c) 2023-2025 The Regents of the University of Michigan. +# This file is from the dupin project, released under the BSD 3-Clause License. + """Classes for transforming array quantities into scalar features. Reduction in ``dupin`` takes an array and _reduces_ it to a set number of scalar diff --git a/dupin/data/spatial.py b/dupin/data/spatial.py index 16b4317..7e17911 100644 --- a/dupin/data/spatial.py +++ b/dupin/data/spatial.py @@ -1,3 +1,6 @@ +# Copyright (c) 2023-2025 The Regents of the University of Michigan. +# This file is from the dupin project, released under the BSD 3-Clause License. + """Spatial averaging DataMap classes.""" import numpy as np diff --git a/dupin/detect/__init__.py b/dupin/detect/__init__.py index f4dfc40..e178b00 100644 --- a/dupin/detect/__init__.py +++ b/dupin/detect/__init__.py @@ -1,3 +1,6 @@ +# Copyright (c) 2023-2025 The Regents of the University of Michigan. +# This file is from the dupin project, released under the BSD 3-Clause License. + """Methods for event detection in molecular simulations. dupin provides classes and functions to help in the event detection process but diff --git a/dupin/detect/costs.py b/dupin/detect/costs.py index 5a24e05..97c1c32 100644 --- a/dupin/detect/costs.py +++ b/dupin/detect/costs.py @@ -1,3 +1,6 @@ +# Copyright (c) 2023-2025 The Regents of the University of Michigan. +# This file is from the dupin project, released under the BSD 3-Clause License. + """Implements cost functions for use in event detection.""" from abc import ABC, abstractmethod diff --git a/dupin/detect/detect.py b/dupin/detect/detect.py index 8c33578..92916dc 100644 --- a/dupin/detect/detect.py +++ b/dupin/detect/detect.py @@ -1,3 +1,6 @@ +# Copyright (c) 2023-2025 The Regents of the University of Michigan. +# This file is from the dupin project, released under the BSD 3-Clause License. + """Implements offline methods for detecting events in molecular simulations.""" import logging diff --git a/dupin/errors.py b/dupin/errors.py index f559e25..8bc54e6 100644 --- a/dupin/errors.py +++ b/dupin/errors.py @@ -1,3 +1,6 @@ +# Copyright (c) 2023-2025 The Regents of the University of Michigan. +# This file is from the dupin project, released under the BSD 3-Clause License. + """Base error classes or associated classes.""" diff --git a/dupin/postprocessing.py b/dupin/postprocessing.py index 1155fdc..3fd2392 100644 --- a/dupin/postprocessing.py +++ b/dupin/postprocessing.py @@ -1,3 +1,6 @@ +# Copyright (c) 2023-2025 The Regents of the University of Michigan. +# This file is from the dupin project, released under the BSD 3-Clause License. + """General functions for analyzing change points once detected. This module is designed to primarly work with logger data and the original diff --git a/dupin/preprocessing/__init__.py b/dupin/preprocessing/__init__.py index a8618d1..ad2261d 100644 --- a/dupin/preprocessing/__init__.py +++ b/dupin/preprocessing/__init__.py @@ -1,3 +1,6 @@ +# Copyright (c) 2023-2025 The Regents of the University of Michigan. +# This file is from the dupin project, released under the BSD 3-Clause License. + """Perform various kinds of preprocessing on generated signals. This module provides resources for the transformation step of the event diff --git a/dupin/preprocessing/filter.py b/dupin/preprocessing/filter.py index 1e30cff..df36ac3 100644 --- a/dupin/preprocessing/filter.py +++ b/dupin/preprocessing/filter.py @@ -1,3 +1,6 @@ +# Copyright (c) 2023-2025 The Regents of the University of Michigan. +# This file is from the dupin project, released under the BSD 3-Clause License. + """Feature selection schemes. This provides feature selection schemes distinct from packages like diff --git a/dupin/preprocessing/signal.py b/dupin/preprocessing/signal.py index 4aab75a..d6ec763 100644 --- a/dupin/preprocessing/signal.py +++ b/dupin/preprocessing/signal.py @@ -1,3 +1,6 @@ +# Copyright (c) 2023-2025 The Regents of the University of Michigan. +# This file is from the dupin project, released under the BSD 3-Clause License. + """Functions for smoothing a signal. `scipy.signal` provides many additional methods for signal processing that can diff --git a/dupin/preprocessing/supervised.py b/dupin/preprocessing/supervised.py index 05a689a..02f6432 100644 --- a/dupin/preprocessing/supervised.py +++ b/dupin/preprocessing/supervised.py @@ -1,3 +1,6 @@ +# Copyright (c) 2023-2025 The Regents of the University of Michigan. +# This file is from the dupin project, released under the BSD 3-Clause License. + """Classes for use in utilizing supervised learning for event detection.""" from collections.abc import Sequence