-
Notifications
You must be signed in to change notification settings - Fork 2
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 configuration file handling and move stat method and version there #47
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportBase: 86.78% // Head: 87.70% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #47 +/- ##
==========================================
+ Coverage 86.78% 87.70% +0.92%
==========================================
Files 6 6
Lines 401 423 +22
==========================================
+ Hits 348 371 +23
+ Misses 53 52 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
config_file = base_path / Path("config-s3-storage.yml") | ||
elif storage_type == "Posix": | ||
config_file = base_path / Path("config-Posix-storage.yml") |
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.
For "production" it would be better to pull in config from a location outside of the Python installation.
@@ -0,0 +1,6 @@ | |||
version: 1 | |||
methods: | |||
min: np.min |
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.
Perhaps the defaults should live in Python, with YAML providing overrides only?
I had a thought about this - as a library (rather than an application), should PyActiveStorage consume a configuration file? Or would it make more sense to pass this information in via Python parameters? For the S3 case, we might consider again a We might need some basic configuration for the test cases, which act as an application. |
Closes #34
Description
storage_type
passed toActive
classmethod
is picked up from themethods
key in the config and converted to an actual Python method