Skip to content

Allow individual directory names in database to be specified#107

Merged
nstauff merged 2 commits intowatts-dev:developmentfrom
paulromano:plugin-output-dir
Jul 19, 2023
Merged

Allow individual directory names in database to be specified#107
nstauff merged 2 commits intowatts-dev:developmentfrom
paulromano:plugin-output-dir

Conversation

@paulromano
Copy link
Copy Markdown
Contributor

Description

Normally directory names in the database are selected at random with the uuid module. However, in some cases users may wish to specify the directory names. This PR adds a new output_dir argument on Plugin.__call__ that enables the relative directory path to be specified.

Checklist:

  • My code follows the style guidelines
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have updated the CHANGELOG.md file (if applicable)
  • I have successfully run examples that may be affected by my changes

@paulromano paulromano requested a review from nstauff July 18, 2023 12:37
Copy link
Copy Markdown
Contributor

@nstauff nstauff left a comment

Choose a reason for hiding this comment

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

Thanks @paulromano - I reviewed and tested and it works fine. One thought - would it make sense to add an option to return the file to main directory? I think this would be useful to some users.

@paulromano
Copy link
Copy Markdown
Contributor Author

Returning files to the main directory would break the result/database functionality since there is an assumption that a single result is stored in its own directory. If we were to do that, the only way I could imagine it working is to simply not save such a result to the database, which may also be confusing to a user if they're expecting to be able to retrieve that result later. In any case, if we were to consider such a change, it would likely be substantial and require a new PR.

@nstauff nstauff merged commit c786e9e into watts-dev:development Jul 19, 2023
@paulromano paulromano deleted the plugin-output-dir branch August 20, 2023 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants