Code Monkey home page Code Monkey logo

Comments (5)

mwouts avatar mwouts commented on May 22, 2024 1

Sure! Yet,

  • Jupytext has a very different practice of cells markers (few explicit markers, start+end) than Hydrogen (all cells are marked, start only). This is also discussed here. Hydrogen syntax is simpler to parse. Jupytext's cells are more difficult to parse, but arbitrary python files can be converted to notebooks, and converted back to the original python files without loss or additional markers.
  • The definition of markdown cells in Hydrogen is pending (nteract/hydrogen#1296, nteract/hydrogen#1183)

For now I would be in favor of

  • preserving the current 'plain python' format for Jupytext's python scripts, and simplify # + {} to # + for explicit code cells with no metadata
  • implementing a 'hydrogen script' format (R, Julia, Python) in Jupytext when specifications for markdown cells (and cell metadata) are chosen. The Hydrogen format must remain easy to parse (simply split on cell markers), as an additional JavaScript parser will have to be implemented in Atom.

from jupytext.

grst avatar grst commented on May 22, 2024

maybe stick to hydrogen
-> one standard less and hydrogen is pretty established.

Would hydrogen blow up when adding metadata like this?

# %%name-of-cell {metadata}

from jupytext.

kylebarron avatar kylebarron commented on May 22, 2024

That would be fine. Once Hydrogen sees ${comment symbol} %% it treats that line as the start of a block.

Source:
https://github.com/nteract/hydrogen/blob/58ba87e1747366c46f9baca87dcdda27401f6a5a/lib/code-manager.js#L138

from jupytext.

mwouts avatar mwouts commented on May 22, 2024

I've found more python scripts with cells defined with #%%! VS code has a plugin that uses that convention. It's also used by Spyder. No sign of markdown cells yet, though.

from jupytext.

mwouts avatar mwouts commented on May 22, 2024

I'll work on an Hydrogen/VS code/Spyder compatible format at #59 (see there for possible specifications of the format). With this issue I'll just simplify # + {} into the lighter # + when possible.

from jupytext.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.