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 pre-commit hooks #688

Closed
wants to merge 10 commits into from
Closed

Add pre-commit hooks #688

wants to merge 10 commits into from

Conversation

choldgraf
Copy link
Member

This just adds a few pre-commit hooks and runs them. The biggest change is probably mdformat - seems reasonable just to standardize our markdown structure, but I don't have a strong opinion if others don't want to use that.

- [ ] Update dates and make sure HackMD information is correct.
- [ ] Team members add agenda items.

- \[ \] Update dates and make sure HackMD information is correct.
Copy link
Member

Choose a reason for hiding this comment

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

broken the todo lists

# Feature voting board

You can help us to prioritise development of new features by leaving a [👍 reaction](https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) on the first comment of any `enhancement` issue.

Below is a list of all current enhancement issues from our core repositories,[^a] ordered by 👍
Below is a list of all current enhancement issues from our core repositories,\[^a\] ordered by 👍
Copy link
Member

Choose a reason for hiding this comment

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

broken the footnotes

Copy link
Member Author

@choldgraf choldgraf Mar 4, 2022

Choose a reason for hiding this comment

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

argh - hmm what should we do about these? add exceptions in the mdformat config or something? If this is gonna cause headaches like this then I'd vote we just don't use mdformat 🤷

Copy link
Member

Choose a reason for hiding this comment

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

plugins 👇

@@ -1,10 +1,6 @@
---
Copy link
Member

Choose a reason for hiding this comment

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

broken the front matter

- repo: https://github.com/executablebooks/mdformat
rev: 0.7.13
hooks:
- id: mdformat
Copy link
Member

Choose a reason for hiding this comment

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

yeh so you need to use this with plugins 😉 e.g.

Copy link
Member Author

Choose a reason for hiding this comment

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

ahh ok, I will try to give that a shot

Copy link
Member Author

Choose a reason for hiding this comment

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

ahhhh, ok I will take a look and figure it out

Copy link
Member

Choose a reason for hiding this comment

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

Meaning to circle back to mdformat-myst at some point and do some more testing/improvements.
Would be nice to advertise it on jupyter-book (but only when I'm certain it is properly working)

docs/index.md Outdated
@@ -7,54 +7,54 @@ computational narratives using the Jupyter ecosystem.

We are the community behind [Jupyter Book](https://jupyterbook.org)--an open source project for building beautiful, publication-quality books and documents from computational material--as well as [MyST Markdown](https://myst-parser.readthedocs.io/en/latest/)--a rich and extensible flavor of Markdown meant for technical documentation and publishing.

::::{grid} 1 2 2 2
::::\{grid} 1 2 2 2
Copy link
Member Author

Choose a reason for hiding this comment

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

I updated the PR to add those plugins to our hook.

Hmm - looks like it is not picking up the colon fence syntax, is there a way to tell the pre-commit hook to re-use the same plugins that are enabled in conf.py?

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 Author

Choose a reason for hiding this comment

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

ah bummer - ok I'll just comment out the lines about mdformat and we can re-enable if/when there is support for extra myst extensions.

@choldgraf
Copy link
Member Author

OK latest commit comments out the mdformat hook, so we're just doing some basic code and file standardization stuff here

@choldgraf
Copy link
Member Author

closing this one as there are some conflicts and I don't have time to get it over the finish line

@choldgraf choldgraf closed this Aug 21, 2022
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.

None yet

2 participants