-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from HumbleData/upgrade-python--and-deps
Various upgrades (Python version, dependencies, Poetry, pre-commit, and more)
- Loading branch information
Showing
67 changed files
with
4,028 additions
and
550 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
# Update all versions in this file by running: | ||
# $ pre-commit autoupdate | ||
minimum_pre_commit_version: 2.19.0 | ||
default_language_version: | ||
python: python3.9 | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.2.0 | ||
hooks: | ||
- id: end-of-file-fixer | ||
name: Check for a blank line at the end of scripts (auto-fixes) | ||
exclude: ^solutions/ | ||
- id: trailing-whitespace | ||
- id: check-builtin-literals | ||
exclude: | | ||
(?x)^( | ||
solutions/01_04.py| | ||
solutions/02_21.py| | ||
solutions/04_05.py| | ||
solutions/05_01.py| | ||
solutions/05_12.py | ||
)$ | ||
- id: check-byte-order-marker | ||
- id: check-case-conflict | ||
- id: check-merge-conflict | ||
- id: check-symlinks | ||
- id: check-toml | ||
- id: check-vcs-permalinks | ||
- id: check-xml | ||
- id: debug-statements | ||
exclude: | | ||
(?x)^( | ||
solutions/01_04.py| | ||
solutions/02_21.py| | ||
solutions/04_05.py| | ||
solutions/05_01.py| | ||
solutions/05_12.py | ||
)$ | ||
- id: detect-private-key | ||
- id: mixed-line-ending | ||
- id: fix-encoding-pragma | ||
args: ["--remove"] | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
name: Check for files larger than 5 MB | ||
args: ["--maxkb=5120"] | ||
- id: check-ast | ||
exclude: | | ||
(?x)^( | ||
solutions/01_04.py| | ||
solutions/02_21.py| | ||
solutions/04_05.py| | ||
solutions/05_01.py| | ||
solutions/05_12.py | ||
)$ | ||
- id: check-docstring-first | ||
- repo: https://github.com/myint/autoflake | ||
rev: v1.4 | ||
hooks: | ||
- id: autoflake | ||
args: &autoflake | ||
- --in-place | ||
- --remove-all-unused-imports | ||
- --expand-star-imports | ||
- --remove-duplicate-keys | ||
- --remove-unused-variables | ||
exclude: | | ||
(?x)^( | ||
solutions/02_01.py | ||
)$ | ||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.9.2 | ||
hooks: | ||
- &flake8 | ||
id: flake8 | ||
additional_dependencies: | ||
- flake8-docstrings==1.6.0 | ||
- flake8-eradicate==1.2.0 | ||
- flake8-fixme==1.1.1 | ||
- flake8-implicit-str-concat==0.2.0 | ||
- flake8-print==4.0.0 | ||
- flake8-return==1.1.3 | ||
args: ["--config=setup.cfg"] | ||
- repo: local | ||
hooks: | ||
- id: linestripper-add | ||
name: linestripper-add | ||
entry: python linestripper.py add | ||
language: system | ||
always_run: true | ||
pass_filenames: false | ||
- repo: https://github.com/psf/black | ||
rev: 22.3.0 | ||
hooks: | ||
- id: black | ||
exclude: | | ||
(?x)^( | ||
solutions/01_04.py| | ||
solutions/01_05.py| | ||
solutions/02_21.py| | ||
solutions/04_05.py| | ||
solutions/05_01.py| | ||
solutions/05_12.py | ||
)$ | ||
- repo: local | ||
hooks: | ||
- id: linestripper-remove | ||
name: linestripper-remove | ||
entry: python linestripper.py remove | ||
language: system | ||
always_run: true | ||
pass_filenames: false | ||
- repo: https://github.com/asottile/add-trailing-comma | ||
rev: v2.2.3 | ||
hooks: | ||
- id: add-trailing-comma | ||
args: [--py36-plus] | ||
- repo: https://github.com/timothycrosley/isort | ||
rev: 5.10.1 | ||
hooks: | ||
- id: isort | ||
types: [python] | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v2.32.1 | ||
hooks: | ||
- id: pyupgrade | ||
args: | ||
- "--py39-plus" | ||
- repo: https://github.com/Cielquan/mirrors-poetry | ||
rev: 1.1.13 | ||
hooks: | ||
- id: poetry-check | ||
- id: poetry-lock | ||
args: ["--no-update"] | ||
- id: poetry-export | ||
args: ["--without-hashes"] | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: v2.6.2 | ||
hooks: | ||
- id: prettier | ||
types_or: [yaml] | ||
additional_dependencies: | ||
- "[email protected]" | ||
- repo: local | ||
hooks: | ||
- id: pylint | ||
name: pylint | ||
entry: pylint solutions | ||
language: system | ||
always_run: true | ||
pass_filenames: false | ||
# stages: [manual] | ||
- id: pip-audit | ||
name: pip-audit | ||
entry: pip-audit | ||
language: system | ||
always_run: true | ||
pass_filenames: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.8.5 | ||
3.9.13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) | ||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). | ||
|
||
<!-- TOWNCRIER --> | ||
|
||
## [1.1.0] - 2022-07-10 | ||
|
||
- Various upgrades ([#40](https://github.com/HumbleData/beginners-data-workshop/pull/40)) | ||
- **Behind-the-scenes** | ||
- Upgrade Python to 3.9.13 | ||
- Upgrade all dependencies to latest with NumPy/pandas/Matplotlib/scikit-learn matching CoCalc versions. | ||
- Switch from `pip-tools` to Poetry (configuration in `pyproject.toml`) | ||
- Update Development Setup guidance in `README.md` | ||
- Integrate & configure flake8, pylint, black & other linters. | ||
- Added pre-commit configuration. | ||
- Updated VS Code `settings.json` | ||
- Added `linestripper.py` to keep EOF newlines out of solutions code (better attendee UX) yet black-compliant. | ||
- Added `CHANGELOG.md` and started versioning releases. | ||
- **Workshop materials** | ||
- Reviewed all workshop materials for deprecations. | ||
- Replaced all single quotes in solutions with double quotes for black compliance. | ||
- Added EOF newlines to datasets. | ||
- Other minor changes: trailing whitespace, trailing commas, isort compliant solution code. | ||
|
||
|
||
## [1.0.0] - 2021-07-23 | ||
Final version used for Humble Data workshops in 2021. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.