Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add input and output file directories to the config.yaml file #83

Open
trevorb1 opened this issue Dec 18, 2021 · 1 comment
Open

Add input and output file directories to the config.yaml file #83

trevorb1 opened this issue Dec 18, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@trevorb1
Copy link
Member

It would be good to add inputDir and outputDir variables to the config file (similar to whats in the snakefile) that all the scripts call. That way if we ever change directory naming its not a tedious task where we have to change paths in all the scrips

ie. Instead of having

image

in the config.yaml file we would have:
outputDir = '../src/data/

then the script would read in the value from the config file and the line would be (checking syntax of creating the file path like that)
df.to_csv(outputDir + 'SpecifiedDemandProfile.csv', index=False)

@trevorb1 trevorb1 added the enhancement New feature or request label Dec 18, 2021
@tniet
Copy link

tniet commented Dec 19, 2021

Use os.path.join to make it OS independent and more future proof:
df.to_csv(os.path.join(outputDir, 'SpecifiedDemandProvide.csv'), index=False)

@Kiel-SFU Kiel-SFU removed their assignment Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants