Skip to content

skpkg: setup CI after migrating src, tests, requirements, and .github directory #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 28, 2025
Prev Previous commit
[pre-commit.ci] auto fixes from pre-commit hooks
  • Loading branch information
pre-commit-ci[bot] committed Jun 28, 2025
commit d142d51ca6bc9b9e571d1d9bfadb97c2472e17c2
8 changes: 4 additions & 4 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
coverage:
status:
project: # more options at https://docs.codecov.com/docs/commit-status
project: # more options at https://docs.codecov.com/docs/commit-status
default:
target: auto # use the coverage from the base commit, fail if coverage is lower
threshold: 0% # allow the coverage to drop by
threshold: 0% # allow the coverage to drop by

comment:
layout: " diff, flags, files"
behavior: default
require_changes: false
require_base: false # [true :: must have a base report to post]
require_head: false # [true :: must have a head report to post]
require_base: false # [true :: must have a base report to post]
require_head: false # [true :: must have a head report to post]
hide_project_coverage: false # [true :: only show coverage on the git diff aka patch coverage]
1 change: 0 additions & 1 deletion src/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See LICENSE.txt for license information.
#
##############################################################################

"""nmf_mapping - tools for performing NMF on PDF and XRD data."""


Expand Down
2 changes: 0 additions & 2 deletions src/diffpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
# See LICENSE.rst for license information.
#
##############################################################################


"""Blank namespace package for module diffpy."""


Expand Down
1 change: 0 additions & 1 deletion src/diffpy/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See LICENSE.txt for license information.
#
##############################################################################

"""Definition of __version__ and __date__ for diffpy.nmf_mapping."""

__id__ = "$Id$"
Expand Down
4 changes: 2 additions & 2 deletions tests/test_NMF_analysis_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@

@pytest.fixture(scope="session")
def temp_dir():
"""A test fixture that creates and destroys tes outputs in a temporary
directory.
"""A test fixture that creates and destroys tes outputs in a
temporary directory.

This will yield the path to the directory.
"""
Expand Down
14 changes: 12 additions & 2 deletions tests/test_load_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,19 @@ def test_load_data():
bfto_dir = os.path.join(dir, "data/synthetic_r_vs_gr")
bfto_expected_filenames = np.array([f"synthetic{i}" for i in range(50)])
loaded_filenames = nmf.load_data(bfto_dir)[1]
assert np.testing.assert_array_equal(loaded_filenames, bfto_expected_filenames) is None
assert (
np.testing.assert_array_equal(
loaded_filenames, bfto_expected_filenames
)
is None
)

# make sure interpolation to same r-grid is working
diff_r_grid_dir = os.path.join(dir, "data", "different_r_grid")
diff_r_grid_arr = nmf.load_data(diff_r_grid_dir)[0]
assert np.testing.assert_array_equal(diff_r_grid_arr[0][:, 0], diff_r_grid_arr[1][:, 0]) is None
assert (
np.testing.assert_array_equal(
diff_r_grid_arr[0][:, 0], diff_r_grid_arr[1][:, 0]
)
is None
)
Loading