From a9354b58c9d0a8f6ac8ffd4194f670cb351aef31 Mon Sep 17 00:00:00 2001 From: Matteo Voges <98756476+MatteoVoges@users.noreply.github.com> Date: Wed, 12 Apr 2023 19:57:14 +0200 Subject: [PATCH 1/5] chore(gh-actions): Add housekeeping action to close stale issues body --- .github/workflows/housekeeping.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/housekeeping.yml diff --git a/.github/workflows/housekeeping.yml b/.github/workflows/housekeeping.yml new file mode 100644 index 000000000..ae3b9eb73 --- /dev/null +++ b/.github/workflows/housekeeping.yml @@ -0,0 +1,17 @@ +name: 'Housekeeping' +on: + schedule: + - cron: '0 0 * * *' + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v8 + with: + stale-issue-message: 'This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.' + close-issue-message: 'This issue was closed because it has been stalled for 7 days with no activity. Please reopen the issue, if this happened accidently.' + days-before-issue-stale: 90 + day-before-pr-stale: -1 + days-before-close: 7 + days-before-pr-close: -1 \ No newline at end of file From cfe1ad77c47d6a0ca0b51f6dcbf268f1344cb476 Mon Sep 17 00:00:00 2001 From: Matteo Voges <98756476+MatteoVoges@users.noreply.github.com> Date: Thu, 20 Apr 2023 14:57:36 +0200 Subject: [PATCH 2/5] feat(gh): Update github issue template to form --- .github/ISSUE_TEMPLATE/issue_template.md | 34 ------- .github/ISSUE_TEMPLATE/issue_template.yml | 115 ++++++++++++++++++++++ .github/pull_request_template.md | 10 ++ .pre-commit-config.yaml | 2 +- PULL_REQUEST_TEMPLATE.md | 7 -- 5 files changed, 126 insertions(+), 42 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/issue_template.md create mode 100644 .github/ISSUE_TEMPLATE/issue_template.yml create mode 100644 .github/pull_request_template.md delete mode 100644 PULL_REQUEST_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE/issue_template.md b/.github/ISSUE_TEMPLATE/issue_template.md deleted file mode 100644 index 63ef11243..000000000 --- a/.github/ISSUE_TEMPLATE/issue_template.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -name: issue_template -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - ---- - -**Describe the bug/feature** -A clear and concise description of what the bug/feature request is. - -**To Reproduce** -Steps to reproduce the behavior: - -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem/idea. - -**If it's a bug (please complete the following information):** - -- `python --version`: -- `pip3 --version`: -- `Are you using pyenv or virtualenv?` - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/issue_template.yml b/.github/ISSUE_TEMPLATE/issue_template.yml new file mode 100644 index 000000000..b546fc117 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/issue_template.yml @@ -0,0 +1,115 @@ +name: Bug Report +description: File a bug report +title: "[bug]: " +labels: ["bug"] +body: + # information + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + *Note:* Please search to see if an issue already exists for the bug you encountered. + # bug description + - type: textarea + id: bug-description + attributes: + label: Description of the bug + description: A clear and concise description of what the bug is. + placeholder: Tell us what you see! + validations: + required: true + # steps to reproduce + - type: textarea + id: steps-to-reproduce + attributes: + label: Steps to reproduce + description: Steps to reproduce the behavior. + placeholder: Tell us what steps you did to encounter the bug! Also provide parts of your inventory, if it's neccessary. + render: bash + value: | + 1. + 2. + 3. + 4. + validations: + required: true + # expected behavior + - type: textarea + id: what-happened + attributes: + label: What happened? + description: A clear and concise description of what you expected to happen. + placeholder: Tell us what you'd expect to happen. + validations: + required: true + # additional context + - type: textarea + id: additional-context + attributes: + label: Additional context + description: | + Add any other context about the problem here. + If applicable, you can add screenshots to help explain your problem. + placeholder: Tell us what you see! + value: "A bug happened!" + # section environment + - type: markdown + attributes: + value: | + ## Environment + # kapitan version + - type: dropdown + id: version + attributes: + label: Version (kapitan) + description: | + Which version of kapitan are you running? + If you are using an older version of kapitan, please try it against the master branch or the latest stable version. + options: + - v0.31.0 (stable) + - master + multiple: true + validations: + required: true + # python version + - type: dropdown + id: python-version + attributes: + label: Version (kapitan) + description: | + Which version of python are you using? Kapitan officially supports only version 3.8 and 3.9. + If you are using an older version of python, please check if the bug still exists with a newer (supported) version. + options: + - '3.8' + - '3.9' + - 3.10 (future) + - I use kapitan directly (pip, docker) + multiple: true + validations: + required: true + # python virtual environment + - type: checkboxes + id: python-venv + attributes: + label: Python virtual environment + description: Are you using pyenv or virtualenv? + options: + - label: pyenv + - label: venv + - label: no environment + # os information + - type: input + id: os-information + attributes: + label: OS information + description: Which operation system do you use? + placeholder: Type in your operation system... + # logs + - type: textarea + id: logs + attributes: + label: Relevant log output + description: | + Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. + Use the `--verbose` flag to see all the logs. + render: bash diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 000000000..0f335093b --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,10 @@ +Fixes # + +## Proposed Changes + +* + +## Docs and Tests + +* [ ] Tests added +* [ ] Updated documentation \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c55984d98..6088c4b8a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ repos: rev: 22.10.0 hooks: - id: black - language_version: python3.8 + language_version: python3 - repo: https://github.com/igorshubovych/markdownlint-cli rev: v0.32.2 hooks: diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 87746315c..000000000 --- a/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ -Fixes issue # - -## Proposed Changes - -- -- -- From 9f8edc7ee366829d613697b3f8136ce18442858e Mon Sep 17 00:00:00 2001 From: Matteo Voges <98756476+MatteoVoges@users.noreply.github.com> Date: Thu, 20 Apr 2023 15:08:39 +0200 Subject: [PATCH 3/5] feat(gh): provide a issue form for feature requests --- .../{issue_template.yml => bug_report.yml} | 7 ++--- .github/ISSUE_TEMPLATE/feature_request.yml | 29 +++++++++++++++++++ 2 files changed, 32 insertions(+), 4 deletions(-) rename .github/ISSUE_TEMPLATE/{issue_template.yml => bug_report.yml} (94%) create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml diff --git a/.github/ISSUE_TEMPLATE/issue_template.yml b/.github/ISSUE_TEMPLATE/bug_report.yml similarity index 94% rename from .github/ISSUE_TEMPLATE/issue_template.yml rename to .github/ISSUE_TEMPLATE/bug_report.yml index b546fc117..b962e12d6 100644 --- a/.github/ISSUE_TEMPLATE/issue_template.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -23,8 +23,8 @@ body: id: steps-to-reproduce attributes: label: Steps to reproduce - description: Steps to reproduce the behavior. - placeholder: Tell us what steps you did to encounter the bug! Also provide parts of your inventory, if it's neccessary. + description: Steps to reproduce the behavior. Also provide parts of your inventory, if it's neccessary. + placeholder: Tell us what steps you did to encounter the bug! render: bash value: | 1. @@ -50,8 +50,7 @@ body: description: | Add any other context about the problem here. If applicable, you can add screenshots to help explain your problem. - placeholder: Tell us what you see! - value: "A bug happened!" + placeholder: Anything that might help us understanding your problem... # section environment - type: markdown attributes: diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 000000000..d0c1a95cb --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,29 @@ +name: Feature Request +description: Request a new functionality +title: "[feat]: " +labels: ["feature"] +body: + # information + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this feature request! + # feature description + - type: textarea + id: feature-description + attributes: + label: Description of the feature + description: | + A clear and concise description of what the feature request is. + Please make proposals, how you would use this feature (syntax). + placeholder: Tell us what you want to see in the project! + validations: + required: true + # additional context + - type: textarea + id: additional-context + attributes: + label: Additional context + description: | + Add any other context about the feature here. + placeholder: Anything that might help us understanding your feature request... From f6b9019ea27388271e67f50e13eb6ef024120611 Mon Sep 17 00:00:00 2001 From: Matteo Voges <98756476+MatteoVoges@users.noreply.github.com> Date: Thu, 20 Apr 2023 15:27:30 +0200 Subject: [PATCH 4/5] docs: update setup for contributors --- docs/pages/contribute/code.md | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/docs/pages/contribute/code.md b/docs/pages/contribute/code.md index f3eb78a56..b50a27236 100644 --- a/docs/pages/contribute/code.md +++ b/docs/pages/contribute/code.md @@ -17,21 +17,27 @@ targeting master branch. All submissions, including submissions by project membe ### Setup -We highly recommend that you create a dedicated Python environment for Kapitan. -There are multiple solutions: +We build kapitan using `poetry`. -* [pyenv](https://github.com/pyenv/pyenv) -* [virtualenv](https://virtualenv.pypa.io/en/latest/) -* [venv](https://docs.python.org/3/library/venv.html) +1. Install poetry -Once you've done it, please install all Kapitan's dependencies: + ```bash + pip install poetry + ``` -```shell -python3 -m venv env -source env/bin/activate -pip3 install black # required for `make test_formatting` -pip3 install -r requirements.txt -``` +2. Install dependencies + + ```bash + poetry install --with test + ``` + + Poetry creates a virtual environment with the required dependencies installed. + +3. Run kapitan with the own compiled code + + ```bash + poetry run kapitan + ``` Because we are using a pinned version of reclass which is added as a submodule into Kapitan's repository, you need to pull it separately by executing the command below: From 70596649b3ab25b50dc338b74febaf99b5bd4c3e Mon Sep 17 00:00:00 2001 From: Matteo Voges <98756476+MatteoVoges@users.noreply.github.com> Date: Wed, 3 May 2023 14:10:31 +0200 Subject: [PATCH 5/5] docs: update documentation to serve docs locally --- docs/pages/contribute/documentation.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/pages/contribute/documentation.md b/docs/pages/contribute/documentation.md index 86cdae42f..70d69c5fd 100644 --- a/docs/pages/contribute/documentation.md +++ b/docs/pages/contribute/documentation.md @@ -25,7 +25,9 @@ Updating our gh-pages is therefore a two-step process. Submit a PR for our master branch that updates the `.md` file(s). Test how the changes would look like when deployed to gh-pages by serving it on localhost: -`make local_serve_documentation` +1. Edit the `strict` property in `mkdocs.yml` and set it to `false`. +2. `make local_serve_documentation` +3. Now the documentation site should be available at [`localhost:8000`](http://127.0.0.1:8000). ### Submit a PR