From 8fc26a0248fbde08158658c7712b06d82e08c9dd Mon Sep 17 00:00:00 2001 From: William Gilpin Date: Mon, 6 Jan 2025 05:10:04 -0600 Subject: [PATCH 1/2] Update setup.py to find subdirectories --- setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 4c0aba6..45ea546 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,5 @@ from __future__ import print_function -from setuptools import setup +from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand import io import os @@ -42,7 +42,8 @@ def run_tests(self): author_email='jfinkle@u.northwestern.edu', description='Sliding window inference methods', long_description=long_description, - packages=['Swing'], + #packages=['Swing'], + packages=find_packages(include=["Swing", "Swing.*"]), include_package_data=True, platforms='any', classifiers=[], From eed7f9896573b67411d58050c74901c5895479d9 Mon Sep 17 00:00:00 2001 From: William Gilpin Date: Tue, 10 Jun 2025 02:03:50 -0500 Subject: [PATCH 2/2] Fix Progress Reporting in Swing.py --- Swing/Swing.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Swing/Swing.py b/Swing/Swing.py index 89d8010..9042d89 100644 --- a/Swing/Swing.py +++ b/Swing/Swing.py @@ -409,10 +409,10 @@ def fit_windows(self, pcs=None, alpha=None, n_trees=None, n_jobs=None, show_prog if pcs is not None: window.num_pcs = pcs if show_progress: + print(f"Fitting window {i} of {self.get_n_windows()}") if window.td_window: - print("Fitting window index %i against the following window indices: ") - else: - print("Fitting window {} of {}".format(window.nth_window, self.get_n_windows())) + print(f"Fitting window index {window.nth_window} against the following window indices: {window.earlier_windows}") + window.fit_window() return self.window_list