Skip to content

Add pre-commit hooks #688

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

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/team-meeting.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ If you'd like to discuss something at the meeting, please add an item to the age

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

### After the meeting

- [ ] Turn any follow-ups into issues/comments/etc.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/create-meeting-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
# 25th day of the month, so we have a bit of lead time before the next meeting
- cron: '0 0 25 * *'
workflow_dispatch:

jobs:
create-team-issue:
runs-on: ubuntu-latest
Expand All @@ -15,4 +15,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
filename: .github/ISSUE_TEMPLATE/team-meeting.md
filename: .github/ISSUE_TEMPLATE/team-meeting.md
2 changes: 1 addition & 1 deletion .github/workflows/trigger-docs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
# every day at 1:00
- cron: '0 1 * * *'
workflow_dispatch:


jobs:
docs:
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ docs/_build
*.ipynb_checkpoints
docs/contributing.md
.vscode/
.tox/

# Programmatically generated docs
docs/gallery.txt
docs/issue-votes.txt
.tox/
docs/team_panels_code.txt
36 changes: 36 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Install pre-commit hooks via
# pre-commit install

exclude: >
(?x)^(
\.vscode/settings\.json|
)$
repos:

- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-toml
- id: check-json
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/psf/black
rev: 22.1.0
hooks:
- id: black

# Disabling mdformat because it doesn't currently work with MyST extensions
# We should uncomment when this is supported.
# ref: https://github.com/executablebooks/mdformat-myst/pull/9
#
# - repo: https://github.com/executablebooks/mdformat
# rev: 0.7.13
# hooks:
# - id: mdformat
# files: docs/*
# additional_dependencies:
# - mdformat-gfm
# - mdformat-myst
# - mdformat-black
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ help:
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

live:
sphinx-autobuild . _build/html/ --ignore */contributing.md --ignore */gallery.txt --ignore */team_panels_code.txt
sphinx-autobuild . _build/html/ --ignore */contributing.md --ignore */gallery.txt --ignore */team_panels_code.txt
2 changes: 1 addition & 1 deletion docs/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ ul.postlist > li > p:first-child {

.landing-grid .sd-card-header {
background-color: #f3772638;
}
}
8 changes: 4 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,10 @@ def build_gallery(app: Sphinx):
)
grid_items = "\n".join(grid_items)

# :column: text-center col-6 col-lg-4
# :card: +my-2
# :img-top-cls: w-75 m-auto p-2
# :body: d-none
# :column: text-center col-6 col-lg-4
# :card: +my-2
# :img-top-cls: w-75 m-auto p-2
# :body: d-none

