diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml deleted file mode 100644 index 4302786..0000000 --- a/.github/workflows/codespell.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Codespell - -on: - push: - branches: - - src - pull_request: - workflow_dispatch: - -jobs: - - spellcheck: - - name: Codespell - runs-on: ubuntu-latest - - steps: - - - name: Checkout code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Set up Python - uses: actions/setup-python@v3 - with: - python-version: '3.10' - - - name: Install nox - run: python -m pip install --progress-bar off --upgrade nox - - - name: Run tests - run: nox -s codespell --forcecolor diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5b87e01..f568606 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,7 +14,7 @@ jobs: env: DRY_RUN: ${{ github.event_name == 'pull_request' }} - DEPLOY: "" + DEPLOY: '' steps: - name: Checkout code diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..1821b1f --- /dev/null +++ b/.pre-commit-config.yaml @@ -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 diff --git a/CODE_OF_CONDUCT.rst b/CODE_OF_CONDUCT.rst index d34fb59..c55fb86 100644 --- a/CODE_OF_CONDUCT.rst +++ b/CODE_OF_CONDUCT.rst @@ -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 project’s leadership. +by other members of the project's leadership. Attribution ----------- diff --git a/LICENSE.md b/LICENSE.md index 3e9d1f0..90e2d69 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -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. diff --git a/conf.py b/conf.py index cbb5d10..d28ed88 100644 --- a/conf.py +++ b/conf.py @@ -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? @@ -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 it’s 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 won’t be highlighted when active. +# else they won't be highlighted when active. NAVIGATION_LINKS = { DEFAULT_LANG: ( @@ -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 @@ -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 page’s title. +# and displayed underneath the tag list or index page's title. # TAG_DESCRIPTIONS = { # DEFAULT_LANG: { # "blogging": "Meta-blog posts about blogging.", @@ -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 page’s title. +# and displayed underneath the category list or index page's title. # CATEGORY_DESCRIPTIONS = { # DEFAULT_LANG: { # "blogging": "Meta-blog posts about blogging.", @@ -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 page’s title. +# and displayed underneath the author list or index page's title. # AUTHOR_PAGES_DESCRIPTIONS = { # DEFAULT_LANG: { # "Juanjo Conti": "Python coder and writer.", @@ -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: '' @@ -727,7 +663,7 @@ # argument. # # By default, only .php files uses filters to inject PHP into -# Nikola’s 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: # @@ -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 @@ -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. @@ -1397,7 +1333,7 @@ # (defaults to 1.) # DEMOTE_HEADERS = 1 -# If you don’t 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. diff --git a/files/assets/css/custom.css b/files/assets/css/custom.css index a3aa644..853f7e3 100644 --- a/files/assets/css/custom.css +++ b/files/assets/css/custom.css @@ -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%; diff --git a/pages/2021/about.md b/pages/2021/about.md index 3ae1bd6..3d63495 100644 --- a/pages/2021/about.md +++ b/pages/2021/about.md @@ -3,7 +3,7 @@ hidetitle: True # Plasma Hack Week 2021 -
Exit Survey
diff --git a/pages/2021/install.md b/pages/2021/install.md index daaf4cd..e63f87c 100644 --- a/pages/2021/install.md +++ b/pages/2021/install.md @@ -21,80 +21,95 @@ in order to follow along with many of the tutorials. ## Python -### Installation with Anaconda Navigator (recommended) +### Installation with Anaconda Navigator (recommended) The following instructions are designed to help us set up a Python environment with several of the packages to be discussed during the Hack Week. 1. Please follow these instructions for - [installing Anaconda](https://docs.anaconda.com/anaconda/install/). + [installing Anaconda](https://docs.anaconda.com/anaconda/install/). When this is done, you should have Anaconda Navigator installed. -2. Create a folder on your computer for the Hack Week, which we'll call + +1. Create a folder on your computer for the Hack Week, which we'll call `hackweek`. -3. Download this + +1. Download this [`environment.yml`](https://raw.githubusercontent.com/PlasmaPy/hack-week-2021/main/environment.yml) file to the `hackweek` folder. You might need to use the "save page as" option from your web browser menu. -4. [Open Anaconda + +1. [Open Anaconda Navigator](https://docs.anaconda.com/anaconda/user-guide/getting-started/#open-navigator). -5. Under the "Home" tab on Anaconda Navigator, search for and install + +1. Under the "Home" tab on Anaconda Navigator, search for and install "Jupyter Notebook". -6. [Create an Anaconda environment](https://docs.anaconda.com/anaconda/navigator/tutorials/manage-environments/#importing-an-environment) + +1. [Create an Anaconda environment](https://docs.anaconda.com/anaconda/navigator/tutorials/manage-environments/#importing-an-environment) for the Hack Week. - * Select the "Environment" tab. - * Below the list of environments, click "Import". - * Click the file folder icon. - * Navigate to and select the `environment.yml` (possibly in your - `Downloads` folder). - * Click "Import". -7. Under the "Environments" tab on Anaconda Navigator, find the + + - Select the "Environment" tab. + - Below the list of environments, click "Import". + - Click the file folder icon. + - Navigate to and select the `environment.yml` (possibly in your + `Downloads` folder). + - Click "Import". + +1. Under the "Environments" tab on Anaconda Navigator, find the `hackweek` environment. Click on the arrow for that environment, and select the option to "Open with Jupyter Notebook". -8. After Jupyter Notebook opens in your web browser, click on the button + +1. After Jupyter Notebook opens in your web browser, click on the button for "New", and click on "Python 3" to open a Python notebook. -9. Test the installation by typing - import plasmapy +1. Test the installation by typing + + ``` + import plasmapy + ``` - and then press shift-Enter to execute the cell. This should run - without giving any errors. + and then press shift-Enter to execute the cell. This should run + without giving any errors. ### Installation with `conda` from the command line -If you have a working installation of `conda` then you can install the -`hackweek` environment with the following steps. +If you have a working installation of `conda` then you can install the +`hackweek` environment with the following steps. 1. Open a terminal. -2. Create a folder on your computer for the Hack Week, which we'll call + +1. Create a folder on your computer for the Hack Week, which we'll call `hackweek`. Enter that folder. -3. Download the `environment.yml` file by running -
+1. Download the `environment.yml` file by running
+
+   
     wget https://raw.githubusercontent.com/PlasmaPy/hack-week-2021/main/environment.yml
     
-4. Run the following command to create the environment. +1. Run the following command to create the environment. -
+   
     conda env create -f environment.yml
     
-5. Activate this environment by running +1. Activate this environment by running -
+   
     conda activate hackweek
     
-6. Test the environment by running +1. Test the environment by running -
+   
     jupyter notebook
     
- In the Jupyter notebook, run + In the Jupyter notebook, run - import plasmapy + ``` + import plasmapy + ``` ### Binder link @@ -107,21 +122,21 @@ Binder environment to access a Python environment from your web browser. An integrated development environment (IDE) is software used for code development. IDEs typically include a source code editor as well as -built-in tools for refactoring, version control, running tests, and -debugging. +built-in tools for refactoring, version control, running tests, and +debugging. -* [PyCharm](https://www.jetbrains.com/pycharm/download) - * Community version is free and open source - * To be used during git & GitHub and clean coding tutorials -* [Visual Studio Code](https://code.visualstudio.com/) - * Community version is free and open source -* [Atom](https://atom.io/) - * Full version is open source +- [PyCharm](https://www.jetbrains.com/pycharm/download) + - Community version is free and open source + - To be used during git & GitHub and clean coding tutorials +- [Visual Studio Code](https://code.visualstudio.com/) + - Community version is free and open source +- [Atom](https://atom.io/) + - Full version is open source ## Unix shell Python and `git` are often used from the Unix shell, which is one of the -most commonly used command line interfaces. Here are instructions on +most commonly used command line interfaces. Here are instructions on [installing and/or accessing the bash shell](https://carpentries.github.io/workshop-template/#shell), which is one of the most commonly used Unix shells. diff --git a/pages/2021/python.md b/pages/2021/python.md index 0ced04b..d806c72 100644 --- a/pages/2021/python.md +++ b/pages/2021/python.md @@ -21,23 +21,23 @@ tutorial by opening `PythonIntro2021.ipynb`. Day 1 - * Python fundamentals - * Reading in data - * [NumPy](https://numpy.org/) arrays - * Plotting with [matplotlib](https://matplotlib.org/) - +- Python fundamentals +- Reading in data +- [NumPy](https://numpy.org/) arrays +- Plotting with [matplotlib](https://matplotlib.org/) + Day 2 - * Loops - * Lists - * Conditionals - * Functions +- Loops +- Lists +- Conditionals +- Functions ## Setup To follow along with these tutorials, you can either install Python on your own computer, or access a Binder link that will create an environment -automatically. +automatically. ### Getting set up on your own computer @@ -47,36 +47,49 @@ please follow these instructions. 1. Please follow these instructions for [installing Anaconda](https://docs.anaconda.com/anaconda/install/). When this is done, you should have Anaconda Navigator installed. -2. Create a folder called `python-intro` on your computer. -3. Download [python-novice-inflammation-data.zip](https://swcarpentry.github.io/python-novice-inflammation/data/python-novice-inflammation-data.zip), + +1. Create a folder called `python-intro` on your computer. + +1. Download [python-novice-inflammation-data.zip](https://swcarpentry.github.io/python-novice-inflammation/data/python-novice-inflammation-data.zip), and move the file to `python-intro`. -4. Unzip `python-novice-inflammation-data.zip` into the `python-intro` + +1. Unzip `python-novice-inflammation-data.zip` into the `python-intro` folder. -5. [Open Anaconda Navigator](https://docs.anaconda.com/anaconda/user-guide/getting-started/#open-navigator). -5. Under the "Home" tab on Anaconda Navigator, search for and install + +1. [Open Anaconda Navigator](https://docs.anaconda.com/anaconda/user-guide/getting-started/#open-navigator). + +1. Under the "Home" tab on Anaconda Navigator, search for and install "Jupyter Notebook". -6. Under the "Environments" tab on Anaconda Navigator, click on the + +1. Under the "Environments" tab on Anaconda Navigator, click on the arrow for the `base` environment. Select "Open terminal". -7. Type `pip install numpy matplotlib` to install the necessary packages - and press enter. -8. Click on the arrow for the `base` environment again. Select the + +1. Type `pip install numpy matplotlib` to install the necessary packages + and press enter. + +1. Click on the arrow for the `base` environment again. Select the option to "Open with Jupyter Notebook". -9. Navigate to the `python-intro` directory, and enter the `data` + +1. Navigate to the `python-intro` directory, and enter the `data` sub-directory. -10. Under the "New" button (probably near the upper right corner), - select "Python 3" to open a notebook. -11. Test the installation by entering - import numpy - import matplotlib.pyplot - data = numpy.loadtxt(fname='inflammation-01.csv', delimiter=',') - matplotlib.pyplot.plot(data) - matplotlib.pyplot.show() +1. Under the "New" button (probably near the upper right corner), + select "Python 3" to open a notebook. + +1. Test the installation by entering + + ``` + import numpy + import matplotlib.pyplot + data = numpy.loadtxt(fname='inflammation-01.csv', delimiter=',') + matplotlib.pyplot.plot(data) + matplotlib.pyplot.show() + ``` - Press shift-enter to run the cell. If you get a fancy plot, you're - all set! If you run into any errors, please ask on the - [Discord channel for the Hack Week](https://discord.gg/HdsZkp9M35) - in the `#tutorial-python` channel. + Press shift-enter to run the cell. If you get a fancy plot, you're + all set! If you run into any errors, please ask on the + [Discord channel for the Hack Week](https://discord.gg/HdsZkp9M35) + in the `#tutorial-python` channel. diff --git a/pages/2021/registration.md b/pages/2021/registration.md index 348534d..3825dad 100644 --- a/pages/2021/registration.md +++ b/pages/2021/registration.md @@ -5,7 +5,7 @@ hidetitle: True
Registration Form
@@ -18,5 +18,5 @@ unstructured sessions. The registration form has an option to propose a **lightning talk** if you are interested in giving one. A lightning talk is an informal ∼5 minute -talk on any topic of interest to Hack Week participants. For more +talk on any topic of interest to Hack Week participants. For more information on lightning talks, see the [schedule page](../schedule). diff --git a/pages/2021/schedule.md b/pages/2021/schedule.md index f074b51..ab4b938 100644 --- a/pages/2021/schedule.md +++ b/pages/2021/schedule.md @@ -31,24 +31,24 @@ This year's Hack Week will be held from June 28 to July 2. Each day is divided into two 2-hour sessions split between a social hour, see [the schedule](#the-schedule) below for details. - First Session - : This session is geared towards tutorials and lightning talks with - the option for any inspired discussions as we move into the social hour. - - Social Hour - : The social hour is intended for participants to use as they like, but we - highly encourage participants to use this time to interact and discuss - with other participants. During this time the Hack Week organizers - will sit in the main meeting to be available for any discussions, but - we will also have several breakout rooms available. These breakout - rooms are so participants can have more focused discussions amongst - themselves. - - Second Session - : The second session is focused more towards open hacking/coding and - discussions. The session will start off with a specific topic - to get the ball rolling and then will be opened up to any topics - participants are interested in. +First Session +: This session is geared towards tutorials and lightning talks with +the option for any inspired discussions as we move into the social hour. + +Social Hour +: The social hour is intended for participants to use as they like, but we +highly encourage participants to use this time to interact and discuss +with other participants. During this time the Hack Week organizers +will sit in the main meeting to be available for any discussions, but +we will also have several breakout rooms available. These breakout +rooms are so participants can have more focused discussions amongst +themselves. + +Second Session +: The second session is focused more towards open hacking/coding and +discussions. The session will start off with a specific topic +to get the ball rolling and then will be opened up to any topics +participants are interested in. During the social hour or second session we highly encourage participants to schedule additional events. If this is something you are interested @@ -63,7 +63,7 @@ to facilitate a breakout room for you. --> - --> -