From 57dab1fbade4386afa9875caa6c21de25176ab9b Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 15 Jun 2026 15:24:25 +0200 Subject: [PATCH 1/4] Add GitHub Actions workflow for codespell on main --- .github/workflows/codespell.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/codespell.yml diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 0000000..8d6ddc2 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,23 @@ +# Codespell configuration is within .codespellrc +--- +name: Codespell + +on: + push: + branches: [main] + pull_request: + branches: [main] + +permissions: + contents: read + +jobs: + codespell: + name: Check for spelling errors + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v6 + - name: Codespell + uses: codespell-project/actions-codespell@8f01853be192eb0f849a5c7d721450e7a467c579 # v2.2 From 4991da3d012922979264b3cd3cb8fd5e14a26f76 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 15 Jun 2026 15:24:25 +0200 Subject: [PATCH 2/4] Add rudimentary codespell config --- .codespellrc | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .codespellrc diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 0000000..c20b378 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,6 @@ +[codespell] +# Ref: https://github.com/codespell-project/codespell#using-a-config-file +skip = .git,.gitignore,.gitattributes,*.svg,.codespellrc +check-hidden = true +ignore-regex = ^\s*"image/\S+": ".* +# ignore-words-list = From ea40b0026926ddcc806ef310030b57f0220feb40 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 15 Jun 2026 09:27:20 -0400 Subject: [PATCH 3/4] Fix ambiguous typos and whitelist valid biology term Two ambiguous typos required context review: - proceded -> proceed in logic_operator_objects.py:38 (auxiliary "should" + infinitive: "string analysis should proceed") - thorugh -> through in hierarchical_plot.py:40 (preposition: "looping through all of them") Also added 'inactivate' to ignore-words-list in .codespellrc -- it is a valid English/biology term used in the NOR_gate.py example ("any of them can inactivate the Promoter"); codespell incorrectly suggested "deactivate". Co-Authored-By: Claude Code 2.1.177 / Claude Opus 4.7 --- .codespellrc | 6 ++++-- mobspy/modules/logic_operator_objects.py | 2 +- mobspy/plot_scripts/hierarchical_plot.py | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.codespellrc b/.codespellrc index c20b378..1e28e2e 100644 --- a/.codespellrc +++ b/.codespellrc @@ -1,6 +1,8 @@ [codespell] # Ref: https://github.com/codespell-project/codespell#using-a-config-file -skip = .git,.gitignore,.gitattributes,*.svg,.codespellrc +skip = .git,.git-meta,.gitignore,.gitattributes,*.svg,.codespellrc check-hidden = true ignore-regex = ^\s*"image/\S+": ".* -# ignore-words-list = +ignore-words-list = + # valid biology term used in NOR_gate example (inactivate the Promoter) + inactivate diff --git a/mobspy/modules/logic_operator_objects.py b/mobspy/modules/logic_operator_objects.py index 1ae6a49..d7b31c1 100644 --- a/mobspy/modules/logic_operator_objects.py +++ b/mobspy/modules/logic_operator_objects.py @@ -35,7 +35,7 @@ def check_parenthesis(cls, code_line, line_number, pos, symbol, number_of_comp): :param code_line: (str) line of code to be compiled :param line_number: (str) number of the code line currently being compiled :param pos: (int) position of the '>' or '<' operator - :param symbol: '(' or ')', indicates in which direction the string analysis should proceded + :param symbol: '(' or ')', indicates in which direction the string analysis should proceed :param number_of_comp: for distinction the default case where only one operator is present :raise simlog.error: if the code line is not properly written isolating the clauses with parenthesis diff --git a/mobspy/plot_scripts/hierarchical_plot.py b/mobspy/plot_scripts/hierarchical_plot.py index 9b04bef..75fec85 100644 --- a/mobspy/plot_scripts/hierarchical_plot.py +++ b/mobspy/plot_scripts/hierarchical_plot.py @@ -37,7 +37,7 @@ def __call__(self, n): def find_species_time_series(spe, data): """ There can be different time-series in MobsPy data (even experimental data, as long as it is in MobPy format) - This function finds all the time-series the species is present in and returns it for looping thorugh all of + This function finds all the time-series the species is present in and returns it for looping through all of them This function is implemented to allow for the comparison of models with experimental data or other models From 7c0bed73e189267bdd636456a4389f9ac8ec2e3a Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 15 Jun 2026 09:28:57 -0400 Subject: [PATCH 4/4] [DATALAD RUNCMD] Apply non-ambiguous typo fixes via codespell -w Fixed 26 typos across 21 files: - Indepedent -> Independent (README.md) - conterparts -> counterparts (Synchronized_Cycles_of_Bacterial_Lysis.py) - charcteristic, characteritics -> character(istic,istics) (01_Basic_Intro.ipynb) - bellow/Bellow -> below/Below (5 occurrences: tutorial nb 01/18/20, compiler_operator_functions.py, meta_class.py:1031, order_operators.py) - acess -> access (3 occurrences: 01_Basic_Intro.ipynb, 09_Result_Data.ipynb, hierarchical_plot.py) - Futhermore -> Furthermore (11_Looping_Through_Species.ipynb) - reapeat -> repeat (simulation.py) - Characteritics -> Characteristics (compiler.py) - apear -> appear (function_rate_code.py, logic_operator_objects.py) - debbuging -> debugging (meta_class.py) - writting -> writing (mobspy_expressions.py) - generetes -> generates (species_string_generator.py) - paramters -> parameters (parameters/README.md) - experimetns -> experiments (basico_task_parametrization.py) - statics -> statistics (default_plots.py) - PLOTING -> PLOTTING (hierarchical_plot.py) - addding -> adding (sbml_simulator/run.py) Co-Authored-By: Claude Code 2.1.177 / Claude Opus 4.7 === Do not change lines below === { "chain": [], "cmd": "uvx codespell -w", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --- README.md | 2 +- .../Synchronized_Cycles_of_Bacterial_Lysis.py | 2 +- .../tutorial_notebooks/01_Basic_Intro.ipynb | 8 ++++---- .../tutorial_notebooks/09_Result_Data.ipynb | 2 +- .../tutorial_notebooks/11_Looping_Through_Species.ipynb | 2 +- .../tutorial_notebooks/18_Reversible_Reactions.ipynb | 2 +- .../20_Update_Model_After_Compilation.ipynb | 2 +- mobspy/modules/compiler.py | 2 +- mobspy/modules/compiler_operator_functions.py | 2 +- mobspy/modules/function_rate_code.py | 2 +- mobspy/modules/logic_operator_objects.py | 2 +- mobspy/modules/meta_class.py | 4 ++-- mobspy/modules/mobspy_expressions.py | 2 +- mobspy/modules/order_operators.py | 2 +- mobspy/modules/species_string_generator.py | 2 +- mobspy/parameters/README.md | 2 +- mobspy/patch_scripts/basico_task_parametrization.py | 2 +- mobspy/plot_scripts/default_plots.py | 2 +- mobspy/plot_scripts/hierarchical_plot.py | 4 ++-- mobspy/sbml_simulator/run.py | 2 +- mobspy/simulation.py | 2 +- 21 files changed, 26 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 29f91b4..796326b 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ The reaction above is a death reaction where the meta-species Mortal is dying. ` In the code above, one can visualize the inheritance mechanism. Here both Replicator and Triplicator inherit from Mortal. Therefore, they also receive a death reaction. Multiplicator inherits from Replicator and Triplicator, and therefore from Mortal too. So Multiplicator now has three reactions, the death reaction, the duplication reaction, and the triplication reaction. -## Indepedent State Spaces +## Independent State Spaces Each meta-species has a set of states. One can add states to species by using the dot command (`.state`) or by inheritance. A meta-species that inherits from another gains access to its states. For instance: diff --git a/docs/example_models/journal_models/Synchronized_Cycles_of_Bacterial_Lysis.py b/docs/example_models/journal_models/Synchronized_Cycles_of_Bacterial_Lysis.py index d304b13..b213c6e 100644 --- a/docs/example_models/journal_models/Synchronized_Cycles_of_Bacterial_Lysis.py +++ b/docs/example_models/journal_models/Synchronized_Cycles_of_Bacterial_Lysis.py @@ -49,7 +49,7 @@ 12 / u.h, ) -# N, L, H, I - Are the respective conterparts of the meta-species below +# N, L, H, I - Are the respective counterparts of the meta-species below # in the original paper's model Cell, Lysis, AHL, LuxI = BaseSpecies() diff --git a/docs/example_models/tutorial_notebooks/01_Basic_Intro.ipynb b/docs/example_models/tutorial_notebooks/01_Basic_Intro.ipynb index 4d4e150..1905048 100644 --- a/docs/example_models/tutorial_notebooks/01_Basic_Intro.ipynb +++ b/docs/example_models/tutorial_notebooks/01_Basic_Intro.ipynb @@ -176,7 +176,7 @@ "Mortal = BaseSpecies()\n", "\n", "# Functions can be rates. Reactants will be passed to the function which will return a higher rate if it contains the\n", - "# charcteristic old\n", + "# characteristic old\n", "Mortal >> Zero[lambda r1: 1 / u.year if r1.old else 0]" ] }, @@ -233,7 +233,7 @@ "`Tree.young.yellow.dense` $\\rightarrow$ `Tree.old.yellow.dense` \\\n", "`Tree.young.yellow.sparse` $\\rightarrow$ `Tree.old.yellow.sparse` \n", "\n", - "When using the dot notation in the reactants, MobsPy performs a query and filters the states that do not contain the specified characteristics. When using the dot notation in the products, one specifies the coordinate on the vector space where the transformation should occur. Thus, the Ager reaction transforms young to old as those are the characteritics in the Ager vector axis." + "When using the dot notation in the reactants, MobsPy performs a query and filters the states that do not contain the specified characteristics. When using the dot notation in the products, one specifies the coordinate on the vector space where the transformation should occur. Thus, the Ager reaction transforms young to old as those are the characteristics in the Ager vector axis." ] }, { @@ -279,7 +279,7 @@ "Further, the second reactant becomes the second product unless there are more products than reactants. \n", "In that case, if the products run out of corresponding reactants, MobsPy will cycle through the reactants and pick the first one again.\n", "\n", - "See the diagram bellow for the reaction\n", + "See the diagram below for the reaction\n", "\n", "```python\n", "2 * Meta_species_1 + Meta_species_2 >> 3 * Meta_species_1 + Meta_species_2\n", @@ -499,7 +499,7 @@ "metadata": {}, "source": [ "One can see how MobsPy was able to reduce a 27 reaction model into three meta-reactions. \n", - "Finally, one can acess the results inside the simulation object " + "Finally, one can access the results inside the simulation object " ] }, { diff --git a/docs/example_models/tutorial_notebooks/09_Result_Data.ipynb b/docs/example_models/tutorial_notebooks/09_Result_Data.ipynb index 2ba47b1..7e766a6 100644 --- a/docs/example_models/tutorial_notebooks/09_Result_Data.ipynb +++ b/docs/example_models/tutorial_notebooks/09_Result_Data.ipynb @@ -138,7 +138,7 @@ "metadata": {}, "source": [ "One can also access the data directly from the simulation object using the meta-species objects or strings. \n", - "Similarly to the plotting function you can perform queries in the result data. Below, we show an example to acess the data directly:" + "Similarly to the plotting function you can perform queries in the result data. Below, we show an example to access the data directly:" ] }, { diff --git a/docs/example_models/tutorial_notebooks/11_Looping_Through_Species.ipynb b/docs/example_models/tutorial_notebooks/11_Looping_Through_Species.ipynb index f87f1c7..081a198 100644 --- a/docs/example_models/tutorial_notebooks/11_Looping_Through_Species.ipynb +++ b/docs/example_models/tutorial_notebooks/11_Looping_Through_Species.ipynb @@ -130,7 +130,7 @@ "source": [ "## List Species\n", "\n", - "Futhermore, MobsPy provides a `ListSpecies` constructor. This constructor creates a list of meta-species automatically named with the variable used to construct the `ListSpecies`, concatenated with `_` and the number of the species in the list." + "Furthermore, MobsPy provides a `ListSpecies` constructor. This constructor creates a list of meta-species automatically named with the variable used to construct the `ListSpecies`, concatenated with `_` and the number of the species in the list." ] }, { diff --git a/docs/example_models/tutorial_notebooks/18_Reversible_Reactions.ipynb b/docs/example_models/tutorial_notebooks/18_Reversible_Reactions.ipynb index ec94dd9..40ae881 100644 --- a/docs/example_models/tutorial_notebooks/18_Reversible_Reactions.ipynb +++ b/docs/example_models/tutorial_notebooks/18_Reversible_Reactions.ipynb @@ -63,7 +63,7 @@ "id": "55c92ce6-985a-463c-a4e7-18b62c8b5de6", "metadata": {}, "source": [ - "The other reversible reaction notation uses the Rev operator and an example follows bellow " + "The other reversible reaction notation uses the Rev operator and an example follows below " ] }, { diff --git a/docs/example_models/tutorial_notebooks/20_Update_Model_After_Compilation.ipynb b/docs/example_models/tutorial_notebooks/20_Update_Model_After_Compilation.ipynb index 179145b..bf35d3f 100644 --- a/docs/example_models/tutorial_notebooks/20_Update_Model_After_Compilation.ipynb +++ b/docs/example_models/tutorial_notebooks/20_Update_Model_After_Compilation.ipynb @@ -56,7 +56,7 @@ "source": [ "In the previous model, we forgot to add an initial count to the A species and unfortunately set the parameter k_a to zero. \n", "The method update_model from the simulation object allows us to correct this. \n", - "For each value to be updated, the user must supply a two-element list to the update model function. This two-element list contains in the first index either the meta-species whose initial count will be updated or the parameter whose value will be updated, the second index is the new updated value. Bellow an example follows: " + "For each value to be updated, the user must supply a two-element list to the update model function. This two-element list contains in the first index either the meta-species whose initial count will be updated or the parameter whose value will be updated, the second index is the new updated value. Below an example follows: " ] }, { diff --git a/mobspy/modules/compiler.py b/mobspy/modules/compiler.py index 1038338..32b0d32 100644 --- a/mobspy/modules/compiler.py +++ b/mobspy/modules/compiler.py @@ -130,7 +130,7 @@ def compile( :param species_counts: (dict) All counts assigned to species in the model before the simulation object was constructed :param orthogonal_vector_structure: (dict) ref_characteristics_to_objects in other modules. Dictionary - with the characteristics as keys and the objects as values. Characteritics pointing to their coordinate + with the characteristics as keys and the objects as values. Characteristics pointing to their coordinate in the vector space :param volume: (int, flot) Simulation volume :param type_of_model: (str) deterministic or stochastic diff --git a/mobspy/modules/compiler_operator_functions.py b/mobspy/modules/compiler_operator_functions.py index d5ad90c..260c9f0 100644 --- a/mobspy/modules/compiler_operator_functions.py +++ b/mobspy/modules/compiler_operator_functions.py @@ -45,7 +45,7 @@ def include_new_combinations(r, attribute_to_get): def get_all_non_listed_characteristics(species, characteristics): """ - This function gets all characteristics related to a species except the ones listed bellow. + This function gets all characteristics related to a species except the ones listed below. It uses inheritance to find all charactersitcs linked to a species """ operator_characteristics = {c for c in characteristics if "$" in c} diff --git a/mobspy/modules/function_rate_code.py b/mobspy/modules/function_rate_code.py index d67c419..37f03e3 100644 --- a/mobspy/modules/function_rate_code.py +++ b/mobspy/modules/function_rate_code.py @@ -49,7 +49,7 @@ def extract_reaction_rate( :param function_rate_arguments: list of strings of the function rate argument ex:['r1', 'r2', ....] :param combination_of_reactant_species: (list of Species) Meta-species currently being used in this reaction - :param reactant_string_list: (list of strings) list of species strings in order they apear in the reaction + :param reactant_string_list: (list of strings) list of species strings in order they appear in the reaction :param reaction_rate_function: (float, callable, Quantity) rate stored in the reaction object :param dimension: (int) system dimension (for the rate conversion) diff --git a/mobspy/modules/logic_operator_objects.py b/mobspy/modules/logic_operator_objects.py index d7b31c1..0227a2e 100644 --- a/mobspy/modules/logic_operator_objects.py +++ b/mobspy/modules/logic_operator_objects.py @@ -343,7 +343,7 @@ def generate_string(self, characteristics_to_object, to_sort=False): all individual states :param characteristics_to_object: orthogonal characteristic space - :param to_sort: sort strings or not - so the sum will always apear in the same order + :param to_sort: sort strings or not - so the sum will always appear in the same order """ copasi_str = "" for i, e in enumerate(self.operation): diff --git a/mobspy/modules/meta_class.py b/mobspy/modules/meta_class.py index 7546bd1..a9af524 100644 --- a/mobspy/modules/meta_class.py +++ b/mobspy/modules/meta_class.py @@ -219,7 +219,7 @@ def __init__(self, reactants, products, rate=None) -> None: @staticmethod def __create_reactants_string(list_of_reactants) -> str: """ - Just a simple way to simlog.debug reactions for debbuging + Just a simple way to simlog.debug reactions for debugging Not relevant for simulation Important: here reactants are used interchangeably with products, this works for a list_of_products too @@ -1028,7 +1028,7 @@ def __or__(self, other: "Species | List_Species") -> "List_Species": else: _logger.error("Only Species and List_Species can be concatenated") - # Both are defined bellow to be consistent with List_Species behavior + # Both are defined below to be consistent with List_Species behavior def __iter__(self): """ iter defined to be consistent with List_Species behavior diff --git a/mobspy/modules/mobspy_expressions.py b/mobspy/modules/mobspy_expressions.py index de2a7eb..7adcc72 100644 --- a/mobspy/modules/mobspy_expressions.py +++ b/mobspy/modules/mobspy_expressions.py @@ -402,7 +402,7 @@ def _generate_necessary_attributes(self): This function was implemented as a replacement for innit for classes that inherit from multiple Pint objects. This gives the object all the necessary attributes to execute create_from_new_operation. I've done this instead of overrinding the __init__ because it had some compatibility issue with Pint - __init__ at the time of writting this + __init__ at the time of writing this """ # Operation variables self._operation = None diff --git a/mobspy/modules/order_operators.py b/mobspy/modules/order_operators.py index f21860b..d8f48f0 100644 --- a/mobspy/modules/order_operators.py +++ b/mobspy/modules/order_operators.py @@ -253,7 +253,7 @@ class __Round_Robin_Base(__Operator_Base): This is a cycle (round robin) between the reactants to be assigned positions in the product The products will keep the characteristics of the reactants except if stated otherwise with . For completely new species (no reactant of the same species) we use ALL possible combinations - For only the default option see the code bellow + For only the default option see the code below """ def __call__( diff --git a/mobspy/modules/species_string_generator.py b/mobspy/modules/species_string_generator.py index bb57589..c0244c0 100644 --- a/mobspy/modules/species_string_generator.py +++ b/mobspy/modules/species_string_generator.py @@ -23,7 +23,7 @@ def construct_species_char_list( spe_or_reactiong_object, characteristics, characteristics_to_object, symbol=None ): """ - This function constructs a list in the format ['species_name', 'char1', 'char2', ...]. It generetes this list + This function constructs a list in the format ['species_name', 'char1', 'char2', ...]. It generates this list for a given meta-species and the specified characteristics. Values of characteristics not specified in a particular position are replaced by their default value. If a symbol is given it generates a string from the list using the symbol to join it. diff --git a/mobspy/parameters/README.md b/mobspy/parameters/README.md index 293b5bd..cf549f3 100644 --- a/mobspy/parameters/README.md +++ b/mobspy/parameters/README.md @@ -1,6 +1,6 @@ # Parameter Explanation -## Model paramters +## Model parameters - `volume` (float w/wo unit): sets the volume in the simulation (default is 1 litre) diff --git a/mobspy/patch_scripts/basico_task_parametrization.py b/mobspy/patch_scripts/basico_task_parametrization.py index 47322f8..e05de68 100644 --- a/mobspy/patch_scripts/basico_task_parametrization.py +++ b/mobspy/patch_scripts/basico_task_parametrization.py @@ -1908,7 +1908,7 @@ def save_experiments_to_dict(**kwargs): - | `return_relative`: to indicate that relative experiment filenames should | be returned (default: True) - :return: the parameter estimation experimetns as list of dictionary + :return: the parameter estimation experiments as list of dictionary :rtype: [{}] """ experiments = [] diff --git a/mobspy/plot_scripts/default_plots.py b/mobspy/plot_scripts/default_plots.py index 77a7934..1a69864 100644 --- a/mobspy/plot_scripts/default_plots.py +++ b/mobspy/plot_scripts/default_plots.py @@ -93,7 +93,7 @@ def stochastic_plot(species, data, plot_params): new_plot_params["pad"] = 1.5 color_cycler = hp.Color_cycle() for spe in species: - # We define new 'mappings' with the resulting runs for the statics for the plot structure + # We define new 'mappings' with the resulting runs for the statistics for the plot structure try: plots_for_spe_i = [] plots_for_spe_i_sta = [] diff --git a/mobspy/plot_scripts/hierarchical_plot.py b/mobspy/plot_scripts/hierarchical_plot.py index 75fec85..03a5330 100644 --- a/mobspy/plot_scripts/hierarchical_plot.py +++ b/mobspy/plot_scripts/hierarchical_plot.py @@ -70,7 +70,7 @@ def get_total_figure_number(axis_matrix): # Hash for converting linear figure number into index def figure_hash(current_figure, axis_matrix): """ - This function allows one to acess the figure grid with a linear input + This function allows one to access the figure grid with a linear input For instance one can access a 2x2 grid using 0, 1, 2, 3 0 becomes 0,0 1 becomes 1,0 @@ -222,7 +222,7 @@ def annotation_handling(axs, figure_index, plot_index, plot_params): return 0 -####################### PLOTING FUNCTIONS +####################### PLOTTING FUNCTIONS def plot_curves(data, axs, figure_index, plot_params): """ This function plots the programmed curves in the assigned figure diff --git a/mobspy/sbml_simulator/run.py b/mobspy/sbml_simulator/run.py index 36123ef..7f29f45 100644 --- a/mobspy/sbml_simulator/run.py +++ b/mobspy/sbml_simulator/run.py @@ -97,7 +97,7 @@ def __single_run(packed): if not parallel_data: simlog.error( "Error: The parallel model has not produced an output." - + "Try addding ('sequential': True) to parameters" + + "Try adding ('sequential': True) to parameters" ) return parallel_data diff --git a/mobspy/simulation.py b/mobspy/simulation.py index e8841cc..75689ad 100644 --- a/mobspy/simulation.py +++ b/mobspy/simulation.py @@ -1590,7 +1590,7 @@ def run( :param duration: (iterable) duration of a simulation :param volume: (iterable) volume of the simulation - if none given 1 - liter is used - :param repetitions: (int) number of times to reapeat a simulation + :param repetitions: (int) number of times to repeat a simulation :param level: (int) 0 - only error messages, 3 - errors, warnings, compilation info :param simulation_method: (iterable) stochastic, deterministic, direct_method - simulation method :param start_time: (float) the simulation will only display data after the start time