Skip to content

Commit

Permalink
Merge pull request #9 from glotzerlab/admin/ci
Browse files Browse the repository at this point in the history
Add CI and templates
  • Loading branch information
janbridley authored Apr 9, 2024
2 parents 4dab287 + 2c9cde6 commit 0ead0cc
Show file tree
Hide file tree
Showing 5 changed files with 126 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Bug report
about: Create a report that describes an issue
title: ''
labels: ''
assignees: ''

---

<!-- Please replace the text in the individual sections below. -->

### Description

A concise description of what is causing an issue and what you expected to happen.

### To reproduce

Please copy & paste the code that is triggering the issue into this section and describe the context and prior steps that lead to the problem with as much detail as possible.

### Error output

If possible, copy any terminal outputs or attach screenshots that provide additional information on the problem.

### System configuration

Please complete the following information:

- Operating System [e.g. macOS]:
- Version of Python [e.g. 3.7]:
- Version of parsnip [e.g. 1.0]:

Or copy & paste the output of: `python -c 'import platform; print(platform.platform()); import sys; print(sys.version); import parsnip; print(parsnip.__version__)'`
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Feature request
about: Suggest a new feature for parsnip
title: ''
labels: ''
assignees: ''

---
<!-- Please replace the text in the individual sections below. -->

### Feature description

A concise description of the enhancement that this feature provides or the problem it solves.
For example: "I would like to ..." or "It would be nice if it was easier to ...".

### Proposed solution

A description of how you would like a possible solution to look like.

*Proposals for an implementation of the idea are welcome, but not necessary.*

### Additional context

Any alternative solutions you might have considered or other information that might be helpful to understand this feature request.
23 changes: 23 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!-- Provide a general summary of your changes in the Title above -->

## Description
<!-- Describe your changes in detail -->

## Motivation and Context
<!-- Why is this change required? What problem does it solve? -->
<!-- Resolves #?? -->

## Types of Changes
<!-- Please select all items that apply, either now or after creating the pull request: -->
- [ ] Documentation update
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change<sup>1</sup>

<sup>1</sup>The change breaks (or has the potential to break) existing functionality and should be merged into the `breaking` branch

## Checklist:
<!-- Please select all items that apply either now or after creating the pull request. -->
- [ ] I am familiar with the [Development Guidelines](https://github.com/glotzerlab/parsnip/blob/main/doc/source/development.rst)
- [ ] The changes introduced by this pull request are covered by existing or newly introduced tests.
- [ ] I have updated the [changelog](https://github.com/glotzerlab/parsnip/blob/main/ChangeLog.rst) and added my name to the [credits](https://github.com/glotzerlab/parsnip/blob/main/doc/source/credits.rst).
45 changes: 45 additions & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Run Tests

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
# trigger on pull requests
pull_request:

# trigger on all commits to master
push:
branches:
- "main"
- "breaking"

# trigger on request
workflow_dispatch:

jobs:
run_tests:
name: Run tests on ubuntu-latest with Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ["3.9","3.10","3.11","3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install requirements.txt
python -m pip install tests/requirements.txt
- name: Install package
run: |
python --version
python -c "import numpy; print('numpy', numpy.__version__)"
python -m pip install . -v --progress-bar off
- name: Test with pytest
run: |
python -m pytest -v
2 changes: 2 additions & 0 deletions parsnip/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
"""TODO: Add docstring."""
from . import parse, patterns

__version__ = "0.0.2"

0 comments on commit 0ead0cc

Please sign in to comment.