diff --git a/README.md b/README.md index 72fec562..a3ad7c83 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,8 @@ Install with all optional dependencies:: $ pip install biocrnpyler[all] +(Note that on some operating systems you made need to use "\[all\]" to avoid shell errors.) + Further details about the installation process can be found in the [BioCRNPyler wiki](https://github.com/BuildACell/BioCRNPyler/wiki#installation). # Bugs diff --git a/Tests/Combinatorial/test_jupyter_notebooks.py b/Tests/Combinatorial/test_jupyter_notebooks.py index 0316c643..f8c63318 100644 --- a/Tests/Combinatorial/test_jupyter_notebooks.py +++ b/Tests/Combinatorial/test_jupyter_notebooks.py @@ -2,7 +2,7 @@ nb_not_installed = False try: import nbformat - from nbconvert.preprocessors import ExecutePreprocessor + from nbconvert.preprocessors import ExecutePreprocessor, CellExecutionError except ModuleNotFoundError: nb_not_installed = True from os import listdir, getcwd, pardir diff --git a/Tests/Unit/test_simulation_packages_import.py b/Tests/Unit/test_simulation_packages_import.py index b4a6f1d7..f68d8ebd 100644 --- a/Tests/Unit/test_simulation_packages_import.py +++ b/Tests/Unit/test_simulation_packages_import.py @@ -1,6 +1,7 @@ # Copyright (c) 2020, Build-A-Cell. All rights reserved. # See LICENSE file in the project root directory for details. +import warnings import pytest @@ -11,7 +12,7 @@ def test_bioscrape_import_simulate(): X = Species("X") CRN = ChemicalReactionNetwork(species=[X],reactions=[]) - with pytest.warns(None) as record: + with pytest.warns() as record: sim_result = CRN.simulate_with_bioscrape(timepoints=np.linspace(0, 10, 100), initial_condition_dict = {str(X):1}) @@ -33,7 +34,7 @@ def test_bioscrape_import_simulate_via_sbml(): X = Species("X") CRN = ChemicalReactionNetwork(species=[X],reactions=[]) - with pytest.warns(None) as record: + with warnings.catch_warnings(record=True) as record: sim_result, bioscrape_model = CRN.simulate_with_bioscrape_via_sbml(timepoints=np.linspace(0, 10, 100), initial_condition_dict={str(X):1}, return_model=True) diff --git a/biocrnpyler/plotting.py b/biocrnpyler/plotting.py index cdb7d18d..23549482 100644 --- a/biocrnpyler/plotting.py +++ b/biocrnpyler/plotting.py @@ -49,8 +49,9 @@ import networkx as nx from bokeh.models import (BoxSelectTool, Circle, EdgesAndLinkedNodes, HoverTool, MultiLine, NodesAndLinkedEdges, - PanTool, Plot, Range1d, Square, TapTool, + PanTool, Plot, Range1d, TapTool, WheelZoomTool) + from bokeh.models.markers import Square from bokeh.plotting import from_networkx from bokeh.palettes import Spectral4 from bokeh.io import export_svgs, output_notebook @@ -922,7 +923,7 @@ def render_mixture(mixture,crn,color_dictionary=None,output = None,compiled_comp def render_network_bokeh(CRN,layout="force", layoutfunc = None, plot_reactions = True, plot_species = True, plot_edges = True, plot_arrows = True, iterations=2000,rseed=30,posscale=1,export=False,species_glyph_size = 12, reaction_glyph_size = 8, export_name = None, **keywords): DG, DGspec, DGrxn = generate_networkx_graph(CRN,**keywords) #this creates the networkx objects - plot = Plot(plot_width=500, plot_height=500, x_range=Range1d(-500, 500), y_range=Range1d(-500, 500)) #this generates a + plot = Plot(width=500, height=500, x_range=Range1d(-500, 500), y_range=Range1d(-500, 500)) #this generates a show_im = False images = None if("imagedict" in keywords and keywords["imagedict"] is not None): diff --git a/biocrnpyler/sbmlutil.py b/biocrnpyler/sbmlutil.py index 7abed3a1..d8e7c764 100644 --- a/biocrnpyler/sbmlutil.py +++ b/biocrnpyler/sbmlutil.py @@ -37,7 +37,7 @@ def create_sbml_model(compartment_id="default", time_units='second', extent_unit document = libsbml.SBMLDocument(3, 2) model = document.createModel() if model_id is None: - model_id = 'biocrnpyler_'+str(randint(1, 1e6)) + model_id = 'biocrnpyler_'+str(randint(1, int(1e6))) model.setId(model_id) model.setName(model_id) # Define units for area (not used, but keeps COPASI from complaining) diff --git a/examples/Specialized Tutorials/1. CombinatorialPromoter Details.ipynb b/examples/Specialized Tutorials/1. CombinatorialPromoter Details.ipynb index 27d85b48..afdc7199 100644 --- a/examples/Specialized Tutorials/1. CombinatorialPromoter Details.ipynb +++ b/examples/Specialized Tutorials/1. CombinatorialPromoter Details.ipynb @@ -640,7 +640,7 @@ "#below is CRN plotting code. set plotCRN to False to disable\n", "if(plotCRN):\n", " DG, DGspec, DGrxn = generate_networkx_graph(CRN_extract_1)\n", - " plot = Plot(plot_width=500, plot_height=500, x_range=Range1d(-500, 500), y_range=Range1d(-500, 500))\n", + " plot = Plot(width=500, height=500, x_range=Range1d(-500, 500), y_range=Range1d(-500, 500))\n", " graphPlot(DG,DGspec,DGrxn,plot)\n", " bokeh.io.show(plot)\n", "\n", diff --git a/setup.py b/setup.py index c012dd82..08d8b605 100644 --- a/setup.py +++ b/setup.py @@ -26,11 +26,11 @@ ], extras_require = { "all": [ - "numpy", + "numpy<2.0", "matplotlib", "networkx", "bokeh>=1.4.0", - "fa2", + "fa2_modified", "jupyter", "pytest", "pytest-cov",