Skip to content

Commit 4bf46d2

Browse files
authored
Merge pull request #39 from Tieqiong/workflow
add PR test workflow and issue templates
2 parents 9219061 + 1bd4447 commit 4bf46d2

File tree

5 files changed

+112
-0
lines changed

5 files changed

+112
-0
lines changed

Diff for: .github/ISSUE_TEMPLATE/bug_feature.md

+16
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

Diff for: .github/ISSUE_TEMPLATE/release_checklist.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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+
### PyPI/GitHub rc-release preparation checklist:
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 the website (e.g., diffpy.org) are updated.
17+
- [ ] Successfully run any tutorial examples or do functional testing with the latest Python version.
18+
- [ ] Grammar and writing quality are checked (no typos).
19+
- [ ] Install `pip install build twine`, run `python -m build` and `twine check dist/*` to ensure that the package can be built and is correctly formatted for PyPI release.
20+
21+
Please mention @sbillinge here when you are ready for PyPI/GitHub release. Include any additional comments necessary, such as version information and details about the pre-release here:
22+
23+
### PyPI/GitHub full-release preparation checklist:
24+
25+
- [ ] Create a new conda environment and install the rc from PyPI (`pip install <package-name>==??`)
26+
- [ ] License information on PyPI is correct.
27+
- [ ] Docs are deployed successfully to `https://www.diffpy.org/<package-name>`.
28+
- [ ] Successfully run all tests, tutorial examples or do functional testing.
29+
30+
Please let @sbillinge know that all checks are done and the package is ready for full release.
31+
32+
### conda-forge release preparation checklist:
33+
34+
<!-- After @sbillinge releases the PyPI package, please check the following when creating a PR for conda-forge release.-->
35+
36+
- [ ] Ensure that the full release has appeared on PyPI successfully.
37+
- [ ] New package dependencies listed in `conda.txt` and `test.txt` are added to `meta.yaml` in the feedstock.
38+
- [ ] Close any open issues on the feedstock. Reach out to @bobleesj if you have questions.
39+
- [ ] Tag @sbillinge and @bobleesj for conda-forge release.
40+
41+
### Post-release checklist
42+
43+
<!-- Before closing this issue, please complete the following: -->
44+
45+
- [ ] Run tutorial examples and conduct functional testing using the installation guide in the README. Attach screenshots/results as comments.
46+
- [ ] Documentation (README, tutorials, API references, and websites) is deployed without broken links or missing figures.

Diff for: .github/workflows/tests-on-pr.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Tests on PR
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- cookie
8+
pull_request:
9+
workflow_dispatch:
10+
11+
jobs:
12+
validate:
13+
defaults:
14+
run:
15+
shell: bash -l {0}
16+
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Check out diffpy.srreal
20+
uses: actions/checkout@v4
21+
22+
- name: Initialize miniconda
23+
uses: conda-incubator/setup-miniconda@v3
24+
with:
25+
activate-environment: test
26+
auto-update-conda: true
27+
environment-file: environment.yml
28+
auto-activate-base: false
29+
python-version: 3.12
30+
31+
- name: Conda config
32+
run: >-
33+
conda config --set always_yes yes
34+
--set changeps1 no
35+
36+
- name: Install diffpy.srreal and requirements
37+
run: |
38+
conda install --file requirements/test.txt
39+
conda install --file requirements/conda.txt
40+
python -m pip install . --no-deps
41+
42+
- name: Validate diffpy.pdfgui
43+
run: python -m diffpy.srreal.tests.run

Diff for: environment.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
name: diffpy.pdfgui
2+
channels:
3+
- conda-forge
4+
dependencies:
5+
- python=3
6+
- pip

Diff for: requirements/conda.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
boost
22
numpy
3+
libdiffpy
34
setuptools
45
diffpy.structure
56
periodictable

0 commit comments

Comments
 (0)