Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/matrix-and-codecov-on-merge-to-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@ jobs:
project: diffpy.cmisas
c_extension: false
headless: false
run: |
set -Eeuo pipefail
python -m pip install --no-deps diffpy.srfit==3.4.0rc0
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
3 changes: 3 additions & 0 deletions .github/workflows/tests-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@ jobs:
project: diffpy.cmisas
c_extension: false
headless: false
run: |
set -Eeuo pipefail
python -m pip install --no-deps diffpy.srfit==3.4.0rc0
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
34 changes: 34 additions & 0 deletions LICENSE_DANSE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
This program is part of the DiffPy and DANSE open-source projects at Columbia
University and is available subject to the conditions and terms laid out below.

Copyright (c) 2008-2011, The Trustees of Columbia University in
the City of New York. All rights reserved.

For more information please visit the diffpy web-page at
http://www.diffpy.org
or email Prof. Simon Billinge at sb2896@columbia.edu.

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

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

* 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.

* Neither the names of COLUMBIA UNIVERSITY, MICHIGAN STATE UNIVERSITY nor the
names of their 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 OWNER 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.
31 changes: 0 additions & 31 deletions docs/source/api/diffpy.cmisas.example_package.rst

This file was deleted.

66 changes: 52 additions & 14 deletions docs/source/api/diffpy.cmisas.rst
Original file line number Diff line number Diff line change
@@ -1,30 +1,68 @@
:tocdepth: -1

|title|
=======

.. |title| replace:: diffpy.cmisas package
diffpy.cmisas package
=====================

.. automodule:: diffpy.cmisas
:members:
:undoc-members:
:show-inheritance:

Subpackages
-----------

.. toctree::
diffpy.cmisas.example_package

Submodules
----------

|module|
--------
diffpy.cmisas.sasgenerator module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: diffpy.cmisas.sasgenerator
:members:
:undoc-members:
:show-inheritance:

diffpy.cmisas.sasparser module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: diffpy.cmisas.sasparser
:members:
:undoc-members:
:show-inheritance:

diffpy.cmisas.sasprofile module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: diffpy.cmisas.sasprofile
:members:
:undoc-members:
:show-inheritance:

diffpy.cmisas.sasparameter module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: diffpy.cmisas.sasparameter
:members:
:undoc-members:
:show-inheritance:

diffpy.cmisas.prcalculator module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: diffpy.cmisas.prcalculator
:members:
:undoc-members:
:show-inheritance:

diffpy.cmisas.characteristicfunctions module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: diffpy.cmisas.characteristicfunctions
:members:
:undoc-members:
:show-inheritance:

.. |module| replace:: diffpy.cmisas.example_submodule module
diffpy.cmisas.sasimport module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: diffpy.cmisas.example_submodule
.. automodule:: diffpy.cmisas.sasimport
:members:
:undoc-members:
:show-inheritance:
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"sphinx.ext.intersphinx",
"sphinx_rtd_theme",
"sphinx_copybutton",
"m2r",
"m2r2",
]

# Add any paths that contain templates here, relative to this directory.
Expand Down
23 changes: 23 additions & 0 deletions news/port-sas.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* No news added: Port the SAS code from diffpy.srfit 3.4.0 and install the srfit rc in CI; cmisas is unreleased.

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* <news item>

**Security:**

* <news item>
8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,17 @@ exclude = [] # exclude packages matching these glob patterns (empty by default)
namespaces = false # to disable scanning PEP 420 namespaces (true by default)

[project.scripts]
diffpy-cmisas = "diffpy.cmisas.app:main"
diffpy-cmisas = "diffpy.cmisas.cmisas_app:main"

[tool.setuptools.dynamic]
dependencies = {file = ["requirements/pip.txt"]}

[tool.pytest.ini_options]
# Fail when cmisas source calls one of its own deprecated names.
filterwarnings = [
"error:'diffpy\\.cmisas\\.:DeprecationWarning:diffpy\\.cmisas",
]

[tool.codespell]
exclude-file = ".codespell/ignore_lines.txt"
ignore-words = ".codespell/ignore_words.txt"
Expand Down
3 changes: 3 additions & 0 deletions requirements/conda.txt
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
numpy
scipy
diffpy.srfit
sasdata
2 changes: 1 addition & 1 deletion requirements/docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ sphinx
sphinx_rtd_theme
sphinx-copybutton
doctr
m2r
m2r2
3 changes: 3 additions & 0 deletions requirements/pip.txt
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
numpy
scipy
diffpy.srfit
sasdata
1 change: 1 addition & 0 deletions requirements/tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ codecov
coverage
pytest-cov
pytest-env
sasmodels
4 changes: 4 additions & 0 deletions src/diffpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@
# See LICENSE.rst for license information.
#
##############################################################################

from pkgutil import extend_path

__path__ = extend_path(__path__, __name__)
16 changes: 15 additions & 1 deletion src/diffpy/cmisas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
# (c) 2025 Simon Billinge.
# All rights reserved.
#
# File coded by: Caden Myers, Simon Billinge, and members of the Billinge group.
# File coded by: Caden Myers, Simon Billinge, and members of the Billinge
# group.
#
# See GitHub contributions for a more detailed list of contributors.
# https://github.com/diffpy/diffpy.cmisas/graphs/contributors
Expand All @@ -14,6 +15,19 @@
##############################################################################
"""The code of the SAS pack of the diffpy.cmi package."""

__all__ = [
"SASGenerator",
"SASParser",
"SASProfile",
"PrCalculator",
"CFCalculator",
]

from diffpy.cmisas.prcalculator import CFCalculator, PrCalculator
from diffpy.cmisas.sasgenerator import SASGenerator
from diffpy.cmisas.sasparser import SASParser
from diffpy.cmisas.sasprofile import SASProfile

# package version
from diffpy.cmisas.version import __version__ # noqa

Expand Down
Loading
Loading