From 630017fc86a16c218dcfa25e2c045e606edd1754 Mon Sep 17 00:00:00 2001 From: Mario Picciani Date: Wed, 16 Oct 2024 23:43:04 +0200 Subject: [PATCH] added multiple workflows, dependabot, templates --- .github/ISSUE_TEMPLATE/bug_report.md | 33 +++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 19 ++++++ .github/ISSUE_TEMPLATE/general_question.md | 12 ++++ .github/dependabot.yml | 45 ++++++++++++++ .github/labels.yml | 69 ++++++++++++++++++++++ .github/pull_request_template.md | 22 +++++++ .github/release-drafter.yml | 54 +++++++++++++++++ .github/workflows/build_package.yml | 35 +++++++++++ .github/workflows/labeler.yml | 19 ++++++ .github/workflows/release_drafter.yml | 19 ++++++ 10 files changed, 327 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/general_question.md create mode 100644 .github/dependabot.yml create mode 100644 .github/labels.yml create mode 100644 .github/pull_request_template.md create mode 100644 .github/release-drafter.yml create mode 100644 .github/workflows/build_package.yml create mode 100644 .github/workflows/labeler.yml create mode 100644 .github/workflows/release_drafter.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..6bf86df --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,33 @@ +--- +name: Bug report +about: Create a bug report to help us improve +title: "Bug Summary" +labels: "bug" +assignees: "" +--- + +**Describe the bug** + + + +**To Reproduce** + +Steps to reproduce the behavior: + +1. ... +2. ... +3. ... + +**Expected behavior** + + + +**System [please complete the following information]:** + +- OS: e.g. [Ubuntu 18.04] +- Language Version: [e.g. Python 3.8] +- Virtual environment: [e.g. Conda] + +**Additional context** + + diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..fb6ac52 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: Suggest a new feature +title: "Feature Request Summary" +labels: "enhancement" +assignees: "" +--- + +**Is your feature request related to a problem? Please describe.** + + + +**Describe the solution you would like** + + + +**Additional context** + + diff --git a/.github/ISSUE_TEMPLATE/general_question.md b/.github/ISSUE_TEMPLATE/general_question.md new file mode 100644 index 0000000..c24b8c6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/general_question.md @@ -0,0 +1,12 @@ +--- +name: General question +about: Ask a question about anything related to this project +title: "Question" +labels: "question" +assignees: "" +--- + +**Question** + + diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..bd55da9 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,45 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: weekly + open-pull-requests-limit: 3 + target-branch: development + labels: + - DEPENDABOT + commit-message: + prefix: "[DEPENDABOT]" + + - package-ecosystem: pip + directory: "/.github/workflows" + schedule: + interval: weekly + open-pull-requests-limit: 3 + target-branch: development + labels: + - DEPENDABOT + commit-message: + prefix: "[DEPENDABOT]" + + - package-ecosystem: pip + directory: "/docs" + schedule: + interval: weekly + open-pull-requests-limit: 3 + target-branch: development + labels: + - DEPENDABOT + commit-message: + prefix: "[DEPENDABOT]" + + - package-ecosystem: pip + directory: "/" + schedule: + interval: weekly + open-pull-requests-limit: 3 + target-branch: development + labels: + - DEPENDABOT + commit-message: + prefix: "[DEPENDABOT]" diff --git a/.github/labels.yml b/.github/labels.yml new file mode 100644 index 0000000..c9f8456 --- /dev/null +++ b/.github/labels.yml @@ -0,0 +1,69 @@ +--- +# Labels names are important as they are used by Release Drafter to decide +# regarding where to record them in changelog or if to skip them. +# +# The repository labels will be automatically configured using this file and +# the GitHub Action https://github.com/marketplace/actions/github-labeler. +- name: breaking + description: Breaking Changes + color: bfd4f2 +- name: bug + description: Something isn't working + color: d73a4a +- name: build + description: Build System and Dependencies + color: bfdadc +- name: ci + description: Continuous Integration + color: 4a97d6 +- name: dependencies + description: Pull requests that update a dependency file + color: 0366d6 +- name: documentation + description: Improvements or additions to documentation + color: 0075ca +- name: duplicate + description: This issue or pull request already exists + color: cfd3d7 +- name: enhancement + description: New feature or request + color: a2eeef +- name: github_actions + description: Pull requests that update Github_actions code + color: "000000" +- name: good first issue + description: Good for newcomers + color: 7057ff +- name: help wanted + description: Extra attention is needed + color: 008672 +- name: invalid + description: This doesn't seem right + color: e4e669 +- name: performance + description: Performance + color: "016175" +- name: python + description: Pull requests that update Python code + color: 2b67c6 +- name: question + description: Further information is requested + color: d876e3 +- name: refactoring + description: Refactoring + color: ef67c4 +- name: removal + description: Removals and Deprecations + color: 9ae7ea +- name: style + description: Style + color: c120e5 +- name: testing + description: Testing + color: b1fc6f +- name: wontfix + description: This will not be worked on + color: ffffff +- name: skip-changelog + description: Changes that should be omitted from the release notes + color: ededed diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..0bafff6 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,22 @@ + + +**PR Checklist** + + + +- [ ] This comment contains a description of changes (with reason) +- [ ] Referenced issue is linked +- [ ] If you've fixed a bug or added code that should be tested, add tests! +- [ ] Documentation in `docs` is updated + +**Description of changes** + + + +**Technical details** + + + +**Additional context** + + diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..b9a8a33 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,54 @@ +name-template: "0.8.0 🌈" # <> +tag-template: 0.8.0 # <> +exclude-labels: + - "skip-changelog" + +categories: + - title: "🚀 Features" + labels: + - feature + - enhancement + - title: "🐛 Bug Fixes" + labels: + - fix + - bugfix + - bug + - title: "🧰 Maintenance" + label: chore + - title: ":package: Dependencies" + labels: + - dependencies + - build + - dependabot + - DEPENDABOT +version-resolver: + major: + labels: + - major + minor: + labels: + - minor + patch: + labels: + - patch + default: patch +autolabeler: + - label: chore + files: + - "*.md" + branch: + - '/docs{0,1}\/.+/' + - label: bug + branch: + - /fix\/.+/ + title: + - /fix/i + - label: enhancement + branch: + - /feature\/.+/ + body: + - "/JIRA-[0-9]{1,4}/" +template: | + ## Changes + + $CHANGES diff --git a/.github/workflows/build_package.yml b/.github/workflows/build_package.yml new file mode 100644 index 0000000..b1d319f --- /dev/null +++ b/.github/workflows/build_package.yml @@ -0,0 +1,35 @@ +name: Build DrEvalPy Package + +on: [push, pull_request] + +jobs: + build: + runs-on: ${{ matrix.os }} + if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')" + strategy: + matrix: + os: [macos-latest, ubuntu-latest, windows-latest] + python: ["3.9", "3.10"] + + steps: + - uses: actions/checkout@v4 + name: Check out source-code repository + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + + - name: Install Poetry + run: | + pip install poetry + poetry --version + + - name: Build package + run: poetry build --ansi + + - name: Install required twine packaging dependencies + run: pip install setuptools wheel twine + + - name: Check twine package + run: twine check dist/* diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000..173926f --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,19 @@ +name: Labeler + +on: + push: + branches: + - main + - master + +jobs: + labeler: + runs-on: ubuntu-latest + steps: + - name: Check out the repository + uses: actions/checkout@v4 + + - name: Run Labeler + uses: crazy-max/ghaction-github-labeler@v5.0.0 + with: + skip-delete: true diff --git a/.github/workflows/release_drafter.yml b/.github/workflows/release_drafter.yml new file mode 100644 index 0000000..3c39582 --- /dev/null +++ b/.github/workflows/release_drafter.yml @@ -0,0 +1,19 @@ +name: Release Drafter +on: + push: + branches: + - development + pull_request: + branches: + - development + types: + - opened + - reopened + - synchronize +jobs: + update_release_draft: + runs-on: ubuntu-latest + steps: + - uses: release-drafter/release-drafter@v6 + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"