Closed CaseyMiddleton closed 2 years ago
@rqthomas Just skimming here, but guessing that the theme
name extraction on
https://github.com/eco4cast/neon4cast/blob/main/R/metadata.R#L46-L47
may not be sufficiently robust? Path logic is always a pain.
@caseymid48 Which theme are you submitting to and what is your forecast file name?
Phenology - apologies about not clarifying that! I agree with Carl that it seems to be a string parsing / path issue, so perhaps using the same logic you are currently implementing but only considering characters after the last "/"? I wish I could be more help - I am newish to R. I really appreciate all the work you have put into this workflow.
@caseymid48 I think the latest commit fixed the issue. Can you test and let me know?
That worked! Thanks a lot, Quinn.
Hello! I am running into an error when creating the metadata for our team's submission. We currently store the forecast submission csv and metadata in a subdirectory of our root folder to keep organized. We use the provided
create_model_metadata
function with the path to our forecast csv to create the metadata, which works without any issue. However, thewrite_metadata_eml
function throws an error that'' does not exist in working directory.
This error seems to be thrown when
theme
is used to create file paths that do not exist in the package. I believe this is becausetheme
expects our file path forforecast_file
andmetadata_yaml
to begin with the challenge theme instead of subdirectories for our file path. For example,theme
is assigned as "data/forecasts/phenology" for our file path, but it seems to work properly if only "phenology" is included. However, I imagine removing these subdirectories would require us to store all files in the root directory, which is not a great option organizationally. Do you have any suggestions for a workaround here, and has any other team run into this problem? Thanks so much for your help and great work putting together these functions for submission!