Skip to content

Commit

Permalink
chore: add .github directory with workflows and templates; contributi…
Browse files Browse the repository at this point in the history
…ng file updated.
  • Loading branch information
lorenzomassimiani committed Oct 15, 2024
1 parent f31b614 commit 2c15d95
Show file tree
Hide file tree
Showing 13 changed files with 294 additions and 145 deletions.
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
omit =
test/*
*/__init__.py
*/__main__.py
68 changes: 68 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report_template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: "\U0001F41E Bug report"
description: Report a bug on UFOID
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report! Before you get started, please [search to see](https://github.com/immobiliare/ufoid/issues) if an issue already exists for the bug you encountered
- type: textarea
id: bug-description
attributes:
label: Describe the bug
description: Please provide a concise description of what the bug is, in clear English. If you intend to submit a PR for this issue, tell us in the description.
placeholder: Bug description
validations:
required: true
- type: checkboxes
attributes:
label: Have you searched existing issues? 🔎
description: Please search to see if an issue already exists for the issue you encountered.
options:
- label: I have searched and found no existing issues
required: true
- type: textarea
id: reproduction
attributes:
label: Reproduction
description: Please provide a minimal example, with code, that can be run to reproduce the issue. Do NOT provide screenshots of code, or link to external repos or applications. Use ``` to format code blocks.
placeholder: Reproduction
value: |
```console
python -m ufoid
```
validations:
required: true
- type: textarea
id: screenshot
attributes:
label: Screenshot
description: If relevant, please include screenshot(s)
- type: textarea
id: logs
attributes:
label: Logs
description: "Please include the full stacktrace of the errors you get"
render: shell
- type: textarea
id: system-info
attributes:
label: System Info
description: Please ensure you are running the latest version of UFOID.
render: shell
validations:
required: true
- type: dropdown
id: severity
attributes:
label: Severity
description: Select the severity of this issue
options:
- I can work around it
- Blocking usage of UFOID
validations:
required: true
- type: markdown
attributes:
value: |
📌 Please ensure that you have filled all of the required sections above, and that the reproduction you have provided is [minimal, complete, and reproducible](https://stackoverflow.com/help/minimal-reproducible-example). Incomplete issues will be closed.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: ⚡ Feature request
about: Suggest an improvement or new feature for UFOID
title: ''
labels: ''
assignees: ''

---
- [ ] I have searched to see if a similar issue already exists.


**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Additional context**
Add any other context or screenshots about the feature request here.
25 changes: 25 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## Description

Please include a concise summary, in clear English, of the changes in this pull request. If it closes an issue, please mention it here.

Closes: #(issue)

## 🎯 PRs Should Target Issues

Before your create a PR, please check to see if there is [an existing issue](https://github.com/immobiliare/ufoid/issues) for this change. If not, please create an issue before you create this PR, unless the fix is very small.

Not adhering to this guideline will result in the PR being closed.

## Tests

1. PRs will only be merged if tests pass on CI. To run the tests locally, please set up [your environment locally](https://github.com/immobiliare/vegeta/blob/main/CONTRIBUTING.md) and run the tests:`
```console
source venv/bin/activate
pytest --cov
```

2. You may need to run the linters:
```console
source venv/bin/activate
pre-commit run --all-files
```
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI Workflow

on:
push:
branches:
- '*'
pull_request:

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Set up virtual environment
run: python -m venv venv

- name: Install dependencies
run: |
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-test.txt
- name: Run tests
run: |
source venv/bin/activate
pytest --cov
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Create release

on:
workflow_dispatch:

jobs:
changelog:
name: Create changelog
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Conventional Changelog Action
id: changelog
uses: TriPSs/conventional-changelog-action@v5
with:
preset: conventionalcommits
github-token: ${{ secrets.GH_AIDE_TOKEN }}
git-user-name: ${{ github.actor }}
git-user-email: ${{ github.actor }}@users.noreply.github.com
tag-prefix: ''
input-file: 'CHANGELOG.md'
output-file: 'CHANGELOG.md'
release-count: 10000
skip-on-empty: false
skip-version-file: true

- name: Create Release
uses: softprops/action-gh-release@v2
if: ${{ steps.changelog.outputs.skipped == 'false' }}
with:
tag_name: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}
token: ${{ secrets.GH_AIDE_TOKEN }}
1 change: 0 additions & 1 deletion .python-version

This file was deleted.

Loading

0 comments on commit 2c15d95

Please sign in to comment.