diff --git a/MANIFEST.in b/MANIFEST.in index a4ceb84..d00e802 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -4,6 +4,7 @@ include README.rst include requirements.txt include doc/examples/* +recursive-include src/diffpy/labpdfproc/data * recursive-exclude * __pycache__ recursive-exclude * *.py[co] diff --git a/pyproject.toml b/pyproject.toml index bb114ae..841e997 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,6 +42,9 @@ template = "{tag}" dev_template = "{tag}" dirty_template = "{tag}" +[project.scripts] +labpdfproc = "diffpy.labpdfproc.labpdfprocapp:main" + [tool.setuptools.packages.find] where = ["src"] # list of folders that contain the packages (["."] by default) include = ["*"] # package names should match these glob patterns (["*"] by default) diff --git a/src/diffpy/labpdfproc/tests/__init__.py b/src/diffpy/labpdfproc/tests/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/diffpy/labpdfproc/tests/debug.py b/src/diffpy/labpdfproc/tests/debug.py deleted file mode 100644 index 51881b9..0000000 --- a/src/diffpy/labpdfproc/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.labpdfproc/graphs/contributors -# -# See LICENSE.rst for license information. -# -############################################################################## - -""" -Convenience module for debugging the unit tests using - -python -m diffpy.labpdfproc.tests.debug - -Exceptions raised by failed tests or other errors are not caught. -""" - - -if __name__ == "__main__": - import sys - - from diffpy.labpdfproc.tests import testsuite - - pattern = sys.argv[1] if len(sys.argv) > 1 else "" - suite = testsuite(pattern) - suite.debug() - - -# End of file diff --git a/src/diffpy/labpdfproc/tests/run.py b/src/diffpy/labpdfproc/tests/run.py deleted file mode 100644 index d11095f..0000000 --- a/src/diffpy/labpdfproc/tests/run.py +++ /dev/null @@ -1,34 +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.labpdfproc/graphs/contributors -# -# See LICENSE.rst for license information. -# -############################################################################## -"""Convenience module for executing all unit tests with -python -m diffpy.labpdfproc.tests.run -""" - -import sys - -import pytest - -if __name__ == "__main__": - # show output results from every test function - args = ["-v"] - # show the message output for skipped and expected failure tests - if len(sys.argv) > 1: - args.extend(sys.argv[1:]) - print("pytest arguments: {}".format(args)) - # call pytest and exit with the return code from pytest - exit_res = pytest.main(args) - sys.exit(exit_res) - -# End of file diff --git a/src/diffpy/labpdfproc/tests/test_example.py b/src/diffpy/labpdfproc/tests/test_example.py deleted file mode 100644 index 813df60..0000000 --- a/src/diffpy/labpdfproc/tests/test_example.py +++ /dev/null @@ -1,2 +0,0 @@ -def test_example(): - assert True diff --git a/src/diffpy/labpdfproc/tests/conftest.py b/tests/conftest.py similarity index 100% rename from src/diffpy/labpdfproc/tests/conftest.py rename to tests/conftest.py diff --git a/src/diffpy/labpdfproc/tests/test_fixtures.py b/tests/test_fixtures.py similarity index 100% rename from src/diffpy/labpdfproc/tests/test_fixtures.py rename to tests/test_fixtures.py diff --git a/src/diffpy/labpdfproc/tests/test_functions.py b/tests/test_functions.py similarity index 100% rename from src/diffpy/labpdfproc/tests/test_functions.py rename to tests/test_functions.py diff --git a/src/diffpy/labpdfproc/tests/test_tools.py b/tests/test_tools.py similarity index 100% rename from src/diffpy/labpdfproc/tests/test_tools.py rename to tests/test_tools.py