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

Pn development #1

Merged
merged 17 commits into from
Jan 29, 2019
Merged

Pn development #1

merged 17 commits into from
Jan 29, 2019

Conversation

tjrocha
Copy link
Contributor

@tjrocha tjrocha commented Jan 29, 2019

Request pull for commits shown below. Main changes:

  • added configparser module to project
  • replaced programtime.txt with a config file and added methods to work with the new config file
  • updated Save and SaveAs behavior based on config file entries
  • allow Data tab to accept a start year as input and adjusted app-code to resolve POR from the input start year

…omization and configuration read/writes. Could be used to replace the programTime.txt text file that only stores a user defined ProgramTime.
…log to retrieve defined programtime from the cfg file.
…to cover users installing dependencies while within RECNET
…just software to start referring to this config file.
…ve forecast in a new file. Saving and opening files now writes an entry in the config file. On start-up, the config file entry is set to blank. If this entry is blank, the File>Save auto-save function defaults to the SaveAs behavior.
…ab. Need to modify POR entry in the data doctionary to accept a time range (2 ints) rather than just a single int.
…rates with software as is without data dictionary modifications.
@tjrocha tjrocha requested a review from kevinfol January 29, 2019 14:59
@tjrocha tjrocha self-assigned this Jan 29, 2019
@tjrocha tjrocha added the enhancement New feature or request label Jan 29, 2019

return

def readConfig(self, configKey, configGroup='DEFAULT'):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd just import this function from Resources/Functions/miscFunctions instead of re-writing the whole function here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup. forgot that i pulled that out and put it into miscFunctions. next commit does what you suggest here.

config.read('Resources/tempFiles/pyforecast.cfg')
return config[configGroup][configKey]

def writeConfig(self, configKey, configVal, configGroup='DEFAULT'):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above. Just import from miscFunctions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Contributor

@kevinfol kevinfol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thanks Jon!

@kevinfol kevinfol merged commit f50c2b3 into master Jan 29, 2019
tjrocha added a commit that referenced this pull request Aug 5, 2019
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

Successfully merging this pull request may close these issues.

3 participants