Skip to content

Commit 584597e

Browse files
authored
Merge pull request #41 from zmx27/update-workflows
skpkg: update README.rst installation instructions and other minor fixes
2 parents 7b9a5ea + 160c902 commit 584597e

File tree

8 files changed

+86
-22
lines changed

8 files changed

+86
-22
lines changed

.github/workflows/build-wheel-release-upload.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ jobs:
1313
project: diffpy.srxplanar
1414
c_extension: false
1515
maintainer_GITHUB_username: sbillinge
16-
run: |
17-
pip install diffpy.srxconfutils
1816

1917
secrets:
2018
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

.github/workflows/publish-docs-on-release.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

README.rst

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,33 @@ by citing the following paper in your publication:
6363
Installation
6464
------------
6565

66-
The preferred method is to be installed with `xpdfsuite` package or the wheel file.
66+
The preferred method is to use `Miniconda Python
67+
<https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html>`_
68+
and install from the "conda-forge" channel of Conda packages.
6769

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

70-
`pip install /path/to/diffpy.srxplanar-X.Y.Z-py3-none-any.whl`.
72+
conda config --add channels conda-forge
7173

74+
We want to install our packages in a suitable conda environment.
75+
The following creates and activates a new environment named ``diffpy.srxplanar_env`` ::
76+
77+
conda create -n diffpy.srxplanar_env diffpy.srxplanar
78+
conda activate diffpy.srxplanar_env
79+
80+
The output should print the latest version displayed on the badges above.
81+
82+
If the above does not work, you can use ``pip`` to download and install the latest release from
83+
`Python Package Index <https://pypi.python.org>`_.
84+
To install using ``pip`` into your ``diffpy.srxplanar_env`` environment, type ::
85+
86+
pip install diffpy.srxplanar
87+
88+
If you prefer to install from sources, after installing the dependencies, obtain the source archive from
89+
`GitHub <https://github.com/diffpy/diffpy.srxplanar/>`_. Once installed, ``cd`` into your ``diffpy.srxplanar`` directory
90+
and run the following ::
91+
92+
pip install .
7293

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

cookiecutter.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
"maintainer_name": "Simon Billinge",
33
"maintainer_email": "sb2896@columbia.edu",
44
"maintainer_github_username": "sbillinge",
5-
"contributors": "Simon Billinge, Billinge Group members",
5+
"contributors": "Xiaohao Yang and Billinge Group members",
66
"license_holders": "The Trustees of Columbia University in the City of New York",
77
"project_name": "diffpy.srxplanar",
88
"github_username_or_orgname": "diffpy",
99
"github_repo_name": "diffpy.srxplanar",
1010
"conda_pypi_package_dist_name": "diffpy.srxplanar",
1111
"package_dir_name": "diffpy.srxplanar",
12-
"project_short_description": "Distance Printer, calculate the inter atomic distances. Part of xPDFsuite",
12+
"project_short_description": "2D diffraction image integration using non splitting pixel algorithm",
1313
"project_keywords": "diffpy, pdf, data interpretation",
14-
"minimum_supported_python_version": "3.12",
15-
"maximum_supported_python_version": "3.14",
14+
"minimum_supported_python_version": "3.11",
15+
"maximum_supported_python_version": "3.13",
1616
"project_needs_c_code_compiled": "No",
1717
"project_has_gui_tests": "No"
1818
}

news/update-workflows.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
**Added:**
2+
3+
* No news added: Update installation instructions in README.rst and other minor fixes.
4+
5+
**Changed:**
6+
7+
* <news item>
8+
9+
**Deprecated:**
10+
11+
* <news item>
12+
13+
**Removed:**
14+
15+
* <news item>
16+
17+
**Fixed:**
18+
19+
* <news item>
20+
21+
**Security:**
22+
23+
* <news item>

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ exclude = [] # exclude packages matching these glob patterns (empty by default)
4949
namespaces = false # to disable scanning PEP 420 namespaces (true by default)
5050

5151
[project.scripts]
52-
diffpy-srxplanar = "diffpy.srxplanar_app:main"
52+
diffpy-srxplanar = "diffpy.srxplanar.srxplanar_app:main"
5353

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

requirements/conda.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ scipy
33
fabio
44
tifffile
55
configparser
6+
diffpy.srxconfutils
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import argparse
2+
3+
from diffpy.srxplanar.version import __version__ # noqa
4+
5+
6+
def main():
7+
parser = argparse.ArgumentParser(
8+
prog="diffpy.srxplanar",
9+
description=(
10+
"2D diffraction image integration using non "
11+
"splitting pixel algorithm\n\nFor more information, visit: "
12+
"https://github.com/diffpy/diffpy.srxplanar/"
13+
),
14+
formatter_class=argparse.RawDescriptionHelpFormatter,
15+
)
16+
17+
parser.add_argument(
18+
"--version",
19+
action="store_true",
20+
help="Show the program's version number and exit",
21+
)
22+
23+
args = parser.parse_args()
24+
25+
if args.version:
26+
print(f"diffpy.srxplanar {__version__}")
27+
else:
28+
# Default behavior when no arguments are given
29+
parser.print_help()
30+
31+
32+
if __name__ == "__main__":
33+
main()

0 commit comments

Comments
 (0)