Skip to content

Commit

Permalink
MANIFEST.in not working
Browse files Browse the repository at this point in the history
  • Loading branch information
forsyth2 committed Nov 27, 2024
1 parent 35042d0 commit b9d16ca
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 13 deletions.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
recursive-include zppy-interfaces zppy_interfaces/global_time_series/zppy_land_fields.csv
recursive-include zppy-interfaces zppy_interfaces/global_time_series/index_template.html
5 changes: 1 addition & 4 deletions zppy_interfaces/global_time_series/coupled_global.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,7 @@ def land_csv_row_to_var(csv_row: List[str]) -> Variable:
def construct_land_variables(requested_vars: List[str]) -> List[Variable]:
var_list: List[Variable] = []
header = True
# TODO: how do we make sure the csv is actually accessible????
# The current directory is where we ran the code from, which is not necessarily where the csv is.
csv_path = INCLUSIONS_DIR
with open(f"{csv_path}/zppy_land_fields.csv", newline="") as csv_file:
with open(f"{INCLUSIONS_DIR}/zppy_land_fields.csv", newline="") as csv_file:
logger.debug("Reading zppy_land_fields.csv")
var_reader = csv.reader(csv_file)
for row in var_reader:
Expand Down
6 changes: 2 additions & 4 deletions zppy_interfaces/global_time_series/coupled_global_utils.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
from enum import Enum

# TODO: how to determine this automatically?
INCLUSIONS_DIR = (
"/home/ac.forsyth2/ez/zppy-interfaces/zppy_interfaces/global_time_series/"
)
# Relies on MANIFEST.in to include files
INCLUSIONS_DIR = "zppy_interfaces/global_time_series"


class Metric(Enum):
Expand Down
6 changes: 1 addition & 5 deletions zppy_interfaces/global_time_series/coupled_global_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,7 @@ def insert_data_in_row(row_obj, name: str, url: str):
td.append(a)
row_obj.append(td)

# import sys
# logger.debug(f"sys.prefix: {sys.prefix}, ls sys.prefix: {os.listdir(sys.prefix)}")
# TODO: figure out install_path
install_path: str = INCLUSIONS_DIR
path: str = os.path.join(install_path, "index_template.html")
path: str = os.path.join(INCLUSIONS_DIR, "index_template.html")
output: str = os.path.join(root_dir, "index.html")

soup = BeautifulSoup(open(path), "lxml")
Expand Down

0 comments on commit b9d16ca

Please sign in to comment.