From 387feafc90f2f7df710f7d9386d82b4dcd122a13 Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Wed, 23 Oct 2024 06:08:49 -0400 Subject: [PATCH 1/9] Add workflow files and issues --- .github/ISSUE_TEMPLATE/bug_feature.md | 16 ++++++++++++++ .github/ISSUE_TEMPLATE/release_checklist.md | 22 +++++++++++++++++++ .../workflows/build-wheel-release-upload.yml | 16 ++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_feature.md create mode 100644 .github/ISSUE_TEMPLATE/release_checklist.md create mode 100644 .github/workflows/build-wheel-release-upload.yml diff --git a/.github/ISSUE_TEMPLATE/bug_feature.md b/.github/ISSUE_TEMPLATE/bug_feature.md new file mode 100644 index 00000000..b3454deb --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_feature.md @@ -0,0 +1,16 @@ +--- +name: Bug Report or Feature Request +about: Report a bug or suggest a new feature! +title: "" +labels: "" +assignees: "" +--- + +### Problem + + + +### Proposed solution diff --git a/.github/ISSUE_TEMPLATE/release_checklist.md b/.github/ISSUE_TEMPLATE/release_checklist.md new file mode 100644 index 00000000..a87a44a8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/release_checklist.md @@ -0,0 +1,22 @@ +--- +name: Release +about: Checklist and communication channel for PyPI and GitHub release +title: "Ready for PyPI/GitHub release" +labels: "release" +assignees: "" +--- + +### Release checklist for GitHub contributors + +- [ ] All PRs/issues attached to the release are merged. +- [ ] All the badges on the README are passing. +- [ ] License information is verified as correct. If you are unsure, please comment below. +- [ ] Locally rendered documentation contains all appropriate pages, including API references (check no modules are + missing), tutorials, and other human written text is up-to-date with any changes in the code. +- [ ] Installation instructions in the README, documentation and on the website (e.g., diffpy.org) are updated and + tested +- [ ] Successfully run any tutorial examples or do functional testing in some other way. +- [ ] Grammar and writing quality have been checked (no typos). + +Please mention @sbillinge when you are ready for release. Include any additional comments necessary, such as +version information and details about the pre-release. diff --git a/.github/workflows/build-wheel-release-upload.yml b/.github/workflows/build-wheel-release-upload.yml new file mode 100644 index 00000000..86fd9ddb --- /dev/null +++ b/.github/workflows/build-wheel-release-upload.yml @@ -0,0 +1,16 @@ +name: Release (GitHub/PyPI) + +on: + workflow_dispatch: + push: + tags: + - '*' # Trigger on all tags initially, but tag and release privilege are verified in _build-wheel-release-upload.yml + +jobs: + release: + uses: Billingegroup/release-scripts/.github/workflows/_build-wheel-release-upload.yml@v0 + with: + project: diffpy.pdfgui + secrets: + PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} + PAT_TOKEN: ${{ secrets.PAT_TOKEN }} From 30f706c0abce14c0abb25b722ea65dda3fc2ce4a Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Wed, 23 Oct 2024 06:10:59 -0400 Subject: [PATCH 2/9] Add py312 to pyproject --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 7304a8db..2f5dc4e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,6 +27,7 @@ classifiers = [ 'Operating System :: Unix', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', 'Topic :: Scientific/Engineering :: Physics', 'Topic :: Scientific/Engineering :: Chemistry', ] From bbae2423a67b7895f04dc54e8a866e9d2106c1e1 Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Wed, 23 Oct 2024 06:18:44 -0400 Subject: [PATCH 3/9] Update getting started, installation in readme --- README.rst | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 74ca65ab..f899fc5b 100644 --- a/README.rst +++ b/README.rst @@ -78,14 +78,16 @@ To add "conda-forge" to the conda channels, run the following in a terminal. :: We want to install our packages in a suitable conda environment. The following creates and activates a new environment named ``diffpy.pdfgui_env`` :: - conda create -n diffpy.pdfgui_env python=3 + conda create -n diffpy.pdfgui_env diffpy.pdfgui conda activate diffpy.pdfgui_env -Then, to fully install ``diffpy.pdfgui`` in our active environment, run :: +To confirm that the installation was successful, type :: - conda install diffpy.pdfgui + python -c "import diffpy.pdfgui; print(diffpy.pdfgui.__version__)" -Another option is to use ``pip`` to download and install the latest release from +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 `_. To install using ``pip`` into your ``diffpy.pdfgui_env`` environment, type :: @@ -97,6 +99,11 @@ and run the following :: pip install . +Getting Started +--------------- + +You may consult our user manual in our `online website `_ under the Documentation and help section. + Support and Contribute ---------------------- From 47ddc42882168af41059b13545152313183dc8de Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Wed, 23 Oct 2024 06:20:09 -0400 Subject: [PATCH 4/9] Add cookiecutter src init --- src/diffpy/__init__.py | 20 ++++++++------------ src/diffpy/pdfgui/version.py | 25 +++++++++++++------------ 2 files changed, 21 insertions(+), 24 deletions(-) diff --git a/src/diffpy/__init__.py b/src/diffpy/__init__.py index 50128bcc..db812766 100644 --- a/src/diffpy/__init__.py +++ b/src/diffpy/__init__.py @@ -1,27 +1,23 @@ #!/usr/bin/env python ############################################################################## # -# diffpy by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2008 trustees of the Michigan State University. -# All rights reserved. +# (c) 2024 The Trustees of Columbia University in the City of New York. +# All rights reserved. # -# File coded by: Pavol Juhas +# File coded by: Billinge Group members and community contributors. # -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE.txt for license information. +# See GitHub contributions for a more detailed list of contributors. +# https://github.com/diffpy/diffpy.pdfgui/graphs/contributors +# +# See LICENSE.rst for license information. # ############################################################################## -"""diffpy - tools for structure analysis by diffraction. - -Blank namespace package. -""" +"""Blank namespace package for module diffpy.""" from pkgutil import extend_path __path__ = extend_path(__path__, __name__) - # End of file diff --git a/src/diffpy/pdfgui/version.py b/src/diffpy/pdfgui/version.py index faf07aea..14677aa7 100644 --- a/src/diffpy/pdfgui/version.py +++ b/src/diffpy/pdfgui/version.py @@ -1,25 +1,26 @@ #!/usr/bin/env python ############################################################################## # -# PDFgui by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2008 trustees of the Michigan State University. -# All rights reserved. +# (c) 2024 The Trustees of Columbia University in the City of New York. +# All rights reserved. # -# File coded by: Pavol Juhas +# File coded by: Billinge Group members and community contributors. # -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE.txt for license information. +# See GitHub contributions for a more detailed list of contributors. +# https://github.com/diffpy/diffpy.pdfgui/graphs/contributors +# +# See LICENSE.rst for license information. # ############################################################################## -"""Definition of __version__ and __date__.""" +"""Definition of __version__.""" + +# We do not use the other three variables, but can be added back if needed. +# __all__ = ["__date__", "__git_commit__", "__timestamp__", "__version__"] -import os -import time -from importlib.metadata import distribution, version +# obtain version information +from importlib.metadata import version -__date__ = time.ctime(os.path.getctime(distribution("diffpy.pdfgui")._path)) __version__ = version("diffpy.pdfgui") # End of file From f85d011b4ccabd25cbc984767ce26e6be6dec11c Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Wed, 23 Oct 2024 06:23:44 -0400 Subject: [PATCH 5/9] Use existing version.py file --- src/diffpy/pdfgui/version.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/diffpy/pdfgui/version.py b/src/diffpy/pdfgui/version.py index 14677aa7..b1181880 100644 --- a/src/diffpy/pdfgui/version.py +++ b/src/diffpy/pdfgui/version.py @@ -18,9 +18,10 @@ # We do not use the other three variables, but can be added back if needed. # __all__ = ["__date__", "__git_commit__", "__timestamp__", "__version__"] -# obtain version information -from importlib.metadata import version +import os +import time +from importlib.metadata import distribution, version +# obtain version information +__date__ = time.ctime(os.path.getctime(distribution("diffpy.pdfgui")._path)) __version__ = version("diffpy.pdfgui") - -# End of file From b3820f9d1f2b98d2b3812c8d3909d6983ff675ce Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Wed, 23 Oct 2024 06:27:15 -0400 Subject: [PATCH 6/9] Fix preposition in readme --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index f899fc5b..e9438ca0 100644 --- a/README.rst +++ b/README.rst @@ -102,7 +102,7 @@ and run the following :: Getting Started --------------- -You may consult our user manual in our `online website `_ under the Documentation and help section. +You may consult our user manual on our `online website `_ under the Documentation and help section. Support and Contribute ---------------------- From c57e8f47674be3a8e30365990920ce4b9830888a Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Wed, 23 Oct 2024 06:28:34 -0400 Subject: [PATCH 7/9] Add news --- news/recut.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 news/recut.rst diff --git a/news/recut.rst b/news/recut.rst new file mode 100644 index 00000000..ce91ede6 --- /dev/null +++ b/news/recut.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* Re-cookiecut to include GH issues templates, getting started, and install updates + +**Security:** + +* From 362dbc6f21b34b1d06998489beea64bcee70d0f6 Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Wed, 23 Oct 2024 06:30:11 -0400 Subject: [PATCH 8/9] Reference online doc for manual instead --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index e9438ca0..3940dbd2 100644 --- a/README.rst +++ b/README.rst @@ -102,7 +102,7 @@ and run the following :: Getting Started --------------- -You may consult our user manual on our `online website `_ under the Documentation and help section. +You may consult our `online documentation `_ for tutorials and API references. Support and Contribute ---------------------- From 6ff141b9ebf32323a986004820e626bf9594feb5 Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Wed, 23 Oct 2024 06:30:31 -0400 Subject: [PATCH 9/9] Use pdfgui instead of srmise in readme --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 3940dbd2..694fa749 100644 --- a/README.rst +++ b/README.rst @@ -102,7 +102,7 @@ and run the following :: Getting Started --------------- -You may consult our `online documentation `_ for tutorials and API references. +You may consult our `online documentation `_ for tutorials and API references. Support and Contribute ----------------------