From 06571f002739c392fcebb1f841c6551f612cb6c9 Mon Sep 17 00:00:00 2001 From: Mudassir Chapra <37051110+muddi900@users.noreply.github.com> Date: Thu, 15 Aug 2024 18:11:54 +0500 Subject: [PATCH] Remove all redundant `music_box_` from file names and updated references [Issue #177] (#180) * Remove all redundant `music_box_` from file names and updated references [Issue #177] * correcting relative imports * correcting more imports * renaming executable --------- Co-authored-by: Kyle Shores --- pyproject.toml | 2 +- src/acom_music_box/__init__.py | 20 ++++++++-------- ...{music_box_conditions.py => conditions.py} | 11 ++++++--- ...g_conditions.py => evolving_conditions.py} | 6 ++--- .../{music_box_main.py => main.py} | 0 ..._box_model_options.py => model_options.py} | 0 src/acom_music_box/music_box.py | 23 ++++++++++++++----- .../{music_box_product.py => product.py} | 0 .../{music_box_reactant.py => reactant.py} | 0 .../{music_box_reaction.py => reaction.py} | 0 ..._box_reaction_list.py => reaction_list.py} | 6 ++--- ..._box_reaction_rate.py => reaction_rate.py} | 0 .../{music_box_species.py => species.py} | 0 ...centration.py => species_concentration.py} | 0 ...ic_box_species_list.py => species_list.py} | 2 +- 15 files changed, 43 insertions(+), 27 deletions(-) rename src/acom_music_box/{music_box_conditions.py => conditions.py} (97%) rename src/acom_music_box/{music_box_evolving_conditions.py => evolving_conditions.py} (98%) rename src/acom_music_box/{music_box_main.py => main.py} (100%) rename src/acom_music_box/{music_box_model_options.py => model_options.py} (100%) rename src/acom_music_box/{music_box_product.py => product.py} (100%) rename src/acom_music_box/{music_box_reactant.py => reactant.py} (100%) rename src/acom_music_box/{music_box_reaction.py => reaction.py} (100%) rename src/acom_music_box/{music_box_reaction_list.py => reaction_list.py} (98%) rename src/acom_music_box/{music_box_reaction_rate.py => reaction_rate.py} (100%) rename src/acom_music_box/{music_box_species.py => species.py} (100%) rename src/acom_music_box/{music_box_species_concentration.py => species_concentration.py} (100%) rename src/acom_music_box/{music_box_species_list.py => species_list.py} (99%) diff --git a/pyproject.toml b/pyproject.toml index 79d6feeb..bb75bd54 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,4 +28,4 @@ dependencies = [ Home = "https://github.com/NCAR/music-box" [project.scripts] -music_box = "acom_music_box.music_box_main:main" +music_box = "acom_music_box.main:main" diff --git a/src/acom_music_box/__init__.py b/src/acom_music_box/__init__.py index b8f042a5..21af2747 100644 --- a/src/acom_music_box/__init__.py +++ b/src/acom_music_box/__init__.py @@ -7,15 +7,15 @@ __version__ = "2.1.5" from .utils import convert_time, convert_pressure, convert_temperature, convert_concentration -from .music_box_species import Species -from .music_box_product import Product -from .music_box_reactant import Reactant -from .music_box_reaction import Reaction, Branched, Arrhenius, Tunneling, Troe_Ternary -from .music_box_species_list import SpeciesList -from .music_box_model_options import BoxModelOptions -from .music_box_species_concentration import SpeciesConcentration -from .music_box_reaction_rate import ReactionRate -from .music_box_conditions import Conditions +from .species import Species +from .product import Product +from .reactant import Reactant +from .reaction import Reaction, Branched, Arrhenius, Tunneling, Troe_Ternary +from .species_list import SpeciesList +from .model_options import BoxModelOptions +from .species_concentration import SpeciesConcentration +from .reaction_rate import ReactionRate +from .conditions import Conditions -from .music_box_evolving_conditions import EvolvingConditions +from .evolving_conditions import EvolvingConditions from .music_box import MusicBox diff --git a/src/acom_music_box/music_box_conditions.py b/src/acom_music_box/conditions.py similarity index 97% rename from src/acom_music_box/music_box_conditions.py rename to src/acom_music_box/conditions.py index 8ece10a2..f5c239c8 100644 --- a/src/acom_music_box/music_box_conditions.py +++ b/src/acom_music_box/conditions.py @@ -1,10 +1,15 @@ from .utils import convert_time, convert_pressure, convert_temperature, convert_concentration -from .music_box_species_concentration import SpeciesConcentration -from .music_box_species import Species -from .music_box_reaction_rate import ReactionRate +from .species_concentration import SpeciesConcentration +from .species import Species +from .reaction_rate import ReactionRate from typing import List import csv import os +from typing import List +from .reaction_rate import ReactionRate +from .species import Species +from .species_concentration import SpeciesConcentration +from .utils import convert_time, convert_pressure, convert_temperature, convert_concentration import logging logger = logging.getLogger(__name__) diff --git a/src/acom_music_box/music_box_evolving_conditions.py b/src/acom_music_box/evolving_conditions.py similarity index 98% rename from src/acom_music_box/music_box_evolving_conditions.py rename to src/acom_music_box/evolving_conditions.py index 0c7da184..589f4337 100644 --- a/src/acom_music_box/music_box_evolving_conditions.py +++ b/src/acom_music_box/evolving_conditions.py @@ -1,9 +1,9 @@ import csv import os from typing import List -from .music_box_conditions import Conditions -from .music_box_species_concentration import SpeciesConcentration -from .music_box_reaction_rate import ReactionRate +from .conditions import Conditions +from .species_concentration import SpeciesConcentration +from .reaction_rate import ReactionRate class EvolvingConditions: diff --git a/src/acom_music_box/music_box_main.py b/src/acom_music_box/main.py similarity index 100% rename from src/acom_music_box/music_box_main.py rename to src/acom_music_box/main.py diff --git a/src/acom_music_box/music_box_model_options.py b/src/acom_music_box/model_options.py similarity index 100% rename from src/acom_music_box/music_box_model_options.py rename to src/acom_music_box/model_options.py diff --git a/src/acom_music_box/music_box.py b/src/acom_music_box/music_box.py index 1cef19b5..f058368b 100644 --- a/src/acom_music_box/music_box.py +++ b/src/acom_music_box/music_box.py @@ -1,17 +1,28 @@ import musica import csv -from .music_box_conditions import Conditions -from .music_box_model_options import BoxModelOptions -from .music_box_species_list import SpeciesList -from .music_box_reaction import Reaction, Branched, Arrhenius, Tunneling, Troe_Ternary -from .music_box_reaction_list import ReactionList -from .music_box_evolving_conditions import EvolvingConditions +from .conditions import Conditions +from .model_options import BoxModelOptions +from .species_list import SpeciesList +from .reaction import Reaction, Branched, Arrhenius, Tunneling, Troe_Ternary +from .reaction_list import ReactionList +from .evolving_conditions import EvolvingConditions import json import os import logging logger = logging.getLogger(__name__) +from .evolving_conditions import EvolvingConditions +from .reaction_list import ReactionList +from .reaction import Reaction, Branched, Arrhenius, Tunneling, Troe_Ternary +from .species_list import SpeciesList +from .model_options import BoxModelOptions +from .conditions import Conditions + +import csv +import musica + + class MusicBox: """ diff --git a/src/acom_music_box/music_box_product.py b/src/acom_music_box/product.py similarity index 100% rename from src/acom_music_box/music_box_product.py rename to src/acom_music_box/product.py diff --git a/src/acom_music_box/music_box_reactant.py b/src/acom_music_box/reactant.py similarity index 100% rename from src/acom_music_box/music_box_reactant.py rename to src/acom_music_box/reactant.py diff --git a/src/acom_music_box/music_box_reaction.py b/src/acom_music_box/reaction.py similarity index 100% rename from src/acom_music_box/music_box_reaction.py rename to src/acom_music_box/reaction.py diff --git a/src/acom_music_box/music_box_reaction_list.py b/src/acom_music_box/reaction_list.py similarity index 98% rename from src/acom_music_box/music_box_reaction_list.py rename to src/acom_music_box/reaction_list.py index 78f54cfc..247e279a 100644 --- a/src/acom_music_box/music_box_reaction_list.py +++ b/src/acom_music_box/reaction_list.py @@ -1,9 +1,9 @@ import os import json from typing import List -from .music_box_reaction import Reaction, Branched, Arrhenius, Tunneling, Troe_Ternary -from .music_box_reactant import Reactant -from .music_box_product import Product +from .reaction import Reaction, Branched, Arrhenius, Tunneling, Troe_Ternary +from .reactant import Reactant +from .product import Product import logging logger = logging.getLogger(__name__) diff --git a/src/acom_music_box/music_box_reaction_rate.py b/src/acom_music_box/reaction_rate.py similarity index 100% rename from src/acom_music_box/music_box_reaction_rate.py rename to src/acom_music_box/reaction_rate.py diff --git a/src/acom_music_box/music_box_species.py b/src/acom_music_box/species.py similarity index 100% rename from src/acom_music_box/music_box_species.py rename to src/acom_music_box/species.py diff --git a/src/acom_music_box/music_box_species_concentration.py b/src/acom_music_box/species_concentration.py similarity index 100% rename from src/acom_music_box/music_box_species_concentration.py rename to src/acom_music_box/species_concentration.py diff --git a/src/acom_music_box/music_box_species_list.py b/src/acom_music_box/species_list.py similarity index 99% rename from src/acom_music_box/music_box_species_list.py rename to src/acom_music_box/species_list.py index 67142a4d..4d815d53 100644 --- a/src/acom_music_box/music_box_species_list.py +++ b/src/acom_music_box/species_list.py @@ -1,7 +1,7 @@ import json import os from typing import List -from .music_box_species import Species +from .species import Species class SpeciesList: