Skip to content
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

REL,API: 0.2.0 Start branch 0.2.0. Only process .ipynb files unless option -f is used #2

Merged
merged 2 commits into from
Jan 24, 2016

Conversation

mforbes
Copy link
Contributor

@mforbes mforbes commented Jan 19, 2016

This is the version I uploaded to PyPI: nbstripout==0.2.0. I will only modify the 0.2.x revisions and am happy to assign you as an owner or maintainer if you would like so you can upload changes. I needed a few additions to get things working with my mercurial workflow:

  • Processes multiple files.
  • Ignores all files but .ipynb files by default.
  • Added -f flag to force stripping other files.
  • This is the start of the 0.2.x branch which is maintained for now
    in a separate fork.

This does change the default behaviour (which would process any file, but could throw errors if the file was not a notebook) so I have gone with a new minor revision number.

- Processes multiple files.
- Ignores all files but .ipynb files by default.
- Added -f flag to force stripping other files.
- This is the start of the 0.2.x branch which is maintained for now
  in a separate fork.
@mforbes mforbes changed the title REL,API: 0.2.0 Start branch 0.2.0. Only process .ipynb files without -f REL,API: 0.2.0 Start branch 0.2.0. Only process .ipynb files unless option -f is used Jan 19, 2016
@kynan
Copy link
Owner

kynan commented Jan 21, 2016

@mforbes Sorry for the slow response. I would have put this on PyPI earlier but wanted to get @minrk's OK (since he's the original author). He's happy with that, so thanks for taking a lead on this.


for filename in filenames:
if not force and not filename.endswith('.ipynb'):
continue
Copy link
Owner

Choose a reason for hiding this comment

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

Suppose we could warn/educate the user here, but otoh they could just rtfm.

@kynan
Copy link
Owner

kynan commented Jan 21, 2016

@mforbes Have you tested this with the usage as git filter as well?

I'm happy to merge this. Are you planning to continue maintaining it? I'm not too fussed about who is listed as maintainer on PyPI but feel free to add me.

@mforbes
Copy link
Contributor Author

mforbes commented Jan 22, 2016

Is your PyPI username kynan? I will add you as a maintainer. I am not planning anything serious in terms of long-term maintenance, but am certainly willing to help keep it working, especially if I can get things massaged into a comfortable workflow.

I have not tried things with git yet as I do not really use it. My main drive right now was to get a mercurial workflow working. Once I am happy with that, I will probably try to add something here that can be installed like your git filters (though it is more difficult since hg does not have a programatic configuration). My understanding of the git filters is that they will only apply to .ipynb files, so I think this should be fine, but if you have some repos it would be good to give it a test. Maybe we should add some tests based on cram?

@kynan
Copy link
Owner

kynan commented Jan 23, 2016

Agreed, tests would be great. I can't access my PyPI credentials right now, but will let you know what my username is.

@mforbes mforbes mentioned this pull request Jan 23, 2016
@kynan
Copy link
Owner

kynan commented Jan 24, 2016

Just waiting to hear from @minrk about name and will do some testing with Git here locally. Otherwise I think this is good to go!

@kynan
Copy link
Owner

kynan commented Jan 24, 2016

@mforbes my PyPI user name is indeed kynan. Would be great if you could add me!

@mforbes
Copy link
Contributor Author

mforbes commented Jan 24, 2016

@kynan You should be an owner now on PyPI.

@kynan
Copy link
Owner

kynan commented Jan 24, 2016

@mforbes I am, thanks!

@kynan kynan self-assigned this Jan 24, 2016
@kynan
Copy link
Owner

kynan commented Jan 24, 2016

I've done some testing, seems to work fine. Merging!

kynan added a commit that referenced this pull request Jan 24, 2016
Start branch 0.2.0. Only process .ipynb files unless option -f is used
@kynan kynan merged commit 8c098e0 into kynan:master Jan 24, 2016
@kynan kynan modified the milestone: 0.2.0 Feb 15, 2016
ooiM added a commit to ooiM/nbstripout that referenced this pull request Jun 2, 2020
Start branch 0.2.0. Only process .ipynb files unless option -f is used
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants