Skip to content

Commit

Permalink
Add .pre-commit-config.yaml (#76)
Browse files Browse the repository at this point in the history
* Add .pre-commit-config.yaml

* Remove codespell action since it's in pre-commit

* Remove pre-commit-search-and-replace

* Apply pre-commit changes to markdown

* Update conf.py

* Apply pre-commit updates

* Update quotes

* Fix trailing whitespace

* end-of-file-fixer

* Exclude some files

* Apply mdformat

* Remove unnecessary default language version

* Exclude code of conduct from codespell
  • Loading branch information
namurphy authored Mar 27, 2024
1 parent 455d488 commit 0e2cedc
Show file tree
Hide file tree
Showing 24 changed files with 305 additions and 314 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/codespell.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

env:
DRY_RUN: ${{ github.event_name == 'pull_request' }}
DEPLOY: ""
DEPLOY: ''

steps:
- name: Checkout code
Expand Down
60 changes: 60 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
ci:
autofix_prs: false
autoupdate_schedule: monthly

repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-merge-conflict
name: check for git merge conflicts
exclude: .*\.rst
- id: check-case-conflict
name: check for filename case conflicts
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-json
- id: check-toml
- id: check-yaml

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.0
hooks:
- id: check-github-workflows

- repo: https://github.com/sirosen/texthooks
rev: 0.6.6
hooks:
- id: fix-smartquotes
- id: fix-spaces
- id: fix-ligatures
- id: forbid-bidi-controls

- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.12.0
hooks:
- id: pretty-format-ini
args: [--autofix]
- id: pretty-format-yaml
args: [--autofix]
# For the labeler GitHub Action, labels with spaces in them must
# be put in quotes. However, the pretty-format-yaml hook will
# remove the quotes which will break that action, so we should not
# run this hook on `labeler.yml` (or certain other files).
exclude: .github/labeler.yml|.pre-commit-search-and-replace.yaml

- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
name: codespell (add false positives to pyproject.toml)
args: [--write-changes]
additional_dependencies:
- tomli
exclude: shortcodes|plugins|CODE_OF_CONDUCT.rst

- repo: https://github.com/executablebooks/mdformat
rev: 0.7.17
hooks:
- id: mdformat
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in
good faith may face temporary or permanent repercussions as determined
by other members of the projects leadership.
by other members of the project's leadership.

Attribution
-----------
Expand Down
6 changes: 3 additions & 3 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

* Neither the name of PlasmaPy nor the names of its contributors may
- Neither the name of PlasmaPy nor the names of its contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.

Expand Down
90 changes: 13 additions & 77 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,70 +40,6 @@
CODE_OF_CONDUCT = "https://www.contributor-covenant.org/version/2/0/code_of_conduct/"
LICENSE = "https://creativecommons.org/licenses/by/4.0/"

# Nikola is multilingual!
#
# Currently supported languages are:
#
# en English
# af Afrikaans
# ar Arabic
# az Azerbaijani
# bg Bulgarian
# bs Bosnian
# ca Catalan
# cs Czech [ALTERNATIVELY cz]
# da Danish
# de German
# el Greek [NOT gr]
# eo Esperanto
# es Spanish
# et Estonian
# eu Basque
# fa Persian
# fi Finnish
# fr French
# fur Friulian
# gl Galician
# he Hebrew
# hi Hindi
# hr Croatian
# hu Hungarian
# ia Interlingua
# id Indonesian
# it Italian
# ja Japanese [NOT jp]
# ko Korean
# lt Lithuanian
# ml Malayalam
# nb Norwegian (Bokmål)
# nl Dutch
# pa Punjabi
# pl Polish
# pt Portuguese
# pt_br Portuguese (Brazil)
# ru Russian
# sk Slovak
# sl Slovene
# sq Albanian
# sr Serbian (Cyrillic)
# sr_latin Serbian (Latin)
# sv Swedish
# te Telugu
# th Thai
# tr Turkish [NOT tr_TR]
# uk Ukrainian
# ur Urdu
# vi Vietnamese
# zh_cn Chinese (Simplified)
# zh_tw Chinese (Traditional)
#
# If you want to use Nikola with a non-supported language you have to provide
# a module containing the necessary translations
# (cf. the modules at nikola/data/themes/base/messages/).
# If a specific post is not translated to a language, then the version
# in the default language will be shown instead.

# What is the default language?
DEFAULT_LANG = "en"

# What other languages do you have?
Expand Down Expand Up @@ -146,9 +82,9 @@
# may present issues if the menu is too large.
# (in Bootstrap, the navbar can grow too large and cover contents.)
# WARNING: If you link to directories, make sure to follow
# ``STRIP_INDEXES``. If its set to ``True``, end your links
# ``STRIP_INDEXES``. If it's set to ``True``, end your links
# with a ``/``, otherwise end them with ``/index.html`` — or
# else they wont be highlighted when active.
# else they won't be highlighted when active.

NAVIGATION_LINKS = {
DEFAULT_LANG: (
Expand Down Expand Up @@ -308,7 +244,7 @@
#
# 0 = using DATE_FORMAT and TIMEZONE
# 1 = using JS_DATE_FORMAT and local user time (via moment.js)
# 2 = using a string like 2 days ago
# 2 = using a string like "2 days ago"
#
# Your theme must support it, Bootstrap already does.
# DATE_FANCINESS = 0
Expand Down Expand Up @@ -421,7 +357,7 @@

# Set descriptions for tag pages to make them more interesting. The
# default is no description. The value is used in the meta description
# and displayed underneath the tag list or index pages title.
# and displayed underneath the tag list or index page's title.
# TAG_DESCRIPTIONS = {
# DEFAULT_LANG: {
# "blogging": "Meta-blog posts about blogging.",
Expand Down Expand Up @@ -494,7 +430,7 @@

# Set descriptions for category pages to make them more interesting. The
# default is no description. The value is used in the meta description
# and displayed underneath the category list or index pages title.
# and displayed underneath the category list or index page's title.
# CATEGORY_DESCRIPTIONS = {
# DEFAULT_LANG: {
# "blogging": "Meta-blog posts about blogging.",
Expand Down Expand Up @@ -573,7 +509,7 @@

# Set descriptions for author pages to make them more interesting. The
# default is no description. The value is used in the meta description
# and displayed underneath the author list or index pages title.
# and displayed underneath the author list or index page's title.
# AUTHOR_PAGES_DESCRIPTIONS = {
# DEFAULT_LANG: {
# "Juanjo Conti": "Python coder and writer.",
Expand All @@ -592,7 +528,7 @@
# (translatable)
INDEX_PATH = "news/"

# Optional HTML that displayed on main blog index.html files.
# Optional HTML that displayed on "main" blog index.html files.
# May be used for a greeting. (translatable)
FRONT_INDEX_HEADER = {
DEFAULT_LANG: ''
Expand Down Expand Up @@ -727,7 +663,7 @@
# argument.
#
# By default, only .php files uses filters to inject PHP into
# Nikolas templates. All other filters must be enabled through FILTERS.
# Nikola's templates. All other filters must be enabled through FILTERS.
#
# Many filters are shipped with Nikola. A list is available in the manual:
# <https://getnikola.com/handbook.html#post-processing-filters>
Expand Down Expand Up @@ -851,8 +787,8 @@
#
# .. image:: /images/tesla.jpg
#
# See the Nikola Handbook for details (in the Embedding Images and
# Thumbnails sections)
# See the Nikola Handbook for details (in the "Embedding Images" and
# "Thumbnails" sections)

# Images will be scaled down according to IMAGE_THUMBNAIL_SIZE and MAX_IMAGE_SIZE
# options, but will have to be referenced manually to be visible on the site
Expand Down Expand Up @@ -944,10 +880,10 @@
# HTML fragments with the Read more... links.
# The following tags exist and are replaced for you:
# {link} A link to the full post page.
# {read_more} The string Read more in the current language.
# {read_more} The string "Read more" in the current language.
# {reading_time} An estimate of how long it will take to read the post.
# {remaining_reading_time} An estimate of how long it will take to read the post, sans the teaser.
# {min_remaining_read} The string {remaining_reading_time} min remaining to read in the current language.
# {min_remaining_read} The string "{remaining_reading_time} min remaining to read" in the current language.
# {paragraph_count} The amount of paragraphs in the post.
# {remaining_paragraph_count} The amount of paragraphs in the post, sans the teaser.
# {post_title} The title of the post.
Expand Down Expand Up @@ -1397,7 +1333,7 @@
# (defaults to 1.)
# DEMOTE_HEADERS = 1

# If you dont like slugified file names ([a-z0-9] and a literal dash),
# If you don't like slugified file names ([a-z0-9] and a literal dash),
# and would prefer to use all the characters your file system allows.
# USE WITH CARE! This is also not guaranteed to be perfect, and may
# sometimes crash Nikola, your web server, or eat your cat.
Expand Down
2 changes: 1 addition & 1 deletion files/assets/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ table tr th :last-child, table tr td :last-child {
border-color: #017BFF
}

/* Center (vertical & horizontal) div withing feature-card */
/* Center (vertical & horizontal) div within feature-card */
.feature-card div {
position: absolute;
width: 100%;
Expand Down
12 changes: 6 additions & 6 deletions pages/2021/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ hidetitle: True

# Plasma Hack Week 2021

<div class="plasmapy-note"
<div class="plasmapy-note"
style="max-width: 300px;
margin-top: 24px;
border-style: solid;
Expand All @@ -26,8 +26,8 @@ hidetitle: True
</p>
</div>

Welcome to the inaugural **Plasma Hack Week**!! Our first event will be held
remotely from June 28 - July 2, 2021. The event is **free** and sets out to
Welcome to the inaugural **Plasma Hack Week**!! Our first event will be held
remotely from June 28 - July 2, 2021. The event is **free** and sets out to
increase awareness of open-source software for the Plasma Community:
the benefits it can have on the community, what is currently available, and
how to foster community development of open-source software. As such, topics will
Expand All @@ -37,14 +37,14 @@ structured learning activities, such as guided tutorials, and unstructured proje
time for collaborative learning.

In the week leading up to the **Plasma Hack Week**, a few more fundamentally
focused tutorials will be presented on topics like the basics of Python, using
focused tutorials will be presented on topics like the basics of Python, using
version control, contributing to open-source projects, etc.

For information on registering please visit our
For information on registering please visit our
[registration page](../registration).

For information on the schedule and pre-week tutorials please visit our
[scheduling page](../schedule).

For any additional questions please reach out to us on our
For any additional questions please reach out to us on our
[Discord channel](https://discord.gg/HdsZkp9M35).
2 changes: 1 addition & 1 deletion pages/2021/exit_survey.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ better for next year!

<div style="width: 100%; margin: 24px">
<a href=https://docs.google.com/forms/d/e/1FAIpQLSeKNwXWmi0A-RtaYD6RIN1Q2sjFIPKX4Plzy72IPBI0ex2wyg/viewform?usp=sf_link
class="feature-card feature-link btn-plasmapy-bluegreen"
class="feature-card feature-link btn-plasmapy-bluegreen"
style="width: 200px">
<div>Exit Survey</div>
</a>
Expand Down
Loading

0 comments on commit 0e2cedc

Please sign in to comment.