Skip to content
Merged
10 changes: 10 additions & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Authors
=======

Simon Billinge, Billinge Group members
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Xiaohao Yang and Billinge Group members


Contributors
------------

For a list of contributors, visit
https://github.com/diffpy/diffpy.srxplanar/graphs/contributors
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
=============
Release notes
=============

.. current developments
133 changes: 133 additions & 0 deletions CODE-OF-CONDUCT.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
=====================================
Contributor Covenant Code of Conduct
=====================================

Our Pledge
----------

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socioeconomic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

Our Standards
-------------

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

Enforcement Responsibilities
----------------------------

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

Scope
-----

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official email address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

Enforcement
-----------

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
sb2896@columbia.edu. All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

Enforcement Guidelines
----------------------

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

1. Correction
****************

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

2. Warning
*************

**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.

3. Temporary Ban
******************

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

4. Permanent Ban
******************

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the
community.

Attribution
-----------

This Code of Conduct is adapted from the `Contributor Covenant <https://www.contributor-covenant.org/version/2/1/code_of_conduct.html>`_.

Community Impact Guidelines were inspired by `Mozilla's code of conduct enforcement ladder <https://github.com/mozilla/inclusion>`_.

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>`_
30 changes: 30 additions & 0 deletions LICENSE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
BSD 3-Clause License

Copyright (c) 2008-2025, The Trustees of Columbia University in the City of New York.
Copyright (c) 1994-2025, Christoph Gohlke
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did Christoph Gohlke make edits all the way to this year? I don't know what he contributed, but in any case, leave the dates as they were.

All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17 changes: 12 additions & 5 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
recursive-include diffpy *
include AUTHORS.txt LICENSE.txt README.md
include setup.cfg
exclude MANIFEST.in
recursive-exclude diffpy *.pyc
graft src
graft tests
graft requirements

include AUTHORS.rst LICENSE*.rst README.rst

# Exclude all bytecode files and __pycache__ directories
global-exclude *.py[cod] # Exclude all .pyc, .pyo, and .pyd files.
global-exclude .DS_Store # Exclude Mac filesystem artifacts.
global-exclude __pycache__ # Exclude Python cache directories.
global-exclude .git* # Exclude git files and directories.
global-exclude .idea # Exclude PyCharm project settings.
128 changes: 76 additions & 52 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
diffpy.srxplanar
========================================================================
|Icon| |title|_
===============

.. |title| replace:: diffpy.srxplanar
.. _title: https://diffpy.github.io/diffpy.srxplanar

.. |Icon| image:: https://avatars.githubusercontent.com/diffpy
:target: https://diffpy.github.io/diffpy.srxplanar
:height: 100px

|PythonVersion| |PR|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this package is open source, I'm guessing that we are likely going to be releasing the package to PyPI/CF? Let's ask Professor Simon to be sure. If so, you can add back the CI and CF, etc flags that skpkg generates

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, this one can go to pypi and conda-forge


|Black| |Tracking|

.. |Black| image:: https://img.shields.io/badge/code_style-black-black
:target: https://github.com/psf/black

.. |Codecov| image:: https://codecov.io/gh/diffpy/diffpy.srxplanar/branch/main/graph/badge.svg
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are not releasing to PyPI/CF like you said, we should be good to delete the Codecov, PyPI icons, etc. Anything that we are not using like Black

:target: https://codecov.io/gh/diffpy/diffpy.srxplanar

.. |PR| image:: https://img.shields.io/badge/PR-Welcome-29ab47ff
:target: https://github.com/diffpy/diffpy.srxplanar/pulls

.. |PyPI| image:: https://img.shields.io/pypi/v/diffpy.srxplanar
:target: https://pypi.org/project/diffpy.srxplanar/

.. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/diffpy.srxplanar
:target: https://pypi.org/project/diffpy.srxplanar/

.. |Tracking| image:: https://img.shields.io/badge/issue_tracking-github-blue
:target: https://github.com/diffpy/diffpy.srxplanar/issues

Distance Printer, calculate the inter atomic distances. Part of xPDFsuite
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change description

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wanted to raise this again. I think this applies to distanceprinter?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it should not be here, but originally it is in its description in the project.toml. It is a little bit weird, but I would delete it and retain the other description of this package.


diffpy.srxplanar package provides 2D diffraction image integration using
non splitting pixel algorithm. And it can estimate and propagate statistic
Expand All @@ -17,79 +48,72 @@ included in this distribution or the API documentation at

http://diffpy.github.io/diffpy.srxplanar/

REQUIREMENTS
------------------------------------------------------------------------
For more information about the diffpy.srxplanar library, please consult our `online documentation <https://diffpy.github.io/diffpy.srxplanar>`_.

Citation
--------

If you use diffpy.srxplanar in a scientific publication, we would like you to cite this package as
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The citation info is already in the file. It should be referring to the paper, so maybe move that section here instead?


