-
Notifications
You must be signed in to change notification settings - Fork 33
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 test pr #24
base: ci-test
Are you sure you want to change the base?
CI test pr #24
Changes from all commits
261d1e2
aef87eb
2ae89bf
71cdcfd
363c49c
2b67543
42d9c67
6640a0c
00f047e
b8ef6f7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: Python package | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like having the tests on PRs run only for PRs into master, but again it is a personal preference and git usage question. Feel free to remove this or use '*' to indicate all branches. Here is the relevant docs from github: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on |
||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.7","3.8", "3.9"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install flake8 pytest | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 tyxe --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 tyxe --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Test with pytest | ||
run: | | ||
pip install -e . | ||
pytest |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,4 @@ __pycache__/ | |
docs/build/ | ||
env/ | ||
.coverage | ||
data/ | ||
data/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
torch == 1.12.0 | ||
torchvision == 0.13.0 | ||
pyro-ppl == 1.8.1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
from setuptools import setup, find_packages | ||
|
||
with open("requirements.txt","r") as f: | ||
reqs = f.readlines() | ||
|
||
setup( | ||
name='tyxe', | ||
version='0.0.2', | ||
|
@@ -8,9 +11,5 @@ | |
author_email='[email protected]', | ||
description='BNNs for pytorch using pyro.', | ||
packages=find_packages(), | ||
install_requires=[ | ||
'torch == 1.12.0', | ||
'torchvision == 0.13.0', | ||
'pyro-ppl == 1.8.1' | ||
], | ||
install_requires=reqs, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this not be changed "ci-test" so that the CI triggers for PRs/pushes to that branch? (I can quickly do it after merging, just want to check before breaking something)