Skip to content

Commit d573ad5

Browse files
Add The Templates for Issues and collab.
1 parent c5b68cc commit d573ad5

File tree

4 files changed

+183
-0
lines changed

4 files changed

+183
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: '[BUG] '
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
**Describe the bug**
10+
A clear and concise description of what the bug is.
11+
12+
**To Reproduce**
13+
Steps to reproduce the behavior:
14+
1. Import module '...'
15+
2. Initialize with parameters '...'
16+
3. Run method '...'
17+
4. See error
18+
19+
**Expected behavior**
20+
A clear and concise description of what you expected to happen.
21+
22+
**Error message**
23+
```
24+
Paste the full error message here
25+
```
26+
27+
**Environment:**
28+
- OS: [e.g. Ubuntu 20.04]
29+
- Python version: [e.g. 3.9.0]
30+
- Package version: [e.g. 0.1.0]
31+
- GPU: [e.g. NVIDIA RTX 3080]
32+
- CUDA version: [e.g. 11.3]
33+
34+
**Additional context**
35+
Add any other context about the problem here.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: '[FEATURE] '
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11+
12+
**Describe the solution you'd like**
13+
A clear and concise description of what you want to happen.
14+
15+
**Describe alternatives you've considered**
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
**Example usage**
19+
```python
20+
# Add example code showing how your feature would be used
21+
from diffusionLM import ...
22+
23+
# Example code here
24+
```
25+
26+
**Additional context**
27+
Add any other context or screenshots about the feature request here.

.github/pull_request_template.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
## Description
2+
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
3+
4+
Fixes # (issue)
5+
6+
## Type of change
7+
Please delete options that are not relevant.
8+
9+
- [ ] Bug fix (non-breaking change which fixes an issue)
10+
- [ ] New feature (non-breaking change which adds functionality)
11+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
12+
- [ ] Documentation update
13+
14+
## Checklist
15+
- [ ] My code follows the style guidelines of this project
16+
- [ ] I have performed a self-review of my own code
17+
- [ ] I have commented my code, particularly in hard-to-understand areas
18+
- [ ] I have made corresponding changes to the documentation
19+
- [ ] My changes generate no new warnings
20+
- [ ] I have added tests that prove my fix is effective or that my feature works
21+
- [ ] New and existing unit tests pass locally with my changes
22+
- [ ] Any dependent changes have been merged and published in downstream modules
23+
24+
## Additional context
25+
Add any other context about the pull request here.

.github/workflows/ci.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.8", "3.9", "3.10", "3.11"]
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install -r requirements-dev.txt
27+
28+
- name: Run tests
29+
run: |
30+
pytest tests/ --cov=diffusionLM --cov-report=xml
31+
32+
- name: Upload coverage
33+
uses: codecov/codecov-action@v3
34+
with:
35+
file: ./coverage.xml
36+
37+
lint:
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v3
41+
- uses: actions/setup-python@v4
42+
with:
43+
python-version: "3.10"
44+
45+
- name: Install dependencies
46+
run: |
47+
python -m pip install --upgrade pip
48+
pip install ruff black isort
49+
50+
- name: Check code quality
51+
run: |
52+
ruff check .
53+
black --check .
54+
isort --check .
55+
56+
docs:
57+
runs-on: ubuntu-latest
58+
steps:
59+
- uses: actions/checkout@v3
60+
- uses: actions/setup-python@v4
61+
with:
62+
python-version: "3.10"
63+
64+
- name: Install dependencies
65+
run: |
66+
pip install -r docs/requirements.txt
67+
68+
- name: Build documentation
69+
run: |
70+
cd docs
71+
make html
72+
73+
deploy:
74+
needs: [test, lint, docs]
75+
runs-on: ubuntu-latest
76+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
77+
78+
steps:
79+
- uses: actions/checkout@v3
80+
- uses: actions/setup-python@v4
81+
with:
82+
python-version: "3.10"
83+
84+
- name: Build package
85+
run: |
86+
pip install build
87+
python -m build
88+
89+
- name: Publish to PyPI
90+
if: startsWith(github.ref, 'refs/tags')
91+
env:
92+
TWINE_USERNAME: __token__
93+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
94+
run: |
95+
pip install twine
96+
twine upload dist/*

0 commit comments

Comments
 (0)