-
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
Feature/inplace #36
Feature/inplace #36
Conversation
@sadrasabouri reminder! |
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.
Sorry I did my review for this but that was not submitted for an unknown reason.
CHANGELOG.md
Outdated
@@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. | |||
- `pptx` and `xlsx` support | |||
- `get_microsoft_format` function in `util.py` | |||
- `SECURITY.md` | |||
- `inplace` flag in clear, clear_all, update and update_all |
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 think it's better to use
parameter
for function instead offlag
- It's better to separate them into three lines
@@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. | |||
- `pptx` and `xlsx` support | |||
- `get_microsoft_format` function in `util.py` | |||
- `SECURITY.md` | |||
- `inplace` flag in clear, clear_all, update and update_all | |||
- `inplace` flag in CLI | |||
- `inplace` tests |
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 think we never reported the addition of tests to change log.
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'm always not sure what to add or what not to add, I wish we could have a solid formula for this.
I can remove it but in PyMilo we mention per category test case additions, you can check it out in pymilo
's CHANGELOG.md
README.md
Outdated
@@ -62,30 +62,33 @@ DMeta is an open source Python package that removes metadata of Microsoft Office | |||
|
|||
## Usage | |||
### In Python | |||
#### Clear metadata for a .docx file | |||
⚠️ You can use the `in_place` flag in functions to indicate if the action should affect the original file(s). |
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.
Use `in_place` to apply the changes directly to the original file.
README.md
Outdated
@@ -96,24 +99,26 @@ update_all(CONFIG_FILE_PATH) | |||
|
|||
### CLI | |||
⚠️ You can use `dmeta` or `python -m dmeta` to run this program | |||
⚠️ You can use the `inplace` flag in CLI to indicate if the action should affect the original file(s). |
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.
Use `in_place` to apply the changes directly to the original file.
#### Version | ||
```console | ||
dmeta -v | ||
dmeta --version | ||
``` | ||
### Clear metadata for a .docx file | ||
#### Clear metadata for a .docx file in place |
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.
So there should be default mode usage of it (with in_place = False
) in read me, too.
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'm sorry, I'm not sure if I understood your point, could you please re-explain it?
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.
my bad.
I meant, right now all the examples in README (all the above Python scripts) are using in_place=True
. It's good to have a Python example for in_place=False
(default mode) too.
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.
dmeta/__main__.py
Outdated
'--inplace', | ||
action="store_true", | ||
default=False, | ||
help="the `inplace` command specifies whether the requested action should be taken in place." |
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.
the `in_place` flag applies the changes directly to the original file.
dmeta/functions.py
Outdated
""" | ||
Clear all the editable metadata in the given microsoft file. | ||
|
||
:param microsoft_file_name: name of microsoft file | ||
:type microsoft_file_name: str | ||
:param in_place: a flag specifies whether clearance should be taken in place |
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.
same comment
dmeta/functions.py
Outdated
""" | ||
Clear all the editable metadata in any microsoft file in the current directory. | ||
|
||
|
||
:param in_place: a flag specifies whether clearances should be taken in place |
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.
same comment
dmeta/functions.py
Outdated
""" | ||
Update all the editable metadata in the given microsoft file according to the given config file. | ||
|
||
:param config_file_name: name of .json config file | ||
:type config_file_name: str | ||
:param microsoft_file_name: name of microsoft file | ||
:type microsoft_file_name: str | ||
:param in_place: a flag specifies whether update should be taken in place |
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.
same comment
dmeta/functions.py
Outdated
""" | ||
Update all the editable metadata in any microsoft file in the current directory according to the given config file. | ||
|
||
:param config_file_name: name of .json config file | ||
:type config_file_name: str | ||
:param in_place: a flag specifies whether update should be taken in place |
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.
same comment
Dear Sadra, Thank you so much for your review. |
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 the addition of the in_place=True
Python examples in README.md
.
Please read my comment above, and if you have any comment to address it better, let me know. |
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.
lgtm
Reference Issues/PRs
#21
What does this implement/fix? Explain your changes.
Any other comments?