Skip to content

Commit 624ceaf

Browse files
committed
initial commit of project files
1 parent ab17139 commit 624ceaf

10 files changed

+232
-0
lines changed

.gitignore

+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
env/
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
27+
# PyInstaller
28+
# Usually these files are written by a python script from a template
29+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
30+
*.manifest
31+
*.spec
32+
33+
# Installer logs
34+
pip-log.txt
35+
pip-delete-this-directory.txt
36+
37+
# Unit test / coverage reports
38+
htmlcov/
39+
.tox/
40+
.coverage
41+
.coverage.*
42+
.cache
43+
nosetests.xml
44+
coverage.xml
45+
*,cover
46+
.hypothesis/
47+
48+
# Translations
49+
*.mo
50+
*.pot
51+
52+
# Django stuff:
53+
*.log
54+
local_settings.py
55+
56+
# Flask stuff:
57+
instance/
58+
.webassets-cache
59+
60+
# Scrapy stuff:
61+
.scrapy
62+
63+
# Sphinx documentation
64+
docs/_build/
65+
66+
# PyBuilder
67+
target/
68+
69+
# IPython Notebook
70+
.ipynb_checkpoints
71+
72+
# pyenv
73+
.python-version
74+
75+
# celery beat schedule file
76+
celerybeat-schedule
77+
78+
# dotenv
79+
.env
80+
81+
# virtualenv
82+
venv/
83+
ENV/
84+
85+
# Spyder project settings
86+
.spyderproject
87+
88+
# Rope project settings
89+
.ropeproject
90+
91+
# pycharm
92+
.idea/
93+
# Mac
94+
.DS_Store
95+
# Rever
96+
rever/

AUTHORS.rst

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Authors
2+
====================
3+
4+
Ran Gu, Adeolu Ajayi, Qiang Du, Simon J.L. Billinge
5+
6+
Contributors
7+
------------
8+
For a full list of contributors, visit
9+
https://github.com/diffpy/diffpy.snmf/graphs/contributors

CHANGELOG.rst

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
===========
2+
Change Log
3+
===========
4+
5+
.. current developments
6+

diffpy/__init__.py

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env python
2+
##############################################################################
3+
#
4+
# diffpy by DANSE Diffraction group
5+
# Simon J. L. Billinge
6+
# (c) 2008 Trustees of the Columbia University
7+
# in the City of New York. All rights reserved.
8+
#
9+
# File coded by: Pavol Juhas
10+
#
11+
# See AUTHORS.txt for a list of people who contributed.
12+
# See LICENSE.txt for license information.
13+
#
14+
##############################################################################
15+
16+
"""snmf - implements the stretchednmf algorithm
17+
18+
"""
19+
20+
21+
from pkgutil import extend_path
22+
23+
__path__ = extend_path(__path__, __name__)
24+
25+
26+
# End of file

diffpy/snmf/__init__.py

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env python
2+
##############################################################################
3+
#
4+
# pdfmorph by DANSE Diffraction group
5+
# Simon J. L. Billinge
6+
# (c) 2006 trustees of the Michigan State University.
7+
# All rights reserved.
8+
#
9+
# File coded by: Chris Farrow
10+
#
11+
# See AUTHORS.txt for a list of people who contributed.
12+
# See LICENSE.txt for license information.
13+
#
14+
##############################################################################
15+
16+
"""Tools for manipulating and comparing PDFs.
17+
"""
18+
19+
# obtain version information
20+
__version__ = '0.0.1'
21+
22+
# top-level import
23+
#from diffpy.snmf.pdfmorph_api import pdfmorph, morph_default_config, plot_morph
24+
25+
# End of file

diffpy/snmf/version.py

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env python
2+
##############################################################################
3+
#
4+
# Structure by DANSE Diffraction group
5+
# Simon J. L. Billinge
6+
# (c) 2008 trustees of the Michigan State University.
7+
# All rights reserved.
8+
#
9+
# File coded by: Pavol Juhas
10+
#
11+
# See AUTHORS.txt for a list of people who contributed.
12+
# See LICENSE.txt for license information.
13+
#
14+
##############################################################################
15+
16+
"""Definition of __version__ and __date__ for diffpy.pdfmorph.
17+
"""
18+
19+
20+
# obtain version information
21+
from pkg_resources import get_distribution
22+
23+
__version__ = get_distribution('diffpy.snmf').version
24+
25+
# we assume that tag_date was used and __version__ ends in YYYYMMDD
26+
__date__ = __version__[-8:-4] + '-' + __version__[-4:-2] + '-' + __version__[-2:]
27+
28+
# End of file

environment.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
name: diffpy.snmf
2+
channels:
3+
- conda-forge
4+
dependencies:
5+
- python=3
6+
- pip

rever.xsh

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
$ACTIVITIES = [
2+
'version_bump', # Changes the version number in various source files (setup.py, __init__.py, etc)
3+
'changelog', # Uses files in the news folder to create a changelog for release
4+
'tag', # Creates a tag for the new version number
5+
#'pypi', # Sends the package to pypi
6+
#'conda_forge', # Creates a PR into your package's feedstock
7+
'ghrelease' # Creates a Github release entry for the new tag
8+
]
9+
$VERSION_BUMP_PATTERNS = [ # These note where/how to find the version numbers
10+
('snmf/__init__.py', '__version__\s*=.*', "__version__ = '$VERSION'"),
11+
('setup.py', 'version\s*=.*,', "version='$VERSION',")
12+
]
13+
$CHANGELOG_FILENAME = 'CHANGELOG.rst' # Filename for the changelog
14+
$CHANGELOG_TEMPLATE = 'TEMPLATE.rst' # Filename for the news template
15+
$TAG_REMOTE = 'https://github.com/diffpy/snmf.git' # Repo to push tags to
16+
17+
$GITHUB_ORG = 'diffpy' # Github org for Github releases and conda-forge
18+
$GITHUB_REPO = 'diffpy.snmf' # Github repo for Github releases and conda-forge

run_tests.py

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env python
2+
3+
import sys
4+
import pytest
5+
6+
if __name__ == '__main__':
7+
# show output results from every test function
8+
args = ['-v']
9+
# show the message output for skipped and expected failure tests
10+
if len(sys.argv) > 1:
11+
args.extend(sys.argv[1:])
12+
print('pytest arguments: {}'.format(args))
13+
# # compute coverage stats for xpdAcq
14+
# call pytest and exit with the return code from pytest so that
15+
# travis will fail correctly if tests fail
16+
exit_res = pytest.main(args)
17+
sys.exit(exit_res)

setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

0 commit comments

Comments
 (0)