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

Add support for writing applications in Markdown #4602

Merged
merged 7 commits into from
Apr 5, 2023
Merged

Add support for writing applications in Markdown #4602

merged 7 commits into from
Apr 5, 2023

Conversation

philippjfr
Copy link
Member

  • Add ability to panel serve, pn.serve() and panel convert .md files
  • Add tests
  • Add docs

@MarcSkovMadsen
Copy link
Collaborator

MarcSkovMadsen commented Apr 5, 2023

If you have time please test that a panel app .md file renders nicely on GitHub.

Then you have an easy way of deploying documentation.

Please consider whether the python tag could/ should be supported. Maybe it's better than the Panel tag. The Python tag is recognized and will render nicely on GitHub and in .md based docs or blog posts.

IDEs like Pycharm or VS code might also be able to provide help inside the code section if the Python tag is used?

@philippjfr
Copy link
Member Author

If you have time please test that a panel app .md file renders nicely on GitHub.

Works fine, see https://github.com/holoviz/panel/blob/5593ff79585ea4fc1ef6e29d1611fe677e950c5b/doc/how_to/display/examples/hello_world.md

Please consider whether the python tag could/ should be supported. Maybe it's better than the Panel tag. The Python tag is recognized and will render nicely on GitHub and in .md based docs or blog posts.

IDEs like Pycharm or VS code might also be able to provide help inside the code section if the Python tag is used?

These are good points and originally I had support for python tags but my concern was that it made it impossible to actually render Python code inline as Markdown.

@philippjfr
Copy link
Member Author

Just discovered that you can use the file extension as a language tag, e.g. .py works. So I'm tempted to change it.

@codecov
Copy link

codecov bot commented Apr 5, 2023

Codecov Report

Merging #4602 (fbd53fb) into main (50ba78a) will increase coverage by 0.34%.
The diff coverage is 92.85%.

@@            Coverage Diff             @@
##             main    #4602      +/-   ##
==========================================
+ Coverage   83.38%   83.72%   +0.34%     
==========================================
  Files         258      260       +2     
  Lines       36944    37036      +92     
==========================================
+ Hits        30805    31010     +205     
+ Misses       6139     6026     -113     
Flag Coverage Δ
ui-tests 39.64% <29.89%> (+0.25%) ⬆️
unitexamples-tests 73.83% <92.85%> (+0.23%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
panel/io/jupyter_executor.py 0.00% <0.00%> (ø)
panel/io/markdown.py 90.47% <90.47%> (ø)
panel/io/convert.py 73.30% <100.00%> (ø)
panel/io/server.py 75.31% <100.00%> (+0.54%) ⬆️
panel/template/__init__.py 100.00% <100.00%> (ø)
panel/tests/command/test_serve.py 89.65% <100.00%> (+1.08%) ⬆️
panel/tests/io/test_markdown.py 100.00% <100.00%> (ø)

... and 10 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@philippjfr philippjfr merged commit 872c136 into main Apr 5, 2023
@philippjfr philippjfr deleted the md_serve branch April 5, 2023 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants