diff --git a/.github/workflows/matrix-and-codecov-on-merge-to-main.yml b/.github/workflows/matrix-and-codecov-on-merge-to-main.yml index 534196c..e739c34 100644 --- a/.github/workflows/matrix-and-codecov-on-merge-to-main.yml +++ b/.github/workflows/matrix-and-codecov-on-merge-to-main.yml @@ -16,6 +16,6 @@ jobs: with: project: diffpy.fourigui c_extension: false - headless: false + headless: true secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/tests-on-pr.yml b/.github/workflows/tests-on-pr.yml index fa361f9..ea8bdb2 100644 --- a/.github/workflows/tests-on-pr.yml +++ b/.github/workflows/tests-on-pr.yml @@ -13,4 +13,4 @@ jobs: with: project: diffpy.fourigui c_extension: false - headless: false + headless: true diff --git a/diffpy/__init__.py b/diffpy/__init__.py deleted file mode 100644 index 4d4bf70..0000000 --- a/diffpy/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# (c) 2024 The Trustees of Columbia University in the City of New York. -# All rights reserved. -# -# File coded by: Billinge Group members and community contributors. -# -# See GitHub contributions for a more detailed list of contributors. -# https://github.com/diffpy/diffpy.fourigui/graphs/contributors -# -# See LICENSE.rst for license information. -# -############################################################################## - -"""Blank namespace package for module diffpy.""" - - -from pkgutil import extend_path - -__path__ = extend_path(__path__, __name__) - -# End of file diff --git a/diffpy/fourigui/__init__.py b/diffpy/fourigui/__init__.py deleted file mode 100644 index 3ccc189..0000000 --- a/diffpy/fourigui/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# (c) 2024 The Trustees of Columbia University in the City of New York. -# All rights reserved. -# -# File coded by: Billinge Group members and community contributors. -# -# See GitHub contributions for a more detailed list of contributors. -# https://github.com/diffpy/diffpy.fourigui/graphs/contributors -# -# See LICENSE.rst for license information. -# -############################################################################## - -"""Tool for visualizing 3D diffraction and PDF Images.""" - -# package version -from diffpy.fourigui.version import __version__ - -# silence the pyflakes syntax checker -assert __version__ or True - -# End of file diff --git a/diffpy/fourigui/tests/__init__.py b/diffpy/fourigui/tests/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/diffpy/fourigui/tests/conftest.py b/diffpy/fourigui/tests/conftest.py deleted file mode 100644 index e3b6313..0000000 --- a/diffpy/fourigui/tests/conftest.py +++ /dev/null @@ -1,19 +0,0 @@ -import json -from pathlib import Path - -import pytest - - -@pytest.fixture -def user_filesystem(tmp_path): - base_dir = Path(tmp_path) - home_dir = base_dir / "home_dir" - home_dir.mkdir(parents=True, exist_ok=True) - cwd_dir = base_dir / "cwd_dir" - cwd_dir.mkdir(parents=True, exist_ok=True) - - home_config_data = {"username": "home_username", "email": "home@email.com"} - with open(home_dir / "diffpyconfig.json", "w") as f: - json.dump(home_config_data, f) - - yield tmp_path diff --git a/diffpy/fourigui/tests/debug.py b/diffpy/fourigui/tests/debug.py deleted file mode 100644 index 60c9014..0000000 --- a/diffpy/fourigui/tests/debug.py +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# (c) 2024 The Trustees of Columbia University in the City of New York. -# All rights reserved. -# -# File coded by: Billinge Group members and community contributors. -# -# See GitHub contributions for a more detailed list of contributors. -# https://github.com/diffpy/diffpy.fourigui/graphs/contributors -# -# See LICENSE.rst for license information. -# -############################################################################## - -""" -Convenience module for debugging the unit tests using - -python -m diffpy.fourigui.tests.debug - -Exceptions raised by failed tests or other errors are not caught. -""" - - -if __name__ == "__main__": - import sys - - from diffpy.fourigui.tests import testsuite - - pattern = sys.argv[1] if len(sys.argv) > 1 else "" - suite = testsuite(pattern) - suite.debug() - - -# End of file diff --git a/diffpy/fourigui/version.py b/diffpy/fourigui/version.py deleted file mode 100644 index e8b1019..0000000 --- a/diffpy/fourigui/version.py +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# (c) 2024 The Trustees of Columbia University in the City of New York. -# All rights reserved. -# -# File coded by: Billinge Group members and community contributors. -# -# See GitHub contributions for a more detailed list of contributors. -# https://github.com/diffpy/diffpy.fourigui/graphs/contributors -# -# See LICENSE.rst for license information. -# -############################################################################## - -"""Definition of __version__.""" - -# We do not use the other three variables, but can be added back if needed. -# __all__ = ["__date__", "__git_commit__", "__timestamp__", "__version__"] - -# obtain version information -from importlib.metadata import version - -__version__ = version("diffpy.fourigui") - -# End of file diff --git a/requirements/run.txt b/requirements/run.txt index e69de29..f8febd0 100644 --- a/requirements/run.txt +++ b/requirements/run.txt @@ -0,0 +1,5 @@ +h5py +time +tk +matplotlib +numpy diff --git a/src/__init__.py b/src/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/diffpy/fourigui/fourigui.py b/src/diffpy/fourigui/fourigui.py index 7035231..88dd866 100755 --- a/src/diffpy/fourigui/fourigui.py +++ b/src/diffpy/fourigui/fourigui.py @@ -8,7 +8,7 @@ from matplotlib import pyplot as plt from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2Tk -matplotlib.use("tk.TkAgg") +matplotlib.use("tkagg") WIDTH = 920 HEIGHT = 630 diff --git a/tests/__init__.py b/tests/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/tests/integration_test.py b/tests/integration_test.py index 043e9ca..44388dd 100644 --- a/tests/integration_test.py +++ b/tests/integration_test.py @@ -3,7 +3,7 @@ import h5py import numpy as np -from ..fourigui.fourigui import Gui +from diffpy.fourigui.fourigui import Gui class TestGui(unittest.TestCase): diff --git a/tests/unit_test.py b/tests/unit_test.py index 43cc91a..b3b9ce3 100644 --- a/tests/unit_test.py +++ b/tests/unit_test.py @@ -2,7 +2,7 @@ import h5py -from ..fourigui.fourigui import Gui +from diffpy.fourigui.fourigui import Gui class TestGui(unittest.TestCase):