-
Notifications
You must be signed in to change notification settings - Fork 4
Cookierelease: setup src folder structure #10
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
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/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.nmf_mapping/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/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.nmf_mapping/graphs/contributors | ||
# | ||
# See LICENSE.rst for license information. | ||
# | ||
############################################################################## | ||
|
||
"""Run NMF analysis on PDF and XRD data""" | ||
|
||
# package version | ||
from diffpy.nmf_mapping.version import __version__ | ||
|
||
# silence the pyflakes syntax checker | ||
assert __version__ or True | ||
|
||
# End of file |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,11 +11,12 @@ | |
import numpy as np | ||
import pandas as pd | ||
from bg_mpl_stylesheets.styles import all_styles | ||
from diffpy.utils.parsers.loaddata import loadData | ||
from scipy import interpolate | ||
from sklearn.decomposition import NMF, PCA | ||
from sklearn.exceptions import ConvergenceWarning | ||
|
||
from diffpy.utils.parsers.loaddata import loadData | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done by pre-commit |
||
|
||
plt.style.use(all_styles["bg_style"]) | ||
warnings.filterwarnings("ignore", category=FutureWarning) | ||
warnings.filterwarnings("ignore", category=ConvergenceWarning) | ||
|
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
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": "[email protected]"} | ||
with open(home_dir / "diffpyconfig.json", "w") as f: | ||
json.dump(home_config_data, f) | ||
|
||
yield tmp_path |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/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.nmf_mapping/graphs/contributors | ||
# | ||
# See LICENSE.rst for license information. | ||
# | ||
############################################################################## | ||
|
||
""" | ||
Convenience module for debugging the unit tests using | ||
|
||
python -m diffpy.nmf_mapping.tests.debug | ||
|
||
Exceptions raised by failed tests or other errors are not caught. | ||
""" | ||
|
||
|
||
if __name__ == "__main__": | ||
import sys | ||
|
||
from diffpy.nmf_mapping.tests import testsuite | ||
|
||
pattern = sys.argv[1] if len(sys.argv) > 1 else "" | ||
suite = testsuite(pattern) | ||
suite.debug() | ||
|
||
|
||
# End of file |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/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.nmf_mapping/graphs/contributors | ||
# | ||
# See LICENSE.rst for license information. | ||
# | ||
############################################################################## | ||
"""Convenience module for executing all unit tests with | ||
python -m \.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 |
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/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.nmf_mapping/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.nmf_mapping") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nmf_mapping |
||
|
||
# End of file |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nmf_mapping used.