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

Metadata python version attribute #72

Closed
MaicoTimmerman opened this issue Jan 27, 2018 · 2 comments · Fixed by #92
Closed

Metadata python version attribute #72

MaicoTimmerman opened this issue Jan 27, 2018 · 2 comments · Fixed by #92

Comments

@MaicoTimmerman
Copy link

The metadata["language_info"]["version"] = ... causes merge conflicts when using different python versions. While this has no affect on the workings on the notebook, can we also stripout this attribute?

@MishaVeldhoen
Copy link

I agree that this would be quite useful to have as an option, and it doesn’t seem like removing the version number has any effect. Probably best done through an optional parameter --strip-version.

@kynan
Copy link
Owner

kynan commented Jul 15, 2018

Agree, I have been thinking about this as well. The version dependent keys afaict are the following:

metadata["kernel_spec"]["display_name"]
metadata["kernel_spec"]["name"]
metadata["language_info"]["codemirror_mode"]["version"]
metadata["language_info"]["pygments_lexer"]
metadata["language_info"]["version"]

I'm not super happy hardcoding these values, but assuming the metadata representation is stable it may not be that bad.

For consistency I suggest stripping those by default, unless --keep-version is given.

For the implementation I think it's time to refactor strip_output to take an iterable of (hierarchical) keys to strip so we can do away with the many ifs.

I can't promise when I'll have time to work on this, but contributions are welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants