Skip to content

Commit 4b3f53f

Browse files
cadenmyers13pre-commit-ci[bot]sbillinge
authored
cookiecutter: untracked files (#149)
* untracked files * [pre-commit.ci] auto fixes from pre-commit hooks * update LICENSE.rst * update AUTHORS.rst and remove AUTHORS.txt * tipping our hat * Remove BSD 3-Clause, leaving Columbia copyright * remove README from requirements * replace requirements * adding wxpython back * adding back freezegun --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Simon Billinge <[email protected]>
1 parent ffda1a2 commit 4b3f53f

14 files changed

+222
-70
lines changed

.isort.cfg

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[settings]
2+
line_length = 115
3+
multi_line_output = 3
4+
include_trailing_comma = True

AUTHORS.txt AUTHORS.rst

+23-12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
Authors
2+
=======
3+
4+
DiffPy was initiated as part of the Distributed Data Analysis of Neutron
5+
Scattering Experiments (DANSE) project, funded by the National Science
6+
Foundation under grant DMR-0520547. More information on DANSE can be
7+
found at http://danse.us. Any opinions, findings, and conclusions or
8+
recommendations expressed in this material are those of the author(s)
9+
and do not necessarily reflect the views of the NSF.
10+
11+
Main Contributors
12+
-----------------
13+
114
This code was developed as part of the DiffPy project to create python
215
modules for structure investigations from diffraction data. The main
316
contributors to this package were
@@ -7,33 +20,31 @@ contributors to this package were
720
Pavol Juhas
821
Dmitriy Bryndin
922

10-
The DiffPy team is located in the Billinge-group at the Applied Physics
11-
and Applied Mathematics Department of the Columbia University in New York.
12-
Currently the team consists of
23+
Other current and former contributors of the DiffPy project include
1324

1425
Simon Billinge
15-
Pavol Juhas
1626
Chris Farrow
1727
Emil Bozin
1828
Wenduo Zhou
1929
Peng Tian
20-
Timur Dykhne
2130

31+
The DiffPy team is part of the Billinge Group at Columbia University in New York,
32+
within the Department of Applied Physics and Applied Mathematics.
33+
34+
Contributors
35+
------------
2236
Please see the header of each source file for a detailed list of
2337
contributors. This is an open-source project and we hope and expect
2438
that the list of contributors will expand with time. Many thanks to
2539
all current and future contributors!
2640

2741
For more information on the DiffPy project email [email protected]
2842

29-
DiffPy was initiated as part of the Distributed Data Analysis of Neutron
30-
Scattering Experiments (DANSE) project, funded by the National Science
31-
Foundation under grant DMR-0520547. More information on DANSE can be
32-
found at http://danse.us. Any opinions, findings, and conclusions or
33-
recommendations expressed in this material are those of the author(s)
34-
and do not necessarily reflect the views of the NSF.
43+
For a list of contributors, visit
44+
https://github.com/diffpy/diffpy.pdfgui/graphs/contributors
3545

36-
Acknowledgments:
46+
Acknowledgments
47+
---------------
3748

3849
We are truly grateful to all the people who have contributed, in all
3950
different ways, to this project: Thomas Proffen, Xiangyun Qiu, Pete

CODE_OF_CONDUCT.rst

+133
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
=====================================
2+
Contributor Covenant Code of Conduct
3+
=====================================
4+
5+
Our Pledge
6+
----------
7+
8+
We as members, contributors, and leaders pledge to make participation in our
9+
community a harassment-free experience for everyone, regardless of age, body
10+
size, visible or invisible disability, ethnicity, sex characteristics, gender
11+
identity and expression, level of experience, education, socio-economic status,
12+
nationality, personal appearance, race, caste, color, religion, or sexual
13+
identity and orientation.
14+
15+
We pledge to act and interact in ways that contribute to an open, welcoming,
16+
diverse, inclusive, and healthy community.
17+
18+
Our Standards
19+
-------------
20+
21+
Examples of behavior that contributes to a positive environment for our
22+
community include:
23+
24+
* Demonstrating empathy and kindness toward other people
25+
* Being respectful of differing opinions, viewpoints, and experiences
26+
* Giving and gracefully accepting constructive feedback
27+
* Accepting responsibility and apologizing to those affected by our mistakes,
28+
and learning from the experience
29+
* Focusing on what is best not just for us as individuals, but for the overall
30+
community
31+
32+
Examples of unacceptable behavior include:
33+
34+
* The use of sexualized language or imagery, and sexual attention or advances of
35+
any kind
36+
* Trolling, insulting or derogatory comments, and personal or political attacks
37+
* Public or private harassment
38+
* Publishing others' private information, such as a physical or email address,
39+
without their explicit permission
40+
* Other conduct which could reasonably be considered inappropriate in a
41+
professional setting
42+
43+
Enforcement Responsibilities
44+
----------------------------
45+
46+
Community leaders are responsible for clarifying and enforcing our standards of
47+
acceptable behavior and will take appropriate and fair corrective action in
48+
response to any behavior that they deem inappropriate, threatening, offensive,
49+
or harmful.
50+
51+
Community leaders have the right and responsibility to remove, edit, or reject
52+
comments, commits, code, wiki edits, issues, and other contributions that are
53+
not aligned to this Code of Conduct, and will communicate reasons for moderation
54+
decisions when appropriate.
55+
56+
Scope
57+
-----
58+
59+
This Code of Conduct applies within all community spaces, and also applies when
60+
an individual is officially representing the community in public spaces.
61+
Examples of representing our community include using an official email address,
62+
posting via an official social media account, or acting as an appointed
63+
representative at an online or offline event.
64+
65+
Enforcement
66+
-----------
67+
68+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
69+
reported to the community leaders responsible for enforcement at
70+
[email protected]. All complaints will be reviewed and investigated promptly and fairly.
71+
72+
All community leaders are obligated to respect the privacy and security of the
73+
reporter of any incident.
74+
75+
Enforcement Guidelines
76+
----------------------
77+
78+
Community leaders will follow these Community Impact Guidelines in determining
79+
the consequences for any action they deem in violation of this Code of Conduct:
80+
81+
1. Correction
82+
****************
83+
84+
**Community Impact**: Use of inappropriate language or other behavior deemed
85+
unprofessional or unwelcome in the community.
86+
87+
**Consequence**: A private, written warning from community leaders, providing
88+
clarity around the nature of the violation and an explanation of why the
89+
behavior was inappropriate. A public apology may be requested.
90+
91+
2. Warning
92+
*************
93+
94+
**Community Impact**: A violation through a single incident or series of
95+
actions.
96+
97+
**Consequence**: A warning with consequences for continued behavior. No
98+
interaction with the people involved, including unsolicited interaction with
99+
those enforcing the Code of Conduct, for a specified period of time. This
100+
includes avoiding interactions in community spaces as well as external channels
101+
like social media. Violating these terms may lead to a temporary or permanent
102+
ban.
103+
104+
3. Temporary Ban
105+
******************
106+
107+
**Community Impact**: A serious violation of community standards, including
108+
sustained inappropriate behavior.
109+
110+
**Consequence**: A temporary ban from any sort of interaction or public
111+
communication with the community for a specified period of time. No public or
112+
private interaction with the people involved, including unsolicited interaction
113+
with those enforcing the Code of Conduct, is allowed during this period.
114+
Violating these terms may lead to a permanent ban.
115+
116+
4. Permanent Ban
117+
******************
118+
119+
**Community Impact**: Demonstrating a pattern of violation of community
120+
standards, including sustained inappropriate behavior, harassment of an
121+
individual, or aggression toward or disparagement of classes of individuals.
122+
123+
**Consequence**: A permanent ban from any sort of public interaction within the
124+
community.
125+
126+
Attribution
127+
-----------
128+
129+
This Code of Conduct is adapted from the `Contributor Covenant <https://www.contributor-covenant.org/version/2/1/code_of_conduct.html>`_.
130+
131+
Community Impact Guidelines were inspired by `Mozilla's code of conduct enforcement ladder <https://github.com/mozilla/inclusion>`_.
132+
133+
For answers to common questions about this code of conduct, see the `FAQ <https://www.contributor-covenant.org/faq>`_. `Translations are available <https://www.contributor-covenant.org/translations>`_

LICENSE.txt LICENSE.rst

+23-25
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
Copyright (c) 2024, The Trustees of Columbia University
2+
in the City of New York.
3+
All rights reserved.
4+
15
This software was originally developed by the Billinge group as part
26
of the Distributed Data Analysis of Neutron Scattering Experiments
37
(DANSE) project funded by the US National Science Foundation under
@@ -47,32 +51,26 @@ For more information please visit the project web-page:
4751
or email Prof. Simon Billinge at [email protected]
4852

4953
Redistribution and use in source and binary forms, with or without
50-
modification, are permitted provided that the following conditions
51-
are met:
54+
modification, are permitted provided that the following conditions are met:
5255

53-
* Redistributions of source code must retain the above copyright
54-
notice, this list of conditions and the following disclaimer.
56+
1. Redistributions of source code must retain the above copyright notice, this
57+
list of conditions and the following disclaimer.
5558

56-
* Redistributions in binary form must reproduce the above copyright
57-
notice, this list of conditions and the following disclaimer in the
58-
documentation and/or other materials provided with the distribution.
59+
2. Redistributions in binary form must reproduce the above copyright notice,
60+
this list of conditions and the following disclaimer in the documentation
61+
and/or other materials provided with the distribution.
5962

60-
* Neither the name of the copyright holder nor the names of its
61-
contributors may be used to endorse or promote products derived from
62-
this software without specific prior written permission.
63+
3. Neither the name of the copyright holder nor the names of its contributors
64+
may be used to endorse or promote products derived from this software
65+
without specific prior written permission.
6366

64-
THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDER "AS IS". COPYRIGHT HOLDER
65-
EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES AND CONDITIONS, EITHER
66-
EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
67-
WARRANTIES OF MERCHANTABILITY, TITLE, FITNESS, ADEQUACY OR SUITABILITY
68-
FOR A PARTICULAR PURPOSE, AND ANY WARRANTIES OF FREEDOM FROM
69-
INFRINGEMENT OF ANY DOMESTIC OR FOREIGN PATENT, COPYRIGHTS, TRADE
70-
SECRETS OR OTHER PROPRIETARY RIGHTS OF ANY PARTY. IN NO EVENT SHALL
71-
COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR ANY DIRECT, INDIRECT,
72-
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
73-
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
74-
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
75-
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
76-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
77-
THIS SOFTWARE OR RELATING TO THIS AGREEMENT, EVEN IF ADVISED OF THE
78-
POSSIBILITY OF SUCH DAMAGE.
67+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
68+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
69+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
70+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
71+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
72+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
73+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
74+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
75+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
76+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

requirements/build.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
python
2+
setuptools

requirements/docs.txt

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
sphinx
2+
sphinx_rtd_theme
3+
doctr
4+
m2r

requirements/pip.txt

Whitespace-only changes.

requirements/run.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
numpy==1.26
2-
wxpython
3-
diffpy.pdffit2
4-
diffpy.utils
5-
matplotlib-base
1+
numpy==1.26
2+
wxpython
3+
diffpy.pdffit2
4+
diffpy.utils
5+
matplotlib-base

requirements/test.txt

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
pytest
1+
flake8
22
freezegun
3-
coverage
3+
pytest
44
codecov
5+
coverage
6+
pytest-env

src/diffpy/pdfgui/control/calculation.py

+2-9
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@
1919
import copy
2020
import math
2121

22-
from diffpy.pdfgui.control.controlerrors import (
23-
ControlConfigError,
24-
ControlKeyError,
25-
ControlValueError,
26-
)
22+
from diffpy.pdfgui.control.controlerrors import ControlConfigError, ControlKeyError, ControlValueError
2723
from diffpy.pdfgui.control.pdfcomponent import PDFComponent
2824
from diffpy.pdfgui.utils import pickle_loads, safeCPickleDumps
2925

@@ -124,10 +120,7 @@ def setRGrid(self, rmin=None, rstep=None, rmax=None):
124120

125121
def start(self):
126122
"""entry function for calculation"""
127-
from diffpy.pdfgui.control.fitting import (
128-
getEngineExceptions,
129-
handleEngineException,
130-
)
123+
from diffpy.pdfgui.control.fitting import getEngineExceptions, handleEngineException
131124

132125
try:
133126
self.calculate()

src/diffpy/pdfgui/control/fitting.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@
1818
import threading
1919
import time
2020

21-
from diffpy.pdfgui.control.controlerrors import (
22-
ControlError,
23-
ControlStatusError,
24-
ControlValueError,
25-
)
21+
from diffpy.pdfgui.control.controlerrors import ControlError, ControlStatusError, ControlValueError
2622
from diffpy.pdfgui.control.organizer import Organizer
2723
from diffpy.pdfgui.utils import pickle_loads, safeCPickleDumps
2824

src/diffpy/pdfgui/control/pdfguicontrol.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,7 @@
2424
import six.moves.cPickle as pickle
2525

2626
from diffpy.pdfgui.control.calculation import Calculation
27-
from diffpy.pdfgui.control.controlerrors import (
28-
ControlError,
29-
ControlFileError,
30-
ControlTypeError,
31-
)
27+
from diffpy.pdfgui.control.controlerrors import ControlError, ControlFileError, ControlTypeError
3228
from diffpy.pdfgui.control.fitdataset import FitDataSet
3329
from diffpy.pdfgui.control.fitstructure import FitStructure
3430
from diffpy.pdfgui.control.fitting import Fitting

src/diffpy/pdfgui/tests/conftest.py

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import json
2+
from pathlib import Path
3+
4+
import pytest
5+
6+
7+
@pytest.fixture
8+
def user_filesystem(tmp_path):
9+
base_dir = Path(tmp_path)
10+
home_dir = base_dir / "home_dir"
11+
home_dir.mkdir(parents=True, exist_ok=True)
12+
cwd_dir = base_dir / "cwd_dir"
13+
cwd_dir.mkdir(parents=True, exist_ok=True)
14+
15+
home_config_data = {"username": "home_username", "email": "[email protected]"}
16+
with open(home_dir / "diffpyconfig.json", "w") as f:
17+
json.dump(home_config_data, f)
18+
19+
yield tmp_path

src/diffpy/pdfgui/tests/testphaseconfigurepanel.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,7 @@
2323

2424
from diffpy.pdfgui.gui.mainframe import MainFrame
2525
from diffpy.pdfgui.gui.phaseconfigurepanel import PhaseConfigurePanel
26-
from diffpy.pdfgui.tests.testutils import (
27-
GUITestCase,
28-
clickcell,
29-
datafile,
30-
overrideclipboard,
31-
tooltiptext,
32-
)
26+
from diffpy.pdfgui.tests.testutils import GUITestCase, clickcell, datafile, overrideclipboard, tooltiptext
3327

3428
# ----------------------------------------------------------------------------
3529

0 commit comments

Comments
 (0)