-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: ♻️ move content into main.py
, use scripts as functions
#29
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
refactor: ♻️ move content into main.py
, use scripts as functions
#29
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally this makes sense to me. So, as you say, the object definition will be the source of truth, and it will basically be exported/backed up as datapackage.json
.
scripts/resource_properties.py
Outdated
import seedcase_sprout as sp | ||
|
||
|
||
def resource_properties_seed_beetles(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be a function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, I guess not. I didn't immediately think that variables can be called from other scripts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this idea. This will simplify some things 👍 I agree with Marton's comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!! ⭐
Description
Something has been bugging me for a while with our potential workflow, especially around the resources. One idea could be that we use
main.py
in the parent folder to coordinate all the tasks, and keep thescripts
to hold the python functions that are used inmain.py
. Then we can simplify towrite_properties()
,read_properties()
and no updating function. And we use thePackageProperties
inmain.py
as the source of truth for the properties.Then we can make templates to create a script of the extracted resource properties as functions.
This PR needs an in-depth review.