The diffpy.srxplanar requires Python 2.6 or 2.7 and the following software:
diffpy.srxplanar Package, https://github.com/diffpy/diffpy.srxplanar

* `setuptools` >=0.61(https://pypi.python.org/pypi/setuptools)
* `numpy` >=1.60(http://www.numpy.org/)
* `scipy` >=1.10(www.scipy.org/)
* `FabIO` >=0.80(http://sourceforge.net/projects/fable/files/fabio/)
Installation
------------

If your python version < 2.7 (these two packages are included in 2.7 but not in 2.6)
The preferred method is to be installed with `xpdfsuite` package or the wheel file.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, but if we do end up releasing this package to PyPI/CF, we can also mention how we can install it from there

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zmx27 Professor said we do the package in private repo way yesterday. So, I think we do not need to release it to PyPI/CF?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. Nitpicking here, but maybe we can also add in some instructions on how to install it as a wheel file


* `ordereddict` https://pypi.python.org/pypi/ordereddict
* `argparse` https://pypi.python.org/pypi/argparse
This package also provides command-line utilities. To check the software has been installed correctly, type ::

On Ubuntu Linux the part of required software can be easily installed using
the system package manager::
diffpy.srxplanar --version

sudo aptitude install \
python-setuptools python-numpy python-scipy
You can also type the following command to verify the installation. ::

For Mac OS X machine with the MacPorts package manager one could do::
python -c "import diffpy.srxplanar; print(diffpy.srxplanar.__version__)"

sudo port install \
python27 py27-setuptools py27-numpy py27-scipy

When installing with MacPorts, make sure the MacPorts bin directory is the
first in the system PATH and that python27 is selected as the default
Python version in MacPorts::
To view the basic usage and available commands, type ::

sudo port select --set python python27
diffpy.srxplanar -h

For other Linux distributions use their respective package manager; note
the packages may have slightly different names. diffpy.srxplanar should work
on other Unix-like operating systems as well. Please, search the
web for instructions how to install external dependencies on your particular
system.
Getting Started
---------------

For other packages, please go to the webpage list above to download and install.
You may consult our `online documentation <https://diffpy.github.io/diffpy.srxplanar>`_ for tutorials and API references.

Support and Contribute
----------------------

INSTALLATION
------------------------------------------------------------------------
If you see a bug or want to request a feature, please `report it as an issue <https://github.com/diffpy/diffpy.srxplanar/issues>`_ and/or `submit a fix as a PR <https://github.com/diffpy/diffpy.srxplanar/pulls>`_.

To install the diffpy.srxplanar package::
Feel free to fork the project. To install diffpy.srxplanar
in a development mode, with its sources being directly used by Python
rather than copied to a package directory, use the following in the root
directory ::

python setup.py install
pip install -e .

By default the files are installed in the system directories, which are
usually only writeable by the root. See the usage info
"./setup.py install --help" for options to install as a normal user under
different location. Note that installation to non-standard directories may
require adjustments to the PATH and PYTHONPATH environment variables.
To ensure code quality and to prevent accidental commits into the default branch, please set up the use of our pre-commit
hooks.

DEVELOPMENT
------------------------------------------------------------------------
1. Install pre-commit in your working environment by running ``conda install pre-commit``.

diffpy.srxplanar is an open-source software developed at the Columbia University
The diffpy.srxplanar sources are hosted at
2. Initialize pre-commit (one time only) ``pre-commit install``.

https://github.com/diffpy/diffpy.srxplanar
Thereafter your code will be linted by black and isort and checked against flake8 before you can commit.
If it fails by black or isort, just rerun and it should pass (black and isort will modify the files so should
pass after they are modified). If the flake8 test fails please see the error messages and fix them manually before
trying to commit again.

Feel free to fork the project and contribute. To install diffpy.srxplanar
in a development mode, where the sources are directly used by Python
rather than copied to a system directory, use::
Improvements and fixes are always appreciated.

python setup.py develop --user
Before contributing, please read our `Code of Conduct <https://github.com/diffpy/diffpy.srxplanar/blob/main/CODE-OF-CONDUCT.rst>`_.

CONTACTS
------------------------------------------------------------------------
Contact
-------

For more information on diffpy.srxplanar please visit the project web-page:
For more information on diffpy.srxplanar please visit the project `web-page <https://diffpy.github.io/>`_ or email Simon Billinge at sb2896@columbia.edu.

http://www.diffpy.org/
Acknowledgements
----------------

or email Prof. Simon Billinge at sb2896@columbia.edu
``diffpy.srxplanar`` is built and maintained with `scikit-package <https://scikit-package.github.io/scikit-package/>`_.
23 changes: 23 additions & 0 deletions news/TEMPLATE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* <news item>

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* <news item>

**Security:**

* <news item>
Loading