Skip to content

Commit

Permalink
Rename project
Browse files Browse the repository at this point in the history
  • Loading branch information
chp2001 committed Aug 27, 2024
1 parent 8d06c18 commit 88f7d6a
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions formulation.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "bmi_python",
"params": {
"name": "pyflo_bmi",
"model_type_name": "pyflo_bmi_model",
"name": "unithg_bmi",
"model_type_name": "unithg_bmi_model",
"main_output_variable": "discharge_calculated",
"init_config": "/dev/null",
"allow_exceed_end_time": true,
"uses_forcing_file": true,
"forcing_file": "./forcings/by_catchment/{{id}}.csv",
"python_type": "pyflo_bmi.Bmi_Pyflo",
"python_type": "unithg_bmi.Bmi_Unithg",
"output_variables": [
"discharge_calculated",
"APCP_surface"
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "pyflo_bmi"
name = "unithg_bmi"
version = "0.1.0"
description = "A Python-based Ngen-BMI model for the PyFlo module."
description = "A Python-based Ngen-BMI model for unit hydrograph."
authors = [{name = "Chad Perry"}]
maintainers = [{name = "Chad Perry"}]
license = {file = "LICENSE"}
Expand Down
6 changes: 3 additions & 3 deletions setup_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from pathlib import Path
from typing import Any

project_name = "pyflo_bmi"
proj_folder = Path("pyflo_bmi")
project_name = "unithg_bmi"
proj_folder = Path("unithg_bmi")
this_folder = Path(".")
requirements = []
author_name = "Chad Perry"
Expand Down Expand Up @@ -73,7 +73,7 @@ def build_pyproject_toml(project_name:str, requirements:list[str], path:Path = t
toml["project"] = {
"name": project_name,
"version": "0.1.0",
"description": "A Python-based Ngen-BMI model for the PyFlo module.",
"description": "A Python-based Ngen-BMI model for unit hydrograph.",
"authors": [{"name": author_name}],
"maintainers": [{"name": author_name}],
"license": {"file": "LICENSE"},
Expand Down
4 changes: 2 additions & 2 deletions test_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
from matplotlib import pyplot as plt
import math, random, numpy as np

import pyflo_bmi.pyflo_bmi as pyflo_bmi
import unithg_bmi.unithg_bmi as unithg_bmi
from time import time, perf_counter

output_var = "discharge_calculated"
# Load the model
model = pyflo_bmi.Bmi_Pyflo()
model = unithg_bmi.Bmi_Unithg()

def init_model():
catchment_area = 1.0
Expand Down
2 changes: 1 addition & 1 deletion pyflo_bmi/__init__.py → unithg_bmi/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .pyflo_bmi import *
from .unithg_bmi import *
from .src.basins import *
from .src.discrete_time_series import *
from .src.conversions import *
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions pyflo_bmi/pyflo_bmi.py → unithg_bmi/unithg_bmi.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ def _finalize_info_categories(cls):
return cls

@_finalize_info_categories
class Bmi_Pyflo(Bmi):
class Bmi_Unithg(Bmi):
"""
A Basic Model Interface (BMI) wrapper for the PyFLO model.
A Basic Model Interface (BMI) wrapper for the unit hydrograph.
Required model methods:
- Bookkeeping:
Expand Down Expand Up @@ -128,7 +128,7 @@ def set_value(self, value: Union[float, np.ndarray]):
else:
self.value[0] = value
# Internal model attributes
_name: str = "PyFlo_BMI"
_name: str = "unithg_bmi"
_start_time: float
_num_time_steps: int
_time_step_size: float
Expand Down Expand Up @@ -193,9 +193,9 @@ def __init__(self):
self.info()
#Ensure these are initialized as instance variables, not class variables
self._vars = {
Bmi_Pyflo.VarType.INPUT: [],
Bmi_Pyflo.VarType.OUTPUT: [],
Bmi_Pyflo.VarType.MODEL: [],
Bmi_Unithg.VarType.INPUT: [],
Bmi_Unithg.VarType.OUTPUT: [],
Bmi_Unithg.VarType.MODEL: [],
}
self._model = None
self._model_data = {}
Expand Down

0 comments on commit 88f7d6a

Please sign in to comment.