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 #119

Merged
merged 4 commits into from
Apr 1, 2021
Merged
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
20 changes: 8 additions & 12 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,15 @@ on:
tags:
workflow_dispatch:

defaults:
run:
# Declare bash be used by default in this workflow's "run" steps.
#
# NOTE: bash will by default run with:
# --noprofile: Ignore ~/.profile etc.
# --norc: Ignore ~/.bashrc etc.
# -e: Exit directly on errors
# -o pipefail: Don't mask errors from a command piped into another command
shell: bash

jobs:
chart_tests:
pre-commit:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/[email protected]

chart-tests:
runs-on: ubuntu-20.04

strategy:
Expand Down
53 changes: 53 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# pre-commit is a tool to perform a predefined set of tasks manually and/or
# automatically before git commits are made.
#
# Config reference: https://pre-commit.com/#pre-commit-configyaml---top-level
#
# Common tasks
#
# - Run on all files: pre-commit run --all-files
# - Register git hooks: pre-commit install --install-hooks
#
repos:
# Autoformat: Python code
- repo: https://github.com/ambv/black
rev: 20.8b1
hooks:
- id: black
args: [--target-version=py36]

# Autoformat: markdown, yaml
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.2.1
hooks:
- id: prettier

# Autoformat: https://github.com/asottile/reorder_python_imports
- repo: https://github.com/asottile/reorder_python_imports
rev: v2.4.0
hooks:
- id: reorder-python-imports

# Misc...
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
# ref: https://github.com/pre-commit/pre-commit-hooks#hooks-available
hooks:
# Autoformat: Makes sure files end in a newline and only a newline.
- id: end-of-file-fixer

# Autoformat: Sorts entries in requirements.txt.
- id: requirements-txt-fixer

# Lint: Check for files with names that would conflict on a
# case-insensitive filesystem like MacOS HFS+ or Windows FAT.
- id: check-case-conflict

# Lint: Checks that non-binary executables have a proper shebang.
- id: check-executables-have-shebangs

# Lint: Python code
- repo: https://gitlab.com/pycqa/flake8
rev: "3.8.4"
hooks:
- id: flake8
40 changes: 18 additions & 22 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,34 @@

#### Bugs fixed

