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

Tests initial #4

Merged
merged 7 commits into from
Oct 23, 2024
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
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
Loading