Skip to content

Commit ed56f46

Browse files
authored
Recut - update README for installation, issue templates, getting started (#227)
* Add workflow files and issues * Add py312 to pyproject * Update getting started, installation in readme * Add cookiecutter src init * Use existing version.py file * Fix preposition in readme * Add news * Reference online doc for manual instead * Use pdfgui instead of srmise in readme
1 parent 33194a0 commit ed56f46

File tree

8 files changed

+109
-26
lines changed

8 files changed

+109
-26
lines changed

.github/ISSUE_TEMPLATE/bug_feature.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: Bug Report or Feature Request
3+
about: Report a bug or suggest a new feature!
4+
title: ""
5+
labels: ""
6+
assignees: ""
7+
---
8+
9+
### Problem
10+
11+
<!--
12+
For a bug report, please copy and paste any error messages from the application or command-line here.
13+
For a feature request, please state how the new functionality could benefit the community.
14+
-->
15+
16+
### Proposed solution
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Release
3+
about: Checklist and communication channel for PyPI and GitHub release
4+
title: "Ready for <version-number> PyPI/GitHub release"
5+
labels: "release"
6+
assignees: ""
7+
---
8+
9+
### Release checklist for GitHub contributors
10+
11+
- [ ] All PRs/issues attached to the release are merged.
12+
- [ ] All the badges on the README are passing.
13+
- [ ] License information is verified as correct. If you are unsure, please comment below.
14+
- [ ] Locally rendered documentation contains all appropriate pages, including API references (check no modules are
15+
missing), tutorials, and other human written text is up-to-date with any changes in the code.
16+
- [ ] Installation instructions in the README, documentation and on the website (e.g., diffpy.org) are updated and
17+
tested
18+
- [ ] Successfully run any tutorial examples or do functional testing in some other way.
19+
- [ ] Grammar and writing quality have been checked (no typos).
20+
21+
Please mention @sbillinge when you are ready for release. Include any additional comments necessary, such as
22+
version information and details about the pre-release.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Release (GitHub/PyPI)
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- '*' # Trigger on all tags initially, but tag and release privilege are verified in _build-wheel-release-upload.yml
8+
9+
jobs:
10+
release:
11+
uses: Billingegroup/release-scripts/.github/workflows/_build-wheel-release-upload.yml@v0
12+
with:
13+
project: diffpy.pdfgui
14+
secrets:
15+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
16+
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}

README.rst

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,16 @@ To add "conda-forge" to the conda channels, run the following in a terminal. ::
7878
We want to install our packages in a suitable conda environment.
7979
The following creates and activates a new environment named ``diffpy.pdfgui_env`` ::
8080

81-
conda create -n diffpy.pdfgui_env python=3
81+
conda create -n diffpy.pdfgui_env diffpy.pdfgui
8282
conda activate diffpy.pdfgui_env
8383

84-
Then, to fully install ``diffpy.pdfgui`` in our active environment, run ::
84+
To confirm that the installation was successful, type ::
8585

86-
conda install diffpy.pdfgui
86+
python -c "import diffpy.pdfgui; print(diffpy.pdfgui.__version__)"
8787

88-
Another option is to use ``pip`` to download and install the latest release from
88+
The output should print the latest version displayed on the badges above.
89+
90+
If the above does not work, you can use ``pip`` to download and install the latest release from
8991
`Python Package Index <https://pypi.python.org>`_.
9092
To install using ``pip`` into your ``diffpy.pdfgui_env`` environment, type ::
9193

@@ -97,6 +99,11 @@ and run the following ::
9799

98100
pip install .
99101

102+
Getting Started
103+
---------------
104+
105+
You may consult our `online documentation <https://diffpy.github.io/diffpy.pdfgui>`_ for tutorials and API references.
106+
100107
Support and Contribute
101108
----------------------
102109

news/recut.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
**Added:**
2+
3+
* <news item>
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+
* Re-cookiecut to include GH issues templates, getting started, and install updates
20+
21+
**Security:**
22+
23+
* <news item>

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ classifiers = [
2727
'Operating System :: Unix',
2828
'Programming Language :: Python :: 3.10',
2929
'Programming Language :: Python :: 3.11',
30+
'Programming Language :: Python :: 3.12',
3031
'Topic :: Scientific/Engineering :: Physics',
3132
'Topic :: Scientific/Engineering :: Chemistry',
3233
]

src/diffpy/__init__.py

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,23 @@
11
#!/usr/bin/env python
22
##############################################################################
33
#
4-
# diffpy by DANSE Diffraction group
5-
# Simon J. L. Billinge
6-
# (c) 2008 trustees of the Michigan State University.
7-
# All rights reserved.
4+
# (c) 2024 The Trustees of Columbia University in the City of New York.
5+
# All rights reserved.
86
#
9-
# File coded by: Pavol Juhas
7+
# File coded by: Billinge Group members and community contributors.
108
#
11-
# See AUTHORS.txt for a list of people who contributed.
12-
# See LICENSE.txt for license information.
9+
# See GitHub contributions for a more detailed list of contributors.
10+
# https://github.com/diffpy/diffpy.pdfgui/graphs/contributors
11+
#
12+
# See LICENSE.rst for license information.
1313
#
1414
##############################################################################
1515

16-
"""diffpy - tools for structure analysis by diffraction.
17-
18-
Blank namespace package.
19-
"""
16+
"""Blank namespace package for module diffpy."""
2017

2118

2219
from pkgutil import extend_path
2320

2421
__path__ = extend_path(__path__, __name__)
2522

26-
2723
# End of file

src/diffpy/pdfgui/version.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
11
#!/usr/bin/env python
22
##############################################################################
33
#
4-
# PDFgui by DANSE Diffraction group
5-
# Simon J. L. Billinge
6-
# (c) 2008 trustees of the Michigan State University.
7-
# All rights reserved.
4+
# (c) 2024 The Trustees of Columbia University in the City of New York.
5+
# All rights reserved.
86
#
9-
# File coded by: Pavol Juhas
7+
# File coded by: Billinge Group members and community contributors.
108
#
11-
# See AUTHORS.txt for a list of people who contributed.
12-
# See LICENSE.txt for license information.
9+
# See GitHub contributions for a more detailed list of contributors.
10+
# https://github.com/diffpy/diffpy.pdfgui/graphs/contributors
11+
#
12+
# See LICENSE.rst for license information.
1313
#
1414
##############################################################################
1515

16-
"""Definition of __version__ and __date__."""
16+
"""Definition of __version__."""
17+
18+
# We do not use the other three variables, but can be added back if needed.
19+
# __all__ = ["__date__", "__git_commit__", "__timestamp__", "__version__"]
1720

1821
import os
1922
import time
2023
from importlib.metadata import distribution, version
2124

25+
# obtain version information
2226
__date__ = time.ctime(os.path.getctime(distribution("diffpy.pdfgui")._path))
2327
__version__ = version("diffpy.pdfgui")
24-
25-
# End of file

0 commit comments

Comments
 (0)