* fix: preserve quote formatting for image tags also [#115](https://github.com/jupyterhub/chartpress/pull/115) ([@consideRatio](https://github.com/consideRatio))
- fix: preserve quote formatting for image tags also [#115](https://github.com/jupyterhub/chartpress/pull/115) ([@consideRatio](https://github.com/consideRatio))

#### Maintenance and upkeep improvements

* refactor: rename two local variables for readability [#114](https://github.com/jupyterhub/chartpress/pull/114) ([@consideRatio](https://github.com/consideRatio))
- refactor: rename two local variables for readability [#114](https://github.com/jupyterhub/chartpress/pull/114) ([@consideRatio](https://github.com/consideRatio))

### [1.0.3] - 2020-12-14

#### Enhancements made

* allow standard `--no-build` prefix for disabling builds [#110](https://github.com/jupyterhub/chartpress/pull/110) ([@minrk](https://github.com/minrk))
- allow standard `--no-build` prefix for disabling builds [#110](https://github.com/jupyterhub/chartpress/pull/110) ([@minrk](https://github.com/minrk))

#### Bugs fixed

* Fix --list-images to not update Chart.yaml's version [#112](https://github.com/jupyterhub/chartpress/pull/112) ([@consideRatio](https://github.com/consideRatio))
- Fix --list-images to not update Chart.yaml's version [#112](https://github.com/jupyterhub/chartpress/pull/112) ([@consideRatio](https://github.com/consideRatio))

#### Contributors to this release

([GitHub contributors page for this release](https://github.com/jupyterhub/chartpress/graphs/contributors?from=2020-12-04&to=2020-12-14&type=c))

[@consideRatio](https://github.com/search?q=repo%3Ajupyterhub%2Fchartpress+involves%3AconsideRatio+updated%3A2020-12-04..2020-12-14&type=Issues) | [@minrk](https://github.com/search?q=repo%3Ajupyterhub%2Fchartpress+involves%3Aminrk+updated%3A2020-12-04..2020-12-14&type=Issues)


### [1.0.2] - 2020-12-04

#### Bugs fixed

* only apply strict version checking for charts to be published [#109](https://github.com/jupyterhub/chartpress/pull/109) ([@minrk](https://github.com/minrk))
* fix: compute tag per image [#108](https://github.com/jupyterhub/chartpress/pull/108) ([@danielnorberg](https://github.com/danielnorberg))
- only apply strict version checking for charts to be published [#109](https://github.com/jupyterhub/chartpress/pull/109) ([@minrk](https://github.com/minrk))
- fix: compute tag per image [#108](https://github.com/jupyterhub/chartpress/pull/108) ([@danielnorberg](https://github.com/danielnorberg))

#### Contributors to this release

Expand All @@ -48,15 +47,14 @@

#### Bugs fixed

* bugfix: multiple images built was evaluating to a single tag [#107](https://github.com/jupyterhub/chartpress/pull/107) ([@consideRatio](https://github.com/consideRatio))
- bugfix: multiple images built was evaluating to a single tag [#107](https://github.com/jupyterhub/chartpress/pull/107) ([@consideRatio](https://github.com/consideRatio))

#### Contributors to this release

([GitHub contributors page for this release](https://github.com/jupyterhub/chartpress/graphs/contributors?from=2020-11-21&to=2020-12-03&type=c))

[@consideRatio](https://github.com/search?q=repo%3Ajupyterhub%2Fchartpress+involves%3AconsideRatio+updated%3A2020-11-21..2020-12-03&type=Issues)


### [1.0.0] - 2020-11-21

[@betatim](https://github.com/search?q=repo%3Ajupyterhub%2Fchartpress+involves%3Abetatim+updated%3A2018-02-23..2020-11-21&type=Issues) | [@consideRatio](https://github.com/search?q=repo%3Ajupyterhub%2Fchartpress+involves%3AconsideRatio+updated%3A2018-02-23..2020-11-21&type=Issues) | [@jacobtomlinson](https://github.com/search?q=repo%3Ajupyterhub%2Fchartpress+involves%3Ajacobtomlinson+updated%3A2018-02-23..2020-11-21&type=Issues) | [@jirikuncar](https://github.com/search?q=repo%3Ajupyterhub%2Fchartpress+involves%3Ajirikuncar+updated%3A2018-02-23..2020-11-21&type=Issues) | [@leafty](https://github.com/search?q=repo%3Ajupyterhub%2Fchartpress+involves%3Aleafty+updated%3A2018-02-23..2020-11-21&type=Issues) | [@manics](https://github.com/search?q=repo%3Ajupyterhub%2Fchartpress+involves%3Amanics+updated%3A2018-02-23..2020-11-21&type=Issues) | [@minrk](https://github.com/search?q=repo%3Ajupyterhub%2Fchartpress+involves%3Aminrk+updated%3A2018-02-23..2020-11-21&type=Issues) | [@rokroskar](https://github.com/search?q=repo%3Ajupyterhub%2Fchartpress+involves%3Arokroskar+updated%3A2018-02-23..2020-11-21&type=Issues) | [@yuvipanda](https://github.com/search?q=repo%3Ajupyterhub%2Fchartpress+involves%3Ayuvipanda+updated%3A2018-02-23..2020-11-21&type=Issues)
Expand All @@ -66,38 +64,36 @@ reliable, thank you everyone for your contributions and work on it!!!

#### Enhancements made

* Strip v prefixes for Chart.yaml versions for Helm3 compliancy [#106](https://github.com/jupyterhub/chartpress/pull/106) ([@consideRatio](https://github.com/consideRatio))
* Add --force-publish-chart and default to not overwriting [#102](https://github.com/jupyterhub/chartpress/pull/102) ([@consideRatio](https://github.com/consideRatio))
- Strip v prefixes for Chart.yaml versions for Helm3 compliancy [#106](https://github.com/jupyterhub/chartpress/pull/106) ([@consideRatio](https://github.com/consideRatio))
- Add --force-publish-chart and default to not overwriting [#102](https://github.com/jupyterhub/chartpress/pull/102) ([@consideRatio](https://github.com/consideRatio))

#### Maintenance and upkeep improvements

* Major refactor for readability pre 1.0.0 release [#105](https://github.com/jupyterhub/chartpress/pull/105) ([@consideRatio](https://github.com/consideRatio))
* Migrate from Travis CI to GitHub Actions [#101](https://github.com/jupyterhub/chartpress/pull/101) ([@consideRatio](https://github.com/consideRatio))
* CI: fix syntax typo making us not run tests before publish [#100](https://github.com/jupyterhub/chartpress/pull/100) ([@consideRatio](https://github.com/consideRatio))

- Major refactor for readability pre 1.0.0 release [#105](https://github.com/jupyterhub/chartpress/pull/105) ([@consideRatio](https://github.com/consideRatio))
- Migrate from Travis CI to GitHub Actions [#101](https://github.com/jupyterhub/chartpress/pull/101) ([@consideRatio](https://github.com/consideRatio))
- CI: fix syntax typo making us not run tests before publish [#100](https://github.com/jupyterhub/chartpress/pull/100) ([@consideRatio](https://github.com/consideRatio))

## [0.7]

### [0.7.0] - 2020-11-02

#### Enhancements made

* Image config option added: rebuildOnContextPathChanges [#98](https://github.com/jupyterhub/chartpress/pull/98) ([@consideRatio](https://github.com/consideRatio))
* add chartpress --list-images [#96](https://github.com/jupyterhub/chartpress/pull/96) ([@minrk](https://github.com/minrk))
* support overriding imageName [#90](https://github.com/jupyterhub/chartpress/pull/90) ([@minrk](https://github.com/minrk))
- Image config option added: rebuildOnContextPathChanges [#98](https://github.com/jupyterhub/chartpress/pull/98) ([@consideRatio](https://github.com/consideRatio))
- add chartpress --list-images [#96](https://github.com/jupyterhub/chartpress/pull/96) ([@minrk](https://github.com/minrk))
- support overriding imageName [#90](https://github.com/jupyterhub/chartpress/pull/90) ([@minrk](https://github.com/minrk))

#### Maintenance and upkeep improvements

* CI: publish tags without tests and test python 3.6-3.8 [#95](https://github.com/jupyterhub/chartpress/pull/95) ([@consideRatio](https://github.com/consideRatio))
* CI: Test chartpress usage with both helm2 and helm3 [#92](https://github.com/jupyterhub/chartpress/pull/92) ([@consideRatio](https://github.com/consideRatio))
- CI: publish tags without tests and test python 3.6-3.8 [#95](https://github.com/jupyterhub/chartpress/pull/95) ([@consideRatio](https://github.com/consideRatio))
- CI: Test chartpress usage with both helm2 and helm3 [#92](https://github.com/jupyterhub/chartpress/pull/92) ([@consideRatio](https://github.com/consideRatio))

#### Contributors to this release

([GitHub contributors page for this release](https://github.com/jupyterhub/chartpress/graphs/contributors?from=2020-01-12&to=2020-11-01&type=c))

[@consideRatio](https://github.com/search?q=repo%3Ajupyterhub%2Fchartpress+involves%3AconsideRatio+updated%3A2020-01-12..2020-11-01&type=Issues) | [@manics](https://github.com/search?q=repo%3Ajupyterhub%2Fchartpress+involves%3Amanics+updated%3A2020-01-12..2020-11-01&type=Issues) | [@minrk](https://github.com/search?q=repo%3Ajupyterhub%2Fchartpress+involves%3Aminrk+updated%3A2020-01-12..2020-11-01&type=Issues)


## [0.6]

### [0.6.0] - 2020-01-12
Expand Down Expand Up @@ -181,7 +177,7 @@ commits.
- first: item
image: "not set"
- second: item
image: "image:tag" # <--sets this here
image: "image:tag" # <--sets this here
```

### [0.4.2] - 2019-10-19 (broken)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
[![Discourse](https://img.shields.io/badge/help_forum-discourse-blue?logo=discourse)](https://discourse.jupyter.org/c/jupyterhub)
[![Gitter](https://img.shields.io/badge/social_chat-gitter-blue?logo=gitter)](https://gitter.im/jupyterhub/jupyterhub)


Chartpress automate basic Helm chart development work. It is tightly used in development of the [JupyterHub](https://github.com/jupyterhub/zero-to-jupyterhub-k8s) and [BinderHub](https://github.com/jupyterhub/binderhub) Helm charts.

## Features
Expand Down Expand Up @@ -64,6 +63,7 @@ order that could come from using chartpress.
## Requirements

The following binaries must be in your `PATH`:

- [git](https://www.git-scm.com/downloads)
- [docker](https://docs.docker.com/install/#supported-platforms)
- [helm](https://helm.sh/docs/using_helm/#installing-helm)
Expand Down
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ make a release on PyPI. The PyPI release is packaged and published automatically
by a GitHub workflow when a git tag is pushed.

For you to follow along according to these instructions, you need:

- To have push rights to the [chartpress GitHub
repository](https://github.com/jupyterhub/chartpress).

Expand Down
Loading