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 the Quarto format (.qmd files) to Jupytext #846

Merged
merged 10 commits into from
Sep 8, 2021
Merged

Add the Quarto format (.qmd files) to Jupytext #846

merged 10 commits into from
Sep 8, 2021

Conversation

mwouts
Copy link
Owner

@mwouts mwouts commented Sep 4, 2021

Closes #837

def quarto_version():
"""Quarto's version number"""
try:
return quarto("--version").strip()
Copy link
Contributor

Choose a reason for hiding this comment

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

As long as there is negligible overhead for quarto invocations I don't think that this check is worth the execution time. Quarto is early enough in its dev cycle that we can reasonably expect that nearly all users will have a recent version (and we can reference the minimum required version in the jupytext docs).

If this isn't persuasive to you then I'd suggest two other approaches to avoid the overhead:

  1. Only detect the quarto_version after an error has occurred (and in that case print the informative message that they need a newer version; or
  2. Detect the quarto version from the filesystem. Once you know the directory containing quarto you can find the version file at ../share/version (if there is no version file then it's the development version which you can assume meets the minimum criteria).

Copy link
Contributor

Choose a reason for hiding this comment

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

I have one idea about how to make quarto --version faster so that no filesystem check is required --- will report back on whether this worked out soon.

@codecov
Copy link

codecov bot commented Sep 7, 2021

Codecov Report

Merging #846 (272b707) into master (e97819f) will decrease coverage by 1.43%.
The diff coverage is 98.21%.

❗ Current head 272b707 differs from pull request most recent head 08a7d11. Consider uploading reports for the commit 08a7d11 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #846      +/-   ##
==========================================
- Coverage   99.11%   97.67%   -1.44%     
==========================================
  Files         106      108       +2     
  Lines       10345    10437      +92     
==========================================
- Hits        10253    10194      -59     
- Misses         92      243     +151     
Impacted Files Coverage Δ
jupytext/formats.py 98.13% <ø> (-0.32%) ⬇️
jupytext/quarto.py 96.66% <96.66%> (ø)
jupytext/compare.py 98.75% <100.00%> (+0.02%) ⬆️
jupytext/jupytext.py 97.96% <100.00%> (-0.42%) ⬇️
tests/test_contentsmanager.py 99.01% <100.00%> (-0.99%) ⬇️
tests/test_mirror.py 99.31% <100.00%> (-0.69%) ⬇️
tests/test_read_simple_quarto.py 100.00% <100.00%> (ø)
tests/utils.py 100.00% <100.00%> (ø)
tests/test_pre_commit_5_reformat_markdown.py 30.30% <0.00%> (-69.70%) ⬇️
jupytext/pandoc.py 52.54% <0.00%> (-44.07%) ⬇️
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b553f32...08a7d11. Read the comment docs.

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.

Consider support for Quarto qmd format?
2 participants