Skip to content

Commit

Permalink
Merge pull request #4 from abbyevewilliams/1-tests-initial
Browse files Browse the repository at this point in the history
Tests initial
  • Loading branch information
abbyevewilliams authored Oct 23, 2024
2 parents a442a58 + 36db1be commit eca17d5
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 4 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/python-package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python package

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]

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 setuptools wheel
python -m pip install .[dev]
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
flake8 .
- name: Test with pytest
run: |
pytest
3 changes: 3 additions & 0 deletions prototype.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@
import numpy as np
import scipy.integrate


def dose(t, X):
return X


def rhs(t, y, Q_p1, V_c, V_p1, CL, X):
q_c, q_p1 = y
transition = Q_p1 * (q_c / V_c - q_p1 / V_p1)
dqc_dt = dose(t, X) - q_c / V_c * CL - transition
dqp1_dt = transition
return [dqc_dt, dqp1_dt]


model1_args = {
'name': 'model1',
'Q_p1': 1.0,
Expand Down
9 changes: 5 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ def get_version():
"""
Get version number from the pkmodel module.
The easiest way would be to just ``import pkmodel ``, but note that this may
fail if the dependencies have not been installed yet. Instead, we've put
the version number in a simple version_info module, that we'll import here
by temporarily adding the oxrse directory to the pythonpath using sys.path.
The easiest way would be to just ``import pkmodel ``, but note that this
may fail if the dependencies have not been installed yet. Instead, we've
put the version number in a simple version_info module, that we'll import
here by temporarily adding the oxrse directory to the pythonpath using
sys.path.
"""
import os
import sys
Expand Down

0 comments on commit eca17d5

Please sign in to comment.