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 markdown linter and formatter to pre-commit #54

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Czaki
Copy link
Contributor

@Czaki Czaki commented Nov 21, 2022

Description

add linter and formatted to ensure the best formatting of docs source files.

Type of change

  • Bug-fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

References

How has this been tested?

  • example: the test suite for my feature covers cases x, y, and z
  • example: all tests pass with my change

Final checklist:

  • My PR is the minimum possible work for the desired functionality
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • If I included new strings, I have used trans. to make them localizable.
    For more information see our translations guide.

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Nov 21, 2022
@Czaki Czaki marked this pull request as draft November 21, 2022 23:31
@Czaki Czaki force-pushed the add_linter_and_formater branch from d5bb4a8 to 833ec22 Compare November 21, 2022 23:32
@Czaki
Copy link
Contributor Author

Czaki commented Nov 21, 2022

@jni This is only adding pre-commit and fixing the formating of a few files. Do you think that it is a good way? Should I continue?

@melissawm
Copy link
Member

Hi @Czaki - is there anything we can do to move this PR forward?

@Czaki
Copy link
Contributor Author

Czaki commented Apr 25, 2023

As you may see, I was waiting on any response if people think that such a contribution is valuable.

If Yes then I should revisit the list of pre-commit hooks as the current list of markdown liter is longer.

@Czaki Czaki force-pushed the add_linter_and_formater branch from 833ec22 to 032206a Compare August 1, 2023 16:46
@github-actions github-actions bot added the task label Aug 1, 2023
@Czaki Czaki marked this pull request as ready for review August 1, 2023 16:47
@Czaki
Copy link
Contributor Author

Czaki commented Aug 1, 2023

@melissawm recreated

@melissawm
Copy link
Member

I will add this to the documentation working group meeting agenda (next meeting is tomorrow, August 2)

@Czaki
Copy link
Contributor Author

Czaki commented Aug 2, 2023

here is style described: https://mdformat.readthedocs.io/en/stable/users/style.html

Comment on lines -1 to +8
---
______________________________________________________________________

theme:
metaDescription: napari is a fast multi-dimensional image viewer for Python. It can help you **explore** any image-like data, be it 2D, 3D, or even higher-dimensional. It can also help you **overlay** downstream or **associated data**, such as point coordinates or segmentations, which you can use to **annotate** and **proofread** your image data.
quickLinks:
- title: Community
content: Meet the team, our mission, and our values
url: /community/index.html
metaDescription: napari is a fast multi-dimensional image viewer for Python. It can help you **explore** any image-like data, be it 2D, 3D, or even higher-dimensional. It can also help you **overlay** downstream or **associated data**, such as point coordinates or segmentations, which you can use to **annotate** and **proofread** your image data.
quickLinks:
\- title: Community
content: Meet the team, our mission, and our values
url: /community/index.html
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

@psobolewskiPhD psobolewskiPhD added this to the 0.5.0 milestone Aug 7, 2023
@psobolewskiPhD
Copy link
Member

@Czaki this came up at the docs meetings Wednesday. This would definitely be a nice thing to get in, but this PR seems like a big lift to get up to speed due to all the conflicts plus fixing the headers that break rendering.

My thought was maybe close this and I try to re-implement it with addition of:
https://github.com/executablebooks/mdformat-myst

What do you think?

@Czaki
Copy link
Contributor Author

Czaki commented Nov 24, 2023

@psobolewskiPhD It is a good idea

@psobolewskiPhD
Copy link
Member

So my playing around with mdformat-myst has just led to other issues because it doesn't support extensions:
executablebooks/mdformat-myst#13
executablebooks/mdformat-myst#5

@psobolewskiPhD
Copy link
Member

psobolewskiPhD commented Feb 28, 2024

Looking a bit more deeply, we could switch from colon fence to backticks:
https://myst-parser.readthedocs.io/en/latest/syntax/roles-and-directives.html#directives-a-block-level-extension-point

But then we lose compatibility with regular markdown...
See: https://myst-parser.readthedocs.io/en/latest/syntax/optional.html#code-fences-using-colons

@jni jni modified the milestones: 0.5.0, 0.5.1 Jul 11, 2024
@jni jni modified the milestones: 0.5.1, 0.5.2 Jul 24, 2024
@jni jni removed this from the 0.5.2 milestone Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation task
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

4 participants