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
2 changes: 0 additions & 2 deletions .github/workflows/build-wheel-release-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ jobs:
project: diffpy.srxplanar
c_extension: false
maintainer_GITHUB_username: sbillinge
run: |
pip install diffpy.srxconfutils

secrets:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/publish-docs-on-release.yml

This file was deleted.

27 changes: 24 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,33 @@ by citing the following paper in your publication:
Installation
------------

The preferred method is to be installed with `xpdfsuite` package or the wheel file.
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.

To install the package with the wheel file, you can first download the wheel file, then type
To add "conda-forge" to the conda channels, run the following in a terminal. ::

`pip install /path/to/diffpy.srxplanar-X.Y.Z-py3-none-any.whl`.
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.srxplanar_env`` ::

conda create -n diffpy.srxplanar_env diffpy.srxplanar
conda activate diffpy.srxplanar_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 <https://pypi.python.org>`_.
To install using ``pip`` into your ``diffpy.srxplanar_env`` environment, type ::

pip install diffpy.srxplanar

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

pip install .

This package also provides command-line utilities. To check the software has been installed correctly, type ::

Expand Down
8 changes: 4 additions & 4 deletions cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
"maintainer_name": "Simon Billinge",
"maintainer_email": "sb2896@columbia.edu",
"maintainer_github_username": "sbillinge",
"contributors": "Simon Billinge, Billinge Group members",
"contributors": "Xiaohao Yang and Billinge Group members",
"license_holders": "The Trustees of Columbia University in the City of New York",
"project_name": "diffpy.srxplanar",
"github_username_or_orgname": "diffpy",
"github_repo_name": "diffpy.srxplanar",
"conda_pypi_package_dist_name": "diffpy.srxplanar",
"package_dir_name": "diffpy.srxplanar",
"project_short_description": "Distance Printer, calculate the inter atomic distances. Part of xPDFsuite",
"project_short_description": "2D diffraction image integration using non splitting pixel algorithm",
"project_keywords": "diffpy, pdf, data interpretation",
"minimum_supported_python_version": "3.12",
"maximum_supported_python_version": "3.14",
"minimum_supported_python_version": "3.11",
"maximum_supported_python_version": "3.13",
"project_needs_c_code_compiled": "No",
"project_has_gui_tests": "No"
}
23 changes: 23 additions & 0 deletions news/update-workflows.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* No news added: Update installation instructions in README.rst and other minor fixes.

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* <news item>

**Security:**

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

[project.scripts]
diffpy-srxplanar = "diffpy.srxplanar_app:main"
diffpy-srxplanar = "diffpy.srxplanar.srxplanar_app:main"

[tool.setuptools.dynamic]
dependencies = {file = ["requirements/pip.txt"]}
Expand Down
1 change: 1 addition & 0 deletions requirements/conda.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ scipy
fabio
tifffile
configparser
diffpy.srxconfutils
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I delete this for now so CI can pass? Since srxconfutils is not on CF

Copy link
Contributor

Choose a reason for hiding this comment

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

no, let's leave it here for now. We can do the release for this when that is available on cf

33 changes: 33 additions & 0 deletions src/diffpy/srxplanar/srxplanar_app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import argparse

from diffpy.srxplanar.version import __version__ # noqa


def main():
parser = argparse.ArgumentParser(
prog="diffpy.srxplanar",
description=(
"2D diffraction image integration using non "
"splitting pixel algorithm\n\nFor more information, visit: "
"https://github.com/diffpy/diffpy.srxplanar/"
),
formatter_class=argparse.RawDescriptionHelpFormatter,
)

parser.add_argument(
"--version",
action="store_true",
help="Show the program's version number and exit",
)

args = parser.parse_args()

if args.version:
print(f"diffpy.srxplanar {__version__}")
else:
# Default behavior when no arguments are given
parser.print_help()


if __name__ == "__main__":
main()
Loading