Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: GitHub Actions #172

Merged
merged 4 commits into from
Dec 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
name: Bug report
about: Create a report to help us improve

label: Bug
---

**Describe the bug**
A clear and concise description of what the bug is.
<!-- A clear and concise description of what the bug is. -->

**To Reproduce**
Code to reproduce the behavior:

<!-- Code to reproduce the behavior: Please include the results of:
`conda list`
`python -c "import qcelemental as qcel; print(qcel.__file__, qcel.__version__)"` -->

**Expected behavior**
A clear and concise description of what you expected to happen.

<!-- A clear and concise description of what you expected to happen. -->

**Additional context**
Add any other context about the problem here.
<!-- Add any other context about the problem here. -->
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project

label: Feature
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->

**Describe the solution you'd like**
A clear and concise description of what you want to happen.
<!--A clear and concise description of what you want to happen. -->

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
<!--A clear and concise description of any alternative solutions or features you've considered. -->

**Additional context**
Add any other context or screenshots about the feature request here.
<!--Add any other context or screenshots about the feature request here. -->
15 changes: 6 additions & 9 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
## Description
Provide a brief description of the PR's purpose here.
<!-- Thank you for your contribution! -->

## Todos
Notable points that this PR has either accomplished or will accomplish.
- [ ] TODO 1
## Description
<!-- Provide a brief description of the PR's purpose here. -->

## Questions
- [ ] Question1
## Changelog description
<!-- Provide a brief single sentence for the changelog. -->

## Status
- [ ] Changelog updated
- [ ] Ready to go
- [ ] Ready to go
58 changes: 58 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: CI

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-18.04
strategy:
matrix:
conda-env: [base, minimal]
python-version: [3.6, 3.7]
env:
PYVER: ${{ matrix.python-version }}
CONDA_ENV: ${{ matrix.conda-env }}

steps:
- uses: actions/checkout@v1

- name: Setup Information
shell: bash
run: |
uname -a
df -h
ulimit -a
conda --version

- name: Create Environment
shell: bash
run: |
eval "$(conda shell.bash hook)" && conda activate
python devtools/scripts/create_conda_env.py -n=test -p=$PYVER devtools/conda-envs/$CONDA_ENV.yaml

- name: Install
shell: bash
run: |
eval "$(conda shell.bash hook)" && conda activate test
python -m pip install . --no-deps

- name: Environment Information
shell: bash
run: |
eval "$(conda shell.bash hook)" && conda activate test
conda list --show-channel-urls

- name: PyTest
shell: bash
run: |
eval "$(conda shell.bash hook)" && conda activate test
pytest -v --cov=qcelemental --color=yes --cov-report=xml qcelemental/tests/

- name: CodeCov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
yml: ./.codecov.yml
File renamed without changes.
File renamed without changes.
4 changes: 1 addition & 3 deletions qcelemental/tests/test_model_general.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,18 @@ def test_repr_optimization():
assert "molecule_hash" in str(opt)
assert "molecule_hash" in repr(opt)

def test_model_custom_repr():

def test_model_custom_repr():
class Model(ProtoModel):
a: int

def __repr__(self) -> str:
return "Hello world!"


m = Model(a=5)
assert repr(m) == "Hello world!"
assert "Model(" in str(m)


class Model2(ProtoModel):
a: int

Expand Down