From 06ca075ae6e62022b44c888441b97a20f4b70d46 Mon Sep 17 00:00:00 2001 From: stevenhua0320 Date: Sun, 5 Oct 2025 22:16:56 -0400 Subject: [PATCH 1/8] skpkg: migrate docs/source files --- docs/source/_static/.placeholder | 0 docs/source/api/diffpy.srxplanargui.rst | 30 +++ docs/source/conf.py | 322 ++++++++++++++++++++++++ docs/source/index.rst | 56 +++++ docs/source/license.rst | 38 +++ docs/source/release.rst | 5 + 6 files changed, 451 insertions(+) create mode 100644 docs/source/_static/.placeholder create mode 100644 docs/source/api/diffpy.srxplanargui.rst create mode 100644 docs/source/conf.py create mode 100644 docs/source/index.rst create mode 100644 docs/source/license.rst create mode 100644 docs/source/release.rst diff --git a/docs/source/_static/.placeholder b/docs/source/_static/.placeholder new file mode 100644 index 0000000..e69de29 diff --git a/docs/source/api/diffpy.srxplanargui.rst b/docs/source/api/diffpy.srxplanargui.rst new file mode 100644 index 0000000..7dab4cd --- /dev/null +++ b/docs/source/api/diffpy.srxplanargui.rst @@ -0,0 +1,30 @@ +:tocdepth: -1 + +|title| +======= + +.. |title| replace:: diffpy.srxplanargui package + +.. automodule:: diffpy.srxplanargui + :members: + :undoc-members: + :show-inheritance: + +Subpackages +----------- + +.. toctree:: + diffpy.srxplanargui.example_package + +Submodules +---------- + +|module| +-------- + +.. |module| replace:: diffpy.srxplanargui.example_submodule module + +.. automodule:: diffpy.srxplanargui.example_submodule + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/conf.py b/docs/source/conf.py new file mode 100644 index 0000000..4d8de40 --- /dev/null +++ b/docs/source/conf.py @@ -0,0 +1,322 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# diffpy.srxplanargui documentation build configuration file, created by # noqa: E501 +# sphinx-quickstart on Thu Jan 30 15:49:41 2014. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys +import time +from importlib.metadata import version +from pathlib import Path + +# Attempt to import the version dynamically from GitHub tag. +try: + fullversion = version("diffpy.srxplanargui") +except Exception: + fullversion = "No version found. The correct version will appear in the released version." # noqa: E501 + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use Path().resolve() to make it absolute, like shown here. # noqa: E501 +# sys.path.insert(0, str(Path(".").resolve())) +sys.path.insert(0, str(Path("../..").resolve())) +sys.path.insert(0, str(Path("../../src").resolve())) + +# abbreviations +ab_authors = "Rundong Hua, Simon Billinge, Billinge Group members" + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + "sphinx.ext.autodoc", + "sphinx.ext.napoleon", + "sphinx.ext.todo", + "sphinx.ext.viewcode", + "sphinx.ext.intersphinx", + "sphinx_rtd_theme", + "sphinx_copybutton", + "m2r", +] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ["_templates"] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +source_suffix = [".rst", ".md"] + +# The encoding of source files. +# source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = "index" + +# General information about the project. +project = "diffpy.srxplanargui" +copyright = "%Y, The Trustees of Columbia University in the City of New York" + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. + +# The short X.Y version. +version = "".join(fullversion.split(".post")[:1]) +# The full version, including alpha/beta/rc tags. +release = fullversion + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +# today = '' +today = time.strftime("%B %d, %Y", time.localtime()) +year = today.split()[-1] +# Else, today_fmt is used as the format for a strftime call. +# today_fmt = '%B %d, %Y' +# substitute YEAR in the copyright string +copyright = copyright.replace("%Y", year) + +# For sphinx_copybutton extension. +# Do not copy "$" for shell commands in code-blocks. +copybutton_prompt_text = r"^\$ " +copybutton_prompt_is_regexp = True + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ["build"] + +# The reST default role (used for this markup: `text`) to use for all +# documents. +# default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +# add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +# add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +# show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = "sphinx" + +# A list of ignored prefixes for module index sorting. +modindex_common_prefix = ["diffpy.srxplanargui"] + +# Display all warnings for missing links. +nitpicky = True + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = "sphinx_rtd_theme" + +html_context = { + "display_github": True, + "github_user": "diffpy", + "github_repo": "diffpy.srxplanargui", + "github_version": "main", + "conf_py_path": "/docs/source/", +} + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# +html_theme_options = { + "navigation_with_keys": "true", +} + +# Add any paths that contain custom themes here, relative to this directory. +# html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +# html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +# html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +# html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +# html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +# html_static_path = ['_static'] + +# Add any extra paths that contain custom files (such as robots.txt or +# .htaccess) here, relative to this directory. These files are copied +# directly to the root of the documentation. +# html_extra_path = [] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +# html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +# html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +# html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +# html_additional_pages = {} + +# If false, no module index is generated. +# html_domain_indices = True + +# If false, no index is generated. +# html_use_index = True + +# If true, the index is split into individual pages for each letter. +# html_split_index = False + +# If true, links to the reST sources are added to the pages. +# html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +# html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +# html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +# html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +# html_file_suffix = None + +# Output file base name for HTML help builder. +basename = "diffpy.srxplanargui".replace(" ", "").replace(".", "") +htmlhelp_basename = basename + "doc" + + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # 'papersize': 'letterpaper', + # The font size ('10pt', '11pt' or '12pt'). + # 'pointsize': '10pt', + # Additional stuff for the LaTeX preamble. + # 'preamble': '', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + ( + "index", + "diffpy.srxplanargui.tex", + "diffpy.srxplanargui Documentation", + ab_authors, + "manual", + ), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +# latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +# latex_use_parts = False + +# If true, show page references after internal links. +# latex_show_pagerefs = False + +# If true, show URL addresses after external links. +# latex_show_urls = False + +# Documents to append as an appendix to all manuals. +# latex_appendices = [] + +# If false, no module index is generated. +# latex_domain_indices = True + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + ( + "index", + "diffpy.srxplanargui", + "diffpy.srxplanargui Documentation", + ab_authors, + 1, + ) +] + +# If true, show URL addresses after external links. +# man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + ( + "index", + "diffpy.srxplanargui", + "diffpy.srxplanargui Documentation", + ab_authors, + "diffpy.srxplanargui", + "One line description of project.", + "Miscellaneous", + ), +] + +# Documents to append as an appendix to all manuals. +# texinfo_appendices = [] + +# If false, no module index is generated. +# texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +# texinfo_show_urls = 'footnote' + +# If true, do not generate a @detailmenu in the "Top" node's menu. +# texinfo_no_detailmenu = False + + +# Example configuration for intersphinx: refer to the Python standard library. +# intersphinx_mapping = {'http://docs.python.org/': None} diff --git a/docs/source/index.rst b/docs/source/index.rst new file mode 100644 index 0000000..4f15775 --- /dev/null +++ b/docs/source/index.rst @@ -0,0 +1,56 @@ +####### +|title| +####### + +.. |title| replace:: diffpy.srxplanargui documentation + +``diffpy.srxplanargui`` - xPDFsuite, a software for PDF transformation and visualization. + +| Software version |release| +| Last updated |today|. + +=============== +Getting started +=============== + +Welcome to the ``diffpy.srxplanargui`` documentation! + +To get started, please visit the :ref:`Getting started ` page. + +======= +Authors +======= + +``diffpy.srxplanargui`` is developed by Rundong Hua, Simon Billinge, Billinge Group members. The maintainer for this project is Simon Billinge. For a detailed list of contributors see +https://github.com/diffpy/diffpy.srxplanargui/graphs/contributors. + +============ +Installation +============ + +See the `README `_ +file included with the distribution. + +================ +Acknowledgements +================ + +``diffpy.srxplanargui`` is built and maintained with `scikit-package `_. + +================= +Table of contents +================= +.. toctree:: + :maxdepth: 2 + + getting-started + Package API + release + license + +======= +Indices +======= + +* :ref:`genindex` +* :ref:`search` diff --git a/docs/source/license.rst b/docs/source/license.rst new file mode 100644 index 0000000..5e751f7 --- /dev/null +++ b/docs/source/license.rst @@ -0,0 +1,38 @@ +:tocdepth: -1 + +.. index:: license + +License +####### + +OPEN SOURCE LICENSE AGREEMENT +============================= +BSD 3-Clause License + +Copyright (c) 2025, The Trustees of Columbia University in the City of New York. +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. diff --git a/docs/source/release.rst b/docs/source/release.rst new file mode 100644 index 0000000..27cd0cc --- /dev/null +++ b/docs/source/release.rst @@ -0,0 +1,5 @@ +:tocdepth: -1 + +.. index:: release notes + +.. include:: ../../CHANGELOG.rst From 9a65970f6273a4ea0ded3d1d3791ba8f7f2c9001 Mon Sep 17 00:00:00 2001 From: stevenhua0320 Date: Sun, 5 Oct 2025 22:30:08 -0400 Subject: [PATCH 2/8] skpkg: add config files for authors, changelog, code of conduct, license --- AUTHORS.rst | 12 ++++ CHANGELOG.rst | 5 ++ CODE-OF-CONDUCT.rst | 133 ++++++++++++++++++++++++++++++++++++++++++++ LICENSE.rst | 41 ++++++++++++++ 4 files changed, 191 insertions(+) create mode 100644 AUTHORS.rst create mode 100644 CHANGELOG.rst create mode 100644 CODE-OF-CONDUCT.rst create mode 100644 LICENSE.rst diff --git a/AUTHORS.rst b/AUTHORS.rst new file mode 100644 index 0000000..1e8f9f1 --- /dev/null +++ b/AUTHORS.rst @@ -0,0 +1,12 @@ +Authors +======= + +Xiaohao Yang + +Rundong Hua, Simon Billinge, Billinge Group members + +Contributors +------------ + +For a list of contributors, visit +https://github.com/diffpy/diffpy.srxplanargui/graphs/contributors diff --git a/CHANGELOG.rst b/CHANGELOG.rst new file mode 100644 index 0000000..f29d3b5 --- /dev/null +++ b/CHANGELOG.rst @@ -0,0 +1,5 @@ +============= +Release notes +============= + +.. current developments diff --git a/CODE-OF-CONDUCT.rst b/CODE-OF-CONDUCT.rst new file mode 100644 index 0000000..e8199ca --- /dev/null +++ b/CODE-OF-CONDUCT.rst @@ -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 `_. + +Community Impact Guidelines were inspired by `Mozilla's code of conduct enforcement ladder `_. + +For answers to common questions about this code of conduct, see the `FAQ `_. `Translations are available `_ diff --git a/LICENSE.rst b/LICENSE.rst new file mode 100644 index 0000000..bbe00c6 --- /dev/null +++ b/LICENSE.rst @@ -0,0 +1,41 @@ +BSD 3-Clause License + +Copyright (c) 2025, The Trustees of Columbia University in the City of New York. +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. + +Use of this software is subject to and permitted only under a separate, +written Use License granted by Columbia University. If you or your employer +is not a party to such an agreement, then your use of this software is +prohibited. If you don’t know whether or not your anticipated use is under +a license, you must contact Prof. Simon Billinge at sb2896@columbia.edu. +Use of this software without a license is prohibited. + +Copyright 2009-2016, Trustees of Columbia University in the City of New York. + + +For more information please email Prof. Simon Billinge at sb2896@columbia.edu \ No newline at end of file From 6c2dfbaa05b7e4bf72c3e699678234ac25bdb09d Mon Sep 17 00:00:00 2001 From: stevenhua0320 Date: Sun, 5 Oct 2025 22:30:19 -0400 Subject: [PATCH 3/8] skpkg: add MANIFEST.in --- MANIFEST.in | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 982d898..f1a78ee 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,12 @@ -recursive-include dpx * -prune doc -exclude MANIFEST.in +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. From 46ce44bd94caaeffa4877b099397b648b2be1ff6 Mon Sep 17 00:00:00 2001 From: stevenhua0320 Date: Sun, 5 Oct 2025 22:30:20 -0400 Subject: [PATCH 4/8] skpkg: add README.rst --- README.rst | 150 ++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 121 insertions(+), 29 deletions(-) diff --git a/README.rst b/README.rst index 6cc2e20..07d817c 100644 --- a/README.rst +++ b/README.rst @@ -1,45 +1,137 @@ -dpx.srxplanargui -======================================================================== +|Icon| |title|_ +=============== + +.. |title| replace:: diffpy.srxplanargui +.. _title: https://diffpy.github.io/diffpy.srxplanargui + +.. |Icon| image:: https://avatars.githubusercontent.com/diffpy + :target: https://diffpy.github.io/diffpy.srxplanargui + :height: 100px + +|PyPI| |Forge| |PythonVersion| |PR| + +|CI| |Codecov| |Black| |Tracking| + +.. |Black| image:: https://img.shields.io/badge/code_style-black-black + :target: https://github.com/psf/black + +.. |CI| image:: https://github.com/diffpy/diffpy.srxplanargui/actions/workflows/matrix-and-codecov-on-merge-to-main.yml/badge.svg + :target: https://github.com/diffpy/diffpy.srxplanargui/actions/workflows/matrix-and-codecov-on-merge-to-main.yml + +.. |Codecov| image:: https://codecov.io/gh/diffpy/diffpy.srxplanargui/branch/main/graph/badge.svg + :target: https://codecov.io/gh/diffpy/diffpy.srxplanargui + +.. |Forge| image:: https://img.shields.io/conda/vn/conda-forge/diffpy.srxplanargui + :target: https://anaconda.org/conda-forge/diffpy.srxplanargui + +.. |PR| image:: https://img.shields.io/badge/PR-Welcome-29ab47ff + :target: https://github.com/diffpy/diffpy.srxplanargui/pulls + +.. |PyPI| image:: https://img.shields.io/pypi/v/diffpy.srxplanargui + :target: https://pypi.org/project/diffpy.srxplanargui/ + +.. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/diffpy.srxplanargui + :target: https://pypi.org/project/diffpy.srxplanargui/ + +.. |Tracking| image:: https://img.shields.io/badge/issue_tracking-github-blue + :target: https://github.com/diffpy/diffpy.srxplanargui/issues + +xPDFsuite, a software for PDF transformation and visualization. GUI for diffpy.srxplanar -REQUIREMENTS ------------------------------------------------------------------------- +For more information about the diffpy.srxplanargui library, please consult our `online documentation `_. + +Citation +-------- + +If you use diffpy.srxplanargui in a scientific publication, we would like you to cite this package as + + diffpy.srxplanargui Package, https://github.com/diffpy/diffpy.srxplanargui + +Installation +------------ + +The preferred method is to use `Miniconda Python +`_ +and install from the "conda-forge" channel of Conda packages. + +To add "conda-forge" to the conda channels, run the following in a terminal. :: + + conda config --add channels conda-forge + +We want to install our packages in a suitable conda environment. +The following creates and activates a new environment named ``diffpy.srxplanargui_env`` :: + + conda create -n diffpy.srxplanargui_env diffpy.srxplanargui + conda activate diffpy.srxplanargui_env + +The output should print the latest version displayed on the badges above. + +If the above does not work, you can use ``pip`` to download and install the latest release from +`Python Package Index `_. +To install using ``pip`` into your ``diffpy.srxplanargui_env`` environment, type :: + + pip install diffpy.srxplanargui + +If you prefer to install from sources, after installing the dependencies, obtain the source archive from +`GitHub `_. Once installed, ``cd`` into your ``diffpy.srxplanargui`` directory +and run the following :: + + pip install . + +This package also provides command-line utilities. To check the software has been installed correctly, type :: + + diffpy.srxplanargui --version + +You can also type the following command to verify the installation. :: + + python -c "import diffpy.srxplanargui; print(diffpy.srxplanargui.__version__)" + + +To view the basic usage and available commands, type :: + + diffpy.srxplanargui -h + +Getting Started +--------------- + +You may consult our `online documentation `_ for tutorials and API references. + +Support and Contribute +---------------------- -The dpx.srxplanargui requires Python 2.7 and the following software: +If you see a bug or want to request a feature, please `report it as an issue `_ and/or `submit a fix as a PR `_. -* ``diffpy.srxplanar`` -* ``dpx.confutils`` -* ``numpy`` -* ``scipy`` -* ``traits`` -* ``traitsui`` -* ``chaco`` +Feel free to fork the project and contribute. To install diffpy.srxplanargui +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 :: -The image integration (diffpy.srxplanargui) requires + pip install -e . -* ``fabio`` -* ``pyfai`` -* ``matplotlib`` +To ensure code quality and to prevent accidental commits into the default branch, please set up the use of our pre-commit +hooks. -INSTALLATION ------------------------------------------------------------------------- +1. Install pre-commit in your working environment by running ``conda install pre-commit``. -We are going to release conda package for all platform. For general user -please use the installation file and install software. For developor, -you can install dpx.srxplanargui using +2. Initialize pre-commit (one time only) ``pre-commit install``. - python setup.py install +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. -Note: the dependency is not specified in the setup.py. You need to install -them yourself. You can use Anaconda or other python enviroment. +Improvements and fixes are always appreciated. +Before contributing, please read our `Code of Conduct `_. -CONTACTS ------------------------------------------------------------------------- +Contact +------- -For more information on diffpy.Structure please visit the project web-page +For more information on diffpy.srxplanargui please visit the project `web-page `_ or email Simon Billinge at sb2896@columbia.edu. -http://www.diffpy.org/ +Acknowledgements +---------------- -or email Prof. Simon Billinge at sb2896@columbia.edu. +``diffpy.srxplanargui`` is built and maintained with `scikit-package `_. From 9fcb5449497b4927d533673d20a05859a7a6db2a Mon Sep 17 00:00:00 2001 From: stevenhua0320 Date: Sun, 5 Oct 2025 22:31:34 -0400 Subject: [PATCH 5/8] skpkg: add news files --- news/TEMPLATE.rst | 23 +++++++++++++++++++++++ news/doc.rst | 23 +++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 news/TEMPLATE.rst create mode 100644 news/doc.rst diff --git a/news/TEMPLATE.rst b/news/TEMPLATE.rst new file mode 100644 index 0000000..790d30b --- /dev/null +++ b/news/TEMPLATE.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +* diff --git a/news/doc.rst b/news/doc.rst new file mode 100644 index 0000000..b0ec659 --- /dev/null +++ b/news/doc.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* Support ``scikit-package`` Level 5 standard (https://scikit-package.github.io/scikit-package/). + +**Security:** + +* From 6c9922a05b0048a8d64bb7836a0f82b8d117ca1f Mon Sep 17 00:00:00 2001 From: stevenhua0320 Date: Tue, 7 Oct 2025 11:06:24 -0400 Subject: [PATCH 6/8] skpkg:change authors, license and readme to be correct --- AUTHORS.rst | 2 +- LICENSE.rst | 5 +---- README.rst | 41 ++++++++--------------------------------- 3 files changed, 10 insertions(+), 38 deletions(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index 1e8f9f1..51563e5 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -3,7 +3,7 @@ Authors Xiaohao Yang -Rundong Hua, Simon Billinge, Billinge Group members +Billinge Group members Contributors ------------ diff --git a/LICENSE.rst b/LICENSE.rst index bbe00c6..2f2c195 100644 --- a/LICENSE.rst +++ b/LICENSE.rst @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2025, The Trustees of Columbia University in the City of New York. +Copyright (c) 2009-2025, The Trustees of Columbia University in the City of New York. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -35,7 +35,4 @@ prohibited. If you don’t know whether or not your anticipated use is under a license, you must contact Prof. Simon Billinge at sb2896@columbia.edu. Use of this software without a license is prohibited. -Copyright 2009-2016, Trustees of Columbia University in the City of New York. - - For more information please email Prof. Simon Billinge at sb2896@columbia.edu \ No newline at end of file diff --git a/README.rst b/README.rst index 07d817c..1a733d7 100644 --- a/README.rst +++ b/README.rst @@ -8,9 +8,9 @@ :target: https://diffpy.github.io/diffpy.srxplanargui :height: 100px -|PyPI| |Forge| |PythonVersion| |PR| +|PythonVersion| |PR| -|CI| |Codecov| |Black| |Tracking| +|CI| |Black| |Tracking| .. |Black| image:: https://img.shields.io/badge/code_style-black-black :target: https://github.com/psf/black @@ -47,32 +47,14 @@ Citation If you use diffpy.srxplanargui in a scientific publication, we would like you to cite this package as - diffpy.srxplanargui Package, https://github.com/diffpy/diffpy.srxplanargui + Yang, X., Juhas, P., Farrow, C. L., & Billinge, S. J. (2014). + xPDFsuite: an end-to-end software solution for high throughput pair distribution function transformation, + visualization and analysis. arXiv preprint arXiv:1402.3163. Installation ------------ -The preferred method is to use `Miniconda Python -`_ -and install from the "conda-forge" channel of Conda packages. - -To add "conda-forge" to the conda channels, run the following in a terminal. :: - - conda config --add channels conda-forge - -We want to install our packages in a suitable conda environment. -The following creates and activates a new environment named ``diffpy.srxplanargui_env`` :: - - conda create -n diffpy.srxplanargui_env diffpy.srxplanargui - conda activate diffpy.srxplanargui_env - -The output should print the latest version displayed on the badges above. - -If the above does not work, you can use ``pip`` to download and install the latest release from -`Python Package Index `_. -To install using ``pip`` into your ``diffpy.srxplanargui_env`` environment, type :: - - pip install diffpy.srxplanargui +The preferred method is to be installed with ""xpdfsuite"" package or the wheel file. If you prefer to install from sources, after installing the dependencies, obtain the source archive from `GitHub `_. Once installed, ``cd`` into your ``diffpy.srxplanargui`` directory @@ -93,17 +75,12 @@ To view the basic usage and available commands, type :: diffpy.srxplanargui -h -Getting Started ---------------- - -You may consult our `online documentation `_ for tutorials and API references. - -Support and Contribute +Support ---------------------- If you see a bug or want to request a feature, please `report it as an issue `_ and/or `submit a fix as a PR `_. -Feel free to fork the project and contribute. To install diffpy.srxplanargui +Feel free to fork the project. To install diffpy.srxplanargui 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 :: @@ -124,8 +101,6 @@ trying to commit again. Improvements and fixes are always appreciated. -Before contributing, please read our `Code of Conduct `_. - Contact ------- From fac04bb34b65a382a80db882474e146ceec222b0 Mon Sep 17 00:00:00 2001 From: stevenhua0320 Date: Tue, 7 Oct 2025 11:07:51 -0400 Subject: [PATCH 7/8] add news for py2 to py3 fix --- news/doc.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/news/doc.rst b/news/doc.rst index b0ec659..7677ce5 100644 --- a/news/doc.rst +++ b/news/doc.rst @@ -16,6 +16,7 @@ **Fixed:** +* Change "diffpy.srxplanargui" from python 2 to python 3 architecture. * Support ``scikit-package`` Level 5 standard (https://scikit-package.github.io/scikit-package/). **Security:** From 5c5a993dd896b6edd6f7a38865539b693e52e1b4 Mon Sep 17 00:00:00 2001 From: stevenhua0320 Date: Tue, 7 Oct 2025 16:52:11 -0400 Subject: [PATCH 8/8] skpkg: change license and readme to correct private repo format --- LICENSE.rst | 27 --------------------------- README.rst | 21 +++------------------ 2 files changed, 3 insertions(+), 45 deletions(-) diff --git a/LICENSE.rst b/LICENSE.rst index 2f2c195..171b401 100644 --- a/LICENSE.rst +++ b/LICENSE.rst @@ -1,33 +1,6 @@ -BSD 3-Clause License - Copyright (c) 2009-2025, The Trustees of Columbia University in the City of New York. 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. - Use of this software is subject to and permitted only under a separate, written Use License granted by Columbia University. If you or your employer is not a party to such an agreement, then your use of this software is diff --git a/README.rst b/README.rst index 1a733d7..b831934 100644 --- a/README.rst +++ b/README.rst @@ -10,28 +10,21 @@ |PythonVersion| |PR| -|CI| |Black| |Tracking| +|Black| |Tracking| .. |Black| image:: https://img.shields.io/badge/code_style-black-black :target: https://github.com/psf/black -.. |CI| image:: https://github.com/diffpy/diffpy.srxplanargui/actions/workflows/matrix-and-codecov-on-merge-to-main.yml/badge.svg - :target: https://github.com/diffpy/diffpy.srxplanargui/actions/workflows/matrix-and-codecov-on-merge-to-main.yml - .. |Codecov| image:: https://codecov.io/gh/diffpy/diffpy.srxplanargui/branch/main/graph/badge.svg :target: https://codecov.io/gh/diffpy/diffpy.srxplanargui -.. |Forge| image:: https://img.shields.io/conda/vn/conda-forge/diffpy.srxplanargui - :target: https://anaconda.org/conda-forge/diffpy.srxplanargui - .. |PR| image:: https://img.shields.io/badge/PR-Welcome-29ab47ff :target: https://github.com/diffpy/diffpy.srxplanargui/pulls .. |PyPI| image:: https://img.shields.io/pypi/v/diffpy.srxplanargui :target: https://pypi.org/project/diffpy.srxplanargui/ -.. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/diffpy.srxplanargui - :target: https://pypi.org/project/diffpy.srxplanargui/ +.. |PythonVersion| image:: https://img.shields.io/badge/python-3.11%20|%203.12%20|%203.13-blue .. |Tracking| image:: https://img.shields.io/badge/issue_tracking-github-blue :target: https://github.com/diffpy/diffpy.srxplanargui/issues @@ -40,8 +33,6 @@ xPDFsuite, a software for PDF transformation and visualization. GUI for diffpy.srxplanar -For more information about the diffpy.srxplanargui library, please consult our `online documentation `_. - Citation -------- @@ -54,13 +45,7 @@ If you use diffpy.srxplanargui in a scientific publication, we would like you to Installation ------------ -The preferred method is to be installed with ""xpdfsuite"" package or the wheel file. - -If you prefer to install from sources, after installing the dependencies, obtain the source archive from -`GitHub `_. Once installed, ``cd`` into your ``diffpy.srxplanargui`` directory -and run the following :: - - pip install . +The preferred method is to be installed with `xpdfsuite` package or the wheel file. This package also provides command-line utilities. To check the software has been installed correctly, type ::