question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Metadata is not saved when modifying a barebones script

See original GitHub issue

Hi,

I’m not sure if this is a bug or expected behavior but I find it a bit confusing.

If I create a barebones script (no notebook nor cell metadata):

# script.py with no metadata
1 + 1

Then open it with jupytext, add some metadata (e.g. add a tag) and save it. Metadata gets lots (and console does not show any warnings).

I think it’s because jupytext fails to recognize the format because if I start with a script with some metadata:

# + tags=["some_tag"]
1 + 1

And add more metadata (e.g. add another tag), the file updates correctly.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
edublancascommented, Jul 7, 2020

Hi @mwouts, thanks for the detailed answer.

Not adding metadata to all .py files make sense to avoid cluttering files. I’m thinking a console warning can help clarify why metadata is being removed when saving certain scripts (as the one from my example). Let think through this and I’ll come back with some feedback.

0reactions
mwoutscommented, Jul 13, 2020

Awesome!

Is there any way to make the notebook view the default choice?

Not yet, sorry… If you want to follow that subject, you can subscribe to #271. But it’s not planned for the immediate future, as I don’t see exactly how to implement it 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

BBEdit Expert Preferences - Bare Bones Software
When the preference is NO, the comment/string/etc delimiters are ignored and the structure's contents are interpreted. (This is generally not desirable, but ...
Read more >
Checking out old files WITH original create/modified timestamps
I've tried metastore . It's very fast, but I don't like the need to install and that metadata are not stored in plain...
Read more >
metadata api - Creating/updating NamedCredential from Apex
Let's play around with some scripts in Execute Anonymous and see what we can do with the Apex Wrapper Salesforce Metadata API ....
Read more >
1. Package Document and Metadata - EPUB 3 Best Practices ...
This, of course, is what metadata is for: it’s not the content, it’s information about the content. EPUB 3 accommodates much richer metadata...
Read more >
CIP 26 - Cardano Off-Chain Metadata
Querying Metadata; Modifying metadata; Authentication; Audit; Hardening ... Many pieces of information on the Cardano blockchain are stored as hashes, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found