panels = f"""
``````{{grid}} 1 2 3 3
Expand Down
4 changes: 2 additions & 2 deletions docs/gallery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- name: "eChem: Computational Chemistry from Laptop to HPC"
website: https://kthpanor.github.io/echem/
repository: https://github.com/kthpanor/echem
image: https://raw.githubusercontent.com/kthpanor/echem/master/logo.png
image: https://kthpanor.github.io/echem/_static/logo.png
- name: Data Science for Finance
website: https://ledatascifi.github.io
repository: https://github.com/LeDataSciFi/ledatascifi-2022
Expand Down Expand Up @@ -159,7 +159,7 @@
image: https://raw.githubusercontent.com/rafneta/CienciaDatosPythonCIDE/master/docs/logo.jpg
website: https://rafneta.github.io/CienciaDatosPythonCIDE/intro.html
- name: "Development Data Partnership"
repository:
repository:
image: https://raw.githubusercontent.com/datapartnership/welcome/master/images/logo.png
website: https://docs.datapartnership.org
- name: "OpenPifPaf Guide"
Expand Down
22 changes: 11 additions & 11 deletions docs/meetings/2021.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
### Team updates


- [sphinx-exercise] has been re-factored to make the extension more maintainable.
- [sphinx-exercise] has been re-factored to make the extension more maintainable.
- https://github.com/executablebooks/sphinx-exercise/pull/37
- no major user facing changes (except some style updates to output)
- focus: use sphinx internals and AST as much as possible
- comments: found numref integration pretty hard to get right as numref is implemented (in part) in the translator phase
- reviews: Welcome any and all comments, also would love to chat with anyone with knowledge on Sphinx references (ref and numref)
- reviews: Welcome any and all comments, also would love to chat with anyone with knowledge on Sphinx references (ref and numref)
- preview: https://61a58d957549766565b7eb2a--peaceful-feynman-936ca4.netlify.app/intro.html
- todo: write developer notes and lessons learnt for a general "admonition factory" with support for:
- custom styling
Expand Down Expand Up @@ -121,7 +121,7 @@
- Investigate the major steps we'd need to take to integrate with the Jupyter community
- Sticking points?
- We'll need to demonstrate that we have a good maintainability story
- Might have questions around the different parts of EBP
- Might have questions around the different parts of EBP
- Start to get feedback in the Jupyter ecosystem
- Threads in the discourse + the governance repo
- Talk to stakeholders in that community and see if there are any things we should think about it
Expand All @@ -137,7 +137,7 @@ If you are joining the team video meeting, sign in below so we know who was here
- Rowan Cockett / Curvenote / rowanc1
- Matt McKay / ANU / mmcky
- Chris Holdgraf / 2i2c / choldgraf
- Damián Avila / 2i2c / damianavila
- Damián Avila / 2i2c / damianavila
- Chris Sewell / EPFL / chrisjsewell

### Reports, updates, and celebrations
Expand Down Expand Up @@ -192,7 +192,7 @@ Let's collect all potential agenda items here before the start of the meeting. W
- Can you start with the restriction "we should be able to still run every code cell"
- From a user's perspective, you'd just want them to be able to put in variables with some kind of syntax e.g. `{{ }}`
- You'd need to go through the markdown cells and look for the `{{ }}` syntax and know what kinds of variables that you need.
- You'd then do the execution, and at the end of the time that
- You'd then do the execution, and at the end of the time that


# 05th August 2021
Expand Down Expand Up @@ -225,7 +225,7 @@ This is a place to make announcements (without a need for discussion), short upd
- We should get the critical ones in a list somewhere!
- Forming specs in a collaborative way (Identify Good Tools for this?)

- Matt McKay: Taken over maintaining sphinx-proof and sphinx-exercise (looking into enabling execution through gated directives as a proof of concept)
- Matt McKay: Taken over maintaining sphinx-proof and sphinx-exercise (looking into enabling execution through gated directives as a proof of concept)
- "enabling execution in directives" (https://github.com/executablebooks/sphinx-exercise/issues/24)
- Adding a directive that is a question, and then how do you add code?
- Directive at the top level and then code and exercise.
Expand All @@ -251,7 +251,7 @@ This is a place to make announcements (without a need for discussion), short upd
- Rowan: MyST in JS
- Working on myst in JS. Migrating work over to docutils and cleaning up along the way
- Still basics of various libraries

- 10 or so PRs up at the moment!
- Basics:
- sub/sup/abbr
Expand All @@ -270,22 +270,22 @@ This is a place to make announcements (without a need for discussion), short upd
- Damián
- Learning Myst internals working in the Nikola + Myst story
- Probably writing a series of blog posts to push discussion forward about things I have found and engage the community
- MyST as a “standard” > What roles, directives, blocks do we need copied over Python (independent from Docutils/Sphinx)? Do we need a docultils/sphinx free Py representation of the "standard"?
- MyST as a “standard” > What roles, directives, blocks do we need copied over Python (independent from Docutils/Sphinx)? Do we need a docultils/sphinx free Py representation of the "standard"?

## Agenda items

Let's collect all potential agenda items here before the start of the meeting. We will then attempt to create a coherent agenda that fits in the 60m meeting slot. If there are similar items try and group them together.

- NAME: ITEM (EXPECTED TIME TO DISCUSS)

- Discuss team activity board proposal (https://github.com/executablebooks/meta/issues/441)
- The goal of this board is to coordinate and plan our major work items, to make it clear who is working on what, and to help signal boost items for review/discussion.
- Is this board structure worth trying as-is or are there major changes to make to it?
- If we want to try this process, perhaps we should use this meeting to add some initial items to the board?

**Discussion:**
1. This was discussed with the team and we agreed to use it this month to see how it works.
2. Any suggestions to simplify or improve the Activity Board was encouraged.
2. Any suggestions to simplify or improve the Activity Board was encouraged.
3. We focused on keeping the activity board pretty high level for cross-cutting communication and to help coordinate.
4. We also discussed keeping an eye on the `Request for Review` board to get visibility on PR's that need review and get
more distributed reviews across the team.
Expand All @@ -297,7 +297,7 @@ more distributed reviews across the team.
- Kernel Status & Management - as part of refactor want to make it easier to get status of the kernel and lay ground work for the issues asking for: Kernel Status, Multiple Kernels and Jupyterlite connectivity; 412, 349, 271

**Discussion:**
1. This was discussed in the Reports section.
1. This was discussed in the Reports section.

## July 1st, 2021

Expand Down
4 changes: 2 additions & 2 deletions docs/team.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ The Executable Books team is a collection of scientists, scholars, and technolog
around the world. We welcome participation and contribution from the community.
If you'd like to join the team, please get in touch!

Below are the core `executablebooks` team members.
Below are the core `executablebooks` team members.

## Team

```{include} team_panels_code.txt
```
```
86 changes: 0 additions & 86 deletions docs/team_panels_code.txt

This file was deleted.