Skip to content

skpkg: migrate documentation and rst files #137

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from
Closed
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
8 changes: 1 addition & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ __pycache__/
.Python
env/
build/
_build/
develop-eggs/
dist/
downloads/
Expand Down Expand Up @@ -90,10 +91,3 @@ target/

# Ipython Notebook
.ipynb_checkpoints

# version information
setup.cfg
/src/diffpy/*/version.cfg

# Rever
rever/
4 changes: 2 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
=============
Release Notes
Release notes
=============

.. current developments
Expand Down Expand Up @@ -65,7 +65,7 @@ Release Notes
* No notable functional changes from 1.4.1

1.4.4rc0
=====
========
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Needed to be extended to docs could render properly


**Fixed:**

Expand Down
58 changes: 25 additions & 33 deletions LICENSE.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
License
#######

BSD 3-Clause License
This program is part of the DiffPy and DANSE open-source projects
Copy link
Contributor

Choose a reason for hiding this comment

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

pretty sure it is not BSD-3 but please check. I need you to be a bit more careful here. The license is a legal thing and we don't want to get it wrong, so please pay close attention.

and is available subject to the conditions and terms laid out below.

Expand All @@ -13,40 +11,34 @@ the following paper in your publication:
in crystals (https://stacks.iop.org/0953-8984/19/335219), *J. Phys.: Condens. Matter*, 19, 335219 (2007)

Copyright 2006-2007, Board of Trustees of Michigan State University,
Copyright 2008-2024, Board of Trustees of Columbia University in the
Copyright 2008-2025, Board of Trustees of Columbia University in the
city of New York. (Copyright holder indicated in each source file).

For more information please visit the project web-page:
http://www.diffpy.org/
or email Prof. Simon Billinge at [email protected]

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

Choose a reason for hiding this comment

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

also a bit nervous about unilaterally changing the license here. It looks as if it is only a change from bullet list to enumerated list, but still. This is another argument for package update public, that it doesn't create a new license file.


* 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 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 COPYRIGHT HOLDER "AS IS". COPYRIGHT HOLDER
EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES AND CONDITIONS, EITHER
EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY, TITLE, FITNESS, ADEQUACY OR SUITABILITY
FOR A PARTICULAR PURPOSE, AND ANY WARRANTIES OF FREEDOM FROM
INFRINGEMENT OF ANY DOMESTIC OR FOREIGN PATENT, COPYRIGHTS, TRADE
SECRETS OR OTHER PROPRIETARY RIGHTS OF ANY PARTY. IN NO EVENT SHALL
COPYRIGHT HOLDER BE LIABLE TO ANY PARTY 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 OR RELATING TO THIS AGREEMENT, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
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.
42 changes: 20 additions & 22 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
:target: https://diffpy.github.io/diffpy.pdffit2
:height: 100px

|PyPi| |Forge| |PythonVersion| |PR|
|PyPI| |Forge| |PythonVersion| |PR|

|CI| |Codecov| |Black| |Tracking|

Expand All @@ -26,7 +26,7 @@

.. |PR| image:: https://img.shields.io/badge/PR-Welcome-29ab47ff

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

.. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/diffpy.pdffit2
Expand Down Expand Up @@ -87,19 +87,17 @@ The preferred method is to use `Miniconda Python
<https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html>`_
and install from the "conda-forge" channel of Conda packages.

Add the "conda-forge" channel by running the following command in a terminal: ::
To add "conda-forge" to the conda channels, run the following in a terminal. ::

conda config --add channels conda-forge

Create a new environment named ``diffpy.pdffit2_env`` and install ``diffpy.pdffit2``: ::
We want to install our packages in a suitable conda environment.
The following creates and activates a new environment named ``diffpy.pdffit2_env`` ::

conda create -n diffpy.pdffit2_env diffpy.pdffit2

Activate the environment: ::

conda activate diffpy.pdffit2_env

Confirm that the installation was successful: ::
To confirm that the installation was successful, type ::

python -c "import diffpy.pdffit2; print(diffpy.pdffit2.__version__)"

Expand All @@ -118,25 +116,20 @@ Install pdffit2 using ``pip`` to download and install the latest version from `P

pip install diffpy.pdffit2

Confirm that the installation was successful: ::
To confirm that the installation was successful, type ::

python -c "import diffpy.pdffit2; print(diffpy.pdffit2.__version__)"

Build from source
~~~~~~~~~~~~~~~~~
If you prefer to install from sources, after installing the dependencies, obtain the source archive from
`GitHub <https://github.com/diffpy/diffpy.pdffit2/>`_. Once installed, ``cd`` into your ``diffpy.pdffit2`` directory
and run the following ::

For advanced users, obtain the source archive, and in the ``diffpy.pdffit2`` directory, run ::
pip install .

conda create -n diffpy.pdffit2_env python=3.13 \
--file requirements/test.txt \
--file requirements/conda.txt \
--file requirements/build.txt
Getting Started
---------------

Activate the environment, build the package, and run unit tests by following commands sequentially: ::

conda activate diffpy.pdffit2_env
pip install . --no-deps
pytest
You may consult our `online documentation <https://diffpy.github.io/diffpy.pdffit2>`_ for tutorials and API references.

Support and Contribute
----------------------
Expand Down Expand Up @@ -182,4 +175,9 @@ Before contributing, please read our `Code of Conduct <https://github.com/diffpy
Contact
-------

For more information on diffpy.pdffit2 please visit the project `web-page <https://diffpy.github.io/>`_ or email Prof. Simon Billinge at [email protected].
For more information on diffpy.pdffit2 please visit the project `web-page <https://diffpy.github.io/>`_ or email Simon Billinge at [email protected].

Acknowledgements
----------------

``diffpy.pdffit2`` is built and maintained with `scikit-package <https://scikit-package.github.io/scikit-package/>`_.
6 changes: 4 additions & 2 deletions doc/source/api/diffpy.pdffit2.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
:tocdepth: -1

diffpy.pdffit2 package
======================
|title|
=======

.. |title| replace:: diffpy.pdffit2 package

.. automodule:: diffpy.pdffit2
:members:
Expand Down
4 changes: 4 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@
"m2r",
]

autodoc_mock_imports = [
"diffpy.pdffit2.pdffit2",
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

Expand Down
16 changes: 11 additions & 5 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

.. |title| replace:: diffpy.pdffit2 documentation

diffpy.pdffit2 - PDFfit2 - real space structure refinement program.
``diffpy.pdffit2`` - PDFfit2 - real space structure refinement program.

| Software version |release|.
| Software version |release|
| Last updated |today|.

The diffpy.pdffit2 package provides functions for the calculation and
Expand Down Expand Up @@ -75,19 +75,25 @@ in your publication:
Installation
============

Please see the `README <https://github.com/diffpy/diffpy.pdffit2#installation>`_
See the `README <https://github.com/diffpy/diffpy.pdffit2#installation>`_
file included with the distribution.

================
Acknowledgements
================

``diffpy.pdffit2`` is built and maintained with `scikit-package <https://scikit-package.github.io/scikit-package/>`_.

=================
Table of contents
=================
.. toctree::
:titlesonly:

license
release
examples
Package API <api/diffpy.pdffit2>
release
license

=======
Indices
Expand Down
61 changes: 28 additions & 33 deletions doc/source/license.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
License
#######

OPEN SOURCE LICENSE AGREEMENT
Copy link
Contributor

Choose a reason for hiding this comment

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

same here....no changes to licenses...

=============================
BSD 3-Clause License
This program is part of the DiffPy and DANSE open-source projects
and is available subject to the conditions and terms laid out below.

Expand All @@ -17,40 +20,32 @@ the following paper in your publication:
in crystals (https://stacks.iop.org/0953-8984/19/335219), *J. Phys.: Condens. Matter*, 19, 335219 (2007)

Copyright 2006-2007, Board of Trustees of Michigan State University,
Copyright 2008-|year|, Board of Trustees of Columbia University in the
Copyright 2008-2025, Board of Trustees of Columbia University in the
city of New York. (Copyright holder indicated in each source file).

For more information please visit the project web-page:
http://www.diffpy.org/
or email Prof. Simon Billinge at [email protected]
For more information please visit the project web-page: http://www.diffpy.org/ or email Prof. Simon Billinge at [email protected]

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 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 COPYRIGHT HOLDER "AS IS". COPYRIGHT HOLDER
EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES AND CONDITIONS, EITHER
EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY, TITLE, FITNESS, ADEQUACY OR SUITABILITY
FOR A PARTICULAR PURPOSE, AND ANY WARRANTIES OF FREEDOM FROM
INFRINGEMENT OF ANY DOMESTIC OR FOREIGN PATENT, COPYRIGHTS, TRADE
SECRETS OR OTHER PROPRIETARY RIGHTS OF ANY PARTY. IN NO EVENT SHALL
COPYRIGHT HOLDER BE LIABLE TO ANY PARTY 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 OR RELATING TO THIS AGREEMENT, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
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.
23 changes: 23 additions & 0 deletions news/rst-migration.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:**

* Migrate documentation to `scikit-package 0.1.0` standards, including a mock import for API rendering.

**Security:**

* <news item>
2 changes: 2 additions & 0 deletions src/diffpy/pdffit2/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,5 @@ def get_pypi_release_date(package_name, timeout=5):
__date__ = get_pypi_release_date("diffpy.pdffit2")

# End of file

# Release date: 2025-02-07
Loading