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

Repo cleanup + Upgrade testing CI env to Python v3.10 #146

Merged
merged 36 commits into from
Nov 29, 2022

Conversation

ayush9pandey
Copy link
Collaborator

There's a test failing for v3.6, which prompted me to add v3.10 for Github Actions CI. But adding another one would cause even longer delays on PRs as 3 more set of tests will be run. So I think we can remove v3.6 and instead have v3.10.

ayush9pandey and others added 4 commits October 21, 2022 11:18
* Inference updates, new features, and bug fixes (#102)

* add custom prior documenting notebook
* gaussian prior fix
* bug fixes for log uniform prior and pdf computation bound checks
* option to set initial parameter seed. print convergence diagnostics
* first cut at lmfit support for inference
* renaming inference files and functions to be agnostic to external parameter inference packages
* 1. inference.pyx bug with multiple measurements fixed. 2. Added LMFit support for least squares type parameter id. 3. Refactor inference example notebooks. 4. Added inference example notebooks.
* first cut at delay support for inference
* change convergence_diagnostics error to warning
* fix tests
* refactor inference examples
* add inference test
* add emcee version requirement for progress bar update
* add requirement for scipy>1.6.4 and add lmfit
* testing suite for inference
* allow lower scipy versions
* add empty line at end of test_inference

* Rules and simulator upgrade (#106)

* DeterministicDilutionSimulator, SafeModeSSASimulator, TimeDependentSSASimulator, and Core Lineage/Propogate Simulators deleted

* Major Rule Update:
** Rules fire consistently, even when there are no reactions.
** New Rule types and firing frequencies, including specific times, every timestep, and every update.
** Tests of these new rule features

* Recomputed all the frozen sim results: Why? Previously, delay reactions firing if no reactions could fire. Propensities are now recomputed ever dt, so the old results also are no longer valid.

* SafeLineageCSimInterface created: this interface is analogous to the SafeModelCSimInterface and does some basic checking (and warning messages) at the expense of speed.

* lineage notebooks cleanup: added turbidostat example for lineages, lineage examples split into two notebooks

* Lineage fixes: Fixed an indexing bug, py_SimulateTurbidostat returns dataframes, and Turbidostat example plotting, improved py_SimulateTurbidostat wrapper

Co-authored-by: William Poole <wpoole@caltech.edu>

* Fix a minor bug in delay simulator (#103)

* delay simulation bug fix
* fix error from merge dev

* Removing Bioscrape XML and adding SBML Functionality (#108)

* Removed Bioscrape XML writing, bioscrape XML from the examples, and cell lineages from the advanced examples

* remove propensity_annotation keyword, always write annotation to bioscrape exported SBML models

* delay annotation working with propensity annotation

* remove underscore shenanigans in rule writing

* refactor import sbml

* add rule annotation. add rule testing with annotation

* fix ODE rule SBML writing and loading

* remove all underscore-to-parameter code

* check basic notebook - runs without problems

* turn off input_printout in propensity test

Co-authored-by: William Poole <wpoole@caltech.edu>
Co-authored-by: ayush9pandey <ayush.9.pandey@gmail.com>

* New features: Sensitivity analysis (#111)

* add priors, add beta and gamma prior, and custom prior, documentation to the notebook

* py_inference wrapper added

* option to set initial parameter seed. print convergence diagnostics

* Added LMFit support for least squares type parameter id. and added inference example notebooks.

* delay support for inference

* add tests for sensitivity analysis

* apply rules in sensitivity analysis

* minor changes

* version update to 1.0.3

* Fixed some bugs involving SimulateSingleCell with length 0 or 1 timepoints arrays.

* Deterministic safe mode (#113)

* Fixed deterministic safemode tests
* raises errors in deterministic safe mode - errors do not stop integration
* less parallelization so tests don't use up all the RAM

Co-authored-by: William Poole <wpoole@caltech.edu>

* Slight change to how linege's SimulateSingleCell handles simulation with a single timepoint, to avoid infinite loops.

* Wp inference (#118)

* Add simulation control keywords rtol atol and hmax to inference and bioscrape deterministic simulation

* fixed a bug which caused the CSimInterface to not update its parameters

* more init_seed options, including guassian and normal priors + checking for positivity

* filename option in py_inference

* loguniform prior sampling initializaiton

* parameters now can vary in log space

* precision added to sensitivity analyss and Inference objects now save a list of params along with costs

* ability to skip resetting up the cost function + optional file writing.

* ability to reset PID default parameters programatically

Co-authored-by: William Poole <wpoole@caltech.edu>

* Delete test_printing.py

* Infinite loop fix (#115)

* Improved infinite loop fixes.
* Delete test_printing.py

Co-authored-by: Sclamons

* fix docstring

* Fixes issue #123 : sbml_warnings keyword error (#134)

* fix sbml_warning issue with load reaction

* Fix sensitivity analysis bug #126 and #125 (#136)

Summary of changes:
* fix sensitivity analysis bug that changed original parameter values

* add docstring to py_sensitivity_analysis

* delete old files and manual fix to match dev by deleting wrongly committed files

* A cluster of changes to inference  (#138)

New features:

* `parameter_conditions`: A new argument for `py_inference` that lets you set parameter conditions for data trajectories. Similar to `initial_conditions` that are on the model states, this sets conditions on parameters.
* Add multiple files to write MCMC results: `mcmc_results.csv` writes the samples and `mcmc_results.txt` writes `cost_progress`.
* Add stricter inference testing (optional) and add debug to stochastic pid interface

Refactoring of Inference module:

* remove old init_param_vals code that seemed not to be in use
* update plot_mcmc_results behavior
* set convergence_check default to False and modify gitignore
* fix stochastic trajectories likelihood initial state set
* add param condition to inference unit tests
* refactor extract_data and check that parameter being estimated is not being varied through parameter_conditions
* remove emcee thread argument
* longer inference test, and change discard argument of emcee

Co-authored-by: William Poole <wp_ix@hotmail.com>

* Fix #135 by adding dtype double to inference timepoints and data (#140)

* update version number to 1.1.0

Co-authored-by: William Poole <wp_ix@hotmail.com>
Co-authored-by: William Poole <wpoole@caltech.edu>
Co-authored-by: sclamons <sclamons@SEC-Macbook-Pro.local>
Co-authored-by: Sam Clamons <sclamons@gmail.com>
* Rename workflow to bioscrape.yml

* update badge
* add colab links to readme
* overhaul README
* update readme.md extension
* update title
* update description
@ayush9pandey ayush9pandey changed the title Remove python v3.6 testing in favor of python v3.10 testing Repo cleanup + Upgrade testing CI env to Python v3.10 Nov 22, 2022
@ayush9pandey
Copy link
Collaborator Author

The last three tests will not run because 3.6 is removed now.

@ayush9pandey
Copy link
Collaborator Author

ayush9pandey commented Nov 27, 2022

New CI workflow:

  1. For all push commits on any branch except master, bioscrape will be installed and pytest will be run by the Github action called test_bioscrape. This action runs only on ubuntu-latest and with Python v3.10 to keep the development workflow fast.
  2. For all push commits directly to master (rare) and any pull requests to master, a detailed action called "deploy_bioscrape" will be run. This action installs bioscrape and runs pytest on all three OS and on three different Python versions to ensure backward compatibility.

Since this PR has a new commit and it is a pull request to master, both actions are running and both have passed. So I feel that this PR is ready for review @WilliamIX . We need to merge this branch to master to make sure that this new actions workflow works for other PRs.

@ayush9pandey ayush9pandey self-assigned this Nov 27, 2022
@ayush9pandey ayush9pandey added the Bioscrape Core Issues pertaining to core bioscrape functionality label Nov 27, 2022
@ayush9pandey ayush9pandey removed the Bioscrape Core Issues pertaining to core bioscrape functionality label Nov 27, 2022
@WilliamIX
Copy link
Collaborator

3.6 and 3.7 don't seem to have run. Is this expected?

.github/workflows/bioscrape.yml Outdated Show resolved Hide resolved
.github/workflows/deploy_bioscrape.yml Outdated Show resolved Hide resolved
.github/workflows/deploy_bioscrape.yml Outdated Show resolved Hide resolved
.github/workflows/test_bioscrape.yml Outdated Show resolved Hide resolved
@WilliamIX
Copy link
Collaborator

WilliamIX commented Nov 29, 2022

Because 3.6 checks don't pass - we might need to merge this into dev before master?

@ayush9pandey
Copy link
Collaborator Author

do you see an option to merge the PR? It is blocked for me because 3.6 tests don't pass.

@ayush9pandey
Copy link
Collaborator Author

The problem is that the CI file needs to be in master to make sure the tests run. Even if we merge this to dev, and then when merging dev to master, we might see this problem again.

@ayush9pandey ayush9pandey changed the base branch from master to dev November 29, 2022 23:30
@ayush9pandey ayush9pandey merged commit 516f5b1 into dev Nov 29, 2022
@ayush9pandey ayush9pandey deleted the actions-patch-1 branch November 29, 2022 23:44
ayush9pandey added a commit that referenced this pull request Nov 30, 2022
Changes summary:
* update badges
* add corner dependency
* update version

* Repo cleanup
* Upgrade testing CI env to Python v3.10 (#146)

* Inference pickling (#145)

Co-authored-by: Ayush Pandey <ayush.9.pandey@gmail.com>
Co-authored-by: William Poole <wpoole@caltech.edu>
ayush9pandey added a commit that referenced this pull request Feb 25, 2023
* Bioscrape v1.2.0 (#141)

* remove 3.6 testing in favor of 3.10 testing
* add quotes around 3.10 for CI 
* remove old trash files: temp.pck, simbio.m etc
* fix compatibility spelling
* fix python capitalization
* try branch specific actions CI
* rename CIs to test_bioscrape and deploy_bioscrape
* add joss badge, update CI badge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants