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
Data Save and Load Structure #63
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #63 +/- ##
===========================================
+ Coverage 99.36% 100.00% +0.65%
===========================================
Files 4 4
Lines 155 199 +44
Branches 18 23 +5
===========================================
+ Hits 154 199 +45
+ Misses 1 0 -1
Continue to review full report at Codecov.
|
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.
@sadrasabouri Thanks for your efforts 💯
- Take a look at my comments
- Add an example of
save_data
method toREADME.md
samila/genimage.py
Outdated
|
||
def save_data(self, file_adr='data.json'): | ||
""" | ||
Save datas into a file. |
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.
data
samila/params.py
Outdated
DATA_TYPE_ERROR = "Provided data file is not supported. It should be either file or io.IOBase." | ||
DATA_PARSING_ERROR = "Provided data format is wrong. It should be in JSON format including data1 and data2 fields." | ||
NO_FUNCTION_ERROR = "At least one of the given functions are None." | ||
JUST_DATA_WARNING = "Just data is provided you can't use generate 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.
Just data is provided, generate method is not available in this mode.
And what should we do for codecov failure? |
README.md
Outdated
So you can load it into a `GenerativeImage` instance later by | ||
|
||
```pycon | ||
>>> g = GenerativeImage(data=open('test.json', 'w')) |
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.
Write
mode? Are you sure?
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.
You're rigth.
My bad.
@sepandhaghighi Can you review it agian? |
Reference Issues/PRs
#33
What does this implement/fix? Explain your changes.
load_data
functionsave_data_file
functionsave_data
method