Skip to content

Commit

Permalink
ENH: remove GitPod badge if --no-gitpod (#369)
Browse files Browse the repository at this point in the history
* DX: remove gitpod config
* ENH: install git graph by default
  • Loading branch information
redeboer authored Aug 12, 2024
1 parent 21e5a77 commit 8b7c1ab
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 45 deletions.
36 changes: 0 additions & 36 deletions .gitpod.yml

This file was deleted.

1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ repos:
args:
- --allow-labels
- --dependabot=update
- --no-gitpod
- --no-notebooks
- --no-prettierrc
- --no-pypi
Expand Down
1 change: 1 addition & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"executablebookproject.myst-highlight",
"github.vscode-github-actions",
"github.vscode-pull-request-github",
"mhutchie.git-graph",
"ms-python.mypy-type-checker",
"ms-python.python",
"ms-python.vscode-pylance",
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

[![BSD 3-Clause license](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
[![Spelling checked](https://img.shields.io/badge/cspell-checked-brightgreen.svg)](https://github.com/streetsidesoftware/cspell/tree/master/packages/cspell)
[![GitPod](https://img.shields.io/badge/gitpod-open-blue?logo=gitpod)](https://gitpod.io/#https://github.com/ComPWA/policy)
[![pytest](https://github.com/ComPWA/qrules/workflows/pytest/badge.svg)](https://github.com/ComPWA/qrules/actions?query=branch%3Amain+workflow%3Apytest)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/ComPWA/policy/main.svg)](https://results.pre-commit.ci/latest/github/ComPWA/policy/main)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
Expand Down
1 change: 0 additions & 1 deletion src/compwa_policy/.template/.gitpod.yml

This file was deleted.

17 changes: 17 additions & 0 deletions src/compwa_policy/.template/.gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
tasks:
- init: pyenv local 3.9
- init: pip install -e .[dev]

github:
prebuilds:
master: true
branches: false
pullRequests: true
pullRequestsFromForks: true
addComment: false
addBadge: false
addLabel: false

vscode:
extensions:
- charliermarsh.ruff
3 changes: 2 additions & 1 deletion src/compwa_policy/check_dev_files/gitpod.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
PythonVersion,
get_constraints_file,
)
from compwa_policy.utilities.readme import add_badge
from compwa_policy.utilities.readme import add_badge, remove_badge
from compwa_policy.utilities.yaml import write_yaml


Expand All @@ -22,6 +22,7 @@ def main(no_gitpod: bool, python_version: PythonVersion) -> None:
os.remove(CONFIG_PATH.gitpod)
msg = f"Removed {CONFIG_PATH.gitpod} as requested by --no-gitpod"
raise PrecommitError(msg)
remove_badge(r"\[!\[GitPod\]\(https://img.shields.io/badge/gitpod")
return
error_message = ""
expected_config = _generate_gitpod_config(python_version)
Expand Down
13 changes: 7 additions & 6 deletions src/compwa_policy/check_dev_files/vscode.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ def _update_extensions() -> None:
)
do(
vscode.remove_extension_recommendation,
"travisillig.vscode-json-stable-stringify",
# cspell:ignore travisillig
"travisillig.vscode-json-stable-stringify", # cspell:ignore travisillig
unwanted=True,
)
do(
Expand All @@ -32,14 +31,16 @@ def _update_extensions() -> None:
)
do(
vscode.remove_extension_recommendation,
"garaioag.garaio-vscode-unwanted-recommendations",
# cspell:ignore garaio garaioag
"garaioag.garaio-vscode-unwanted-recommendations", # cspell:ignore garaio garaioag
unwanted=True,
)
do(
vscode.add_extension_recommendation,
"Soulcode.vscode-unwanted-extensions",
# cspell:ignore Soulcode
"Soulcode.vscode-unwanted-extensions", # cspell:ignore Soulcode
)
do(
vscode.add_extension_recommendation,
"mhutchie.git-graph", # cspell:ignore mhutchie
)


Expand Down

0 comments on commit 8b7c1ab

Please sign in to comment.