From 06adaf698788940cba3ad404ad0448ff31509578 Mon Sep 17 00:00:00 2001 From: yucongalicechen Date: Wed, 23 Oct 2024 12:27:23 -0400 Subject: [PATCH 1/3] recut --- .github/ISSUE_TEMPLATE/bug_feature.md | 16 +++++++++ .github/ISSUE_TEMPLATE/release_checklist.md | 22 ++++++++++++ .../workflows/build-wheel-release-upload.yml | 16 +++++++++ README.rst | 34 ++++++------------- doc/source/license.rst | 4 +-- news/recut.rst | 23 +++++++++++++ 6 files changed, 89 insertions(+), 26 deletions(-) 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 create mode 100644 news/recut.rst diff --git a/.github/ISSUE_TEMPLATE/bug_feature.md b/.github/ISSUE_TEMPLATE/bug_feature.md new file mode 100644 index 0000000..b3454de --- /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 0000000..a87a44a --- /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 0000000..3e78404 --- /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.labpdfproc + secrets: + PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} + PAT_TOKEN: ${{ secrets.PAT_TOKEN }} diff --git a/README.rst b/README.rst index 2d762e8..8b8aeaa 100644 --- a/README.rst +++ b/README.rst @@ -83,14 +83,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.labpdfproc_env`` :: - conda create -n diffpy.labpdfproc_env python=3 + conda create -n diffpy.labpdfproc_env diffpy.labpdfproc conda activate diffpy.labpdfproc_env -Then, to fully install ``diffpy.labpdfproc`` in our active environment, run :: +To confirm that the installation was successful, type :: - conda install diffpy.labpdfproc + python -c "import diffpy.labpdfproc; print(diffpy.labpdfproc.__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.labpdfproc_env`` environment, type :: @@ -102,33 +104,17 @@ and run the following :: pip install . -Example -------- - -Navigate to the directory that contains 1D diffraction patterns that you would like to process. -Activate the conda environment (`conda activate diffpy.labpdfproc_env`) that contains the package and run the following command :: - - labpdfproc - -Here replace with the value of muD for your sample -and with the path and filename of your input file. -For example, if the uncorrected data case is called zro2_mo.xy and is in the current directory -and it has a muD of 2.5 then the command would be :: - - labpdfproc 2.5 zro2_mo.xy - -Please type :: - - labpdfproc --help +Getting Started +--------------- -for more information on the available options. +You may consult our `online documentation `_ for tutorials and API references. Support and Contribute ---------------------- `Diffpy user group `_ is the discussion forum for general questions and discussions about the use of diffpy.labpdfproc. Please join the diffpy.labpdfproc users community by joining the Google group. The diffpy.labpdfproc project welcomes your expertise and enthusiasm! -If you see a bug or want to request a feature, please `report it as an issue `_ and/or `submit a fix as a PR `_. You can also post it to the `Diffpy user group `_. +If you see a bug or want to request a feature, please `report it as an issue `_ and/or `submit a fix as a PR `_. You can also post it to the `Diffpy user group `_. Feel free to fork the project and contribute. To install diffpy.labpdfproc in a development mode, with its sources being directly used by Python diff --git a/doc/source/license.rst b/doc/source/license.rst index 9ae52a9..cfab61c 100644 --- a/doc/source/license.rst +++ b/doc/source/license.rst @@ -9,9 +9,9 @@ OPEN SOURCE LICENSE AGREEMENT ============================= BSD 3-Clause License -Copyright (c) 2024, The Trustees of Columbia University in +Copyright (c) 2024, The Trustees of Columbia University in the City of New York. -All Rights Reserved. +All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/news/recut.rst b/news/recut.rst new file mode 100644 index 0000000..7dedc63 --- /dev/null +++ b/news/recut.rst @@ -0,0 +1,23 @@ +**Added:** + +* redo cookiecutter to add issue templates and update readme + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +* From 0f555b208c92b7a3f2001b927389bb7c15dd5470 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 23 Oct 2024 16:28:40 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit hooks --- README.rst | 2 +- doc/source/license.rst | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 8b8aeaa..b94235c 100644 --- a/README.rst +++ b/README.rst @@ -114,7 +114,7 @@ Support and Contribute `Diffpy user group `_ is the discussion forum for general questions and discussions about the use of diffpy.labpdfproc. Please join the diffpy.labpdfproc users community by joining the Google group. The diffpy.labpdfproc project welcomes your expertise and enthusiasm! -If you see a bug or want to request a feature, please `report it as an issue `_ and/or `submit a fix as a PR `_. You can also post it to the `Diffpy user group `_. +If you see a bug or want to request a feature, please `report it as an issue `_ and/or `submit a fix as a PR `_. You can also post it to the `Diffpy user group `_. Feel free to fork the project and contribute. To install diffpy.labpdfproc in a development mode, with its sources being directly used by Python diff --git a/doc/source/license.rst b/doc/source/license.rst index cfab61c..9ae52a9 100644 --- a/doc/source/license.rst +++ b/doc/source/license.rst @@ -9,9 +9,9 @@ OPEN SOURCE LICENSE AGREEMENT ============================= BSD 3-Clause License -Copyright (c) 2024, The Trustees of Columbia University in +Copyright (c) 2024, The Trustees of Columbia University in the City of New York. -All Rights Reserved. +All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: From 43911a4c0bed3e71ef22530c4e626066bd606768 Mon Sep 17 00:00:00 2001 From: yucongalicechen Date: Wed, 23 Oct 2024 12:31:12 -0400 Subject: [PATCH 3/3] add back example in README.rst --- README.rst | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.rst b/README.rst index 8b8aeaa..28bb224 100644 --- a/README.rst +++ b/README.rst @@ -104,6 +104,27 @@ and run the following :: pip install . +Example +------- + +Navigate to the directory that contains 1D diffraction patterns that you would like to process. +Activate the conda environment (`conda activate diffpy.labpdfproc_env`) that contains the package and run the following command :: + + labpdfproc + +Here replace with the value of muD for your sample +and with the path and filename of your input file. +For example, if the uncorrected data case is called zro2_mo.xy and is in the current directory +and it has a muD of 2.5 then the command would be :: + + labpdfproc 2.5 zro2_mo.xy + +Please type :: + + labpdfproc --help + +for more information on the available options. + Getting Started ---------------