-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 277f072
Showing
22 changed files
with
1,202 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Changes here will be overwritten by Copier | ||
_commit: f9bd774 | ||
_src_path: git@github.com:la-famiglia-jst2324/parma-mining-template.git | ||
module_name: reddit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.conda_lock_files/** linguist-generated=true | ||
* text=auto | ||
*.{py,yaml,yml,sh} text eol=lf |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @robinholzi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Motivation | ||
|
||
<!-- Why is this change necessary? Link issues here if applicable. --> | ||
|
||
# Changes | ||
|
||
<!-- What changes have been performed? --> | ||
|
||
# Checklist | ||
|
||
- [ ] added myself as assignee | ||
- [ ] correct reviewers | ||
- [ ] descriptive PR title using [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/). | ||
- [ ] description explains the motivation and details of the changes | ||
- [ ] tests cover my changes | ||
- [ ] documentation is updated | ||
- [ ] CI is green | ||
- [ ] breaking changes are discussed with the team and documented in the PR title `!` (e.g. `feat!: Update endpoint`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
reviewers: | ||
- "robinholzi" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# PULL REQUEST LABELS | ||
autolabeler: | ||
# Conventional Commit Types (https://github.com/commitizen/conventional-commit-types) | ||
- label: build | ||
title: | ||
- '/^build(\(.*\))?(\!)?\:/' | ||
- label: chore | ||
title: | ||
- '/^chore(\(.*\))?(\!)?\:/' | ||
- label: ci | ||
title: | ||
- '/^ci(\(.*\))?(\!)?\:/' | ||
- label: documentation | ||
title: | ||
- '/^docs(\(.*\))?(\!)?\:/' | ||
- label: enhancement | ||
title: | ||
- '/^feat(\(.*\))?(\!)?\:/' | ||
- label: fix | ||
title: | ||
- '/^fix(\(.*\))?(\!)?\:/' | ||
- label: performance | ||
title: | ||
- '/^perf(\(.*\))?(\!)?\:/' | ||
- label: refactor | ||
title: | ||
- '/^refactor(\(.*\))?(\!)?\:/' | ||
- label: revert | ||
title: | ||
- '/^revert(\(.*\))?(\!)?\:/' | ||
- label: style | ||
title: | ||
- '/^style(\(.*\))?(\!)?\:/' | ||
- label: test | ||
title: | ||
- '/^test(\(.*\))?(\!)?\:/' | ||
# Custom Types | ||
- label: breaking | ||
title: | ||
- '/^[a-z]+(\(.*\))?\!\:/' | ||
# >>> AUTOMATIC VERSIONING (PRE 1.0) | ||
version-resolver: | ||
minor: | ||
labels: | ||
- breaking | ||
default: patch | ||
# >>> RELEASE CONFIGURATION | ||
name-template: "v$RESOLVED_VERSION" | ||
tag-template: "v$RESOLVED_VERSION" | ||
category-template: "### $TITLE" | ||
change-template: "- $TITLE by @$AUTHOR in [#$NUMBER]($URL)" | ||
replacers: | ||
# remove conventional commit tag & scope from change list | ||
- search: '/- [a-z]+(\(.*\))?(\!)?\: /g' | ||
replace: "- " | ||
template: | | ||
## What's Changed | ||
$CHANGES | ||
**Full Changelog:** [`$PREVIOUS_TAG...v$RESOLVED_VERSION`](https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION) | ||
categories: | ||
- title: ⚠️ Breaking Changes | ||
labels: | ||
- breaking | ||
- title: ✨ New Features | ||
labels: | ||
- enhancement | ||
- title: 🐞 Bug Fixes | ||
labels: | ||
- fix | ||
- title: 🏎️ Performance Improvements | ||
labels: | ||
- performance | ||
- title: 📚 Documentation | ||
labels: | ||
- documentation | ||
- title: 🏗️ Testing | ||
labels: | ||
- test | ||
- title: ⚙️ Automation | ||
labels: | ||
- ci | ||
- title: 🛠 Builds | ||
labels: | ||
- build | ||
- title: 💎 Code Style | ||
labels: | ||
- style | ||
- title: 📦 Refactorings | ||
labels: | ||
- refactor | ||
- title: ♻️ Chores | ||
labels: | ||
- chore | ||
- title: 🗑 Reverts | ||
labels: | ||
- revert |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Chore | ||
on: | ||
pull_request: | ||
branches: [main] | ||
types: [opened, reopened, edited, synchronize] | ||
push: | ||
branches: [main] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
check-pr-title: | ||
name: PR title validation | ||
if: github.event_name == 'pull_request' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
steps: | ||
- name: validate conventional commit message | ||
id: lint | ||
uses: amannn/action-semantic-pull-request@v5 | ||
with: | ||
subjectPattern: ^[A-Z].+[^. ]$ # subject must start with uppercase letter and may not end with a dot/space | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
- name: post comment about invalid PR title | ||
if: failure() | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
header: conventional-commit-pr-title | ||
message: | | ||
Thanks for contributing to ParmaAI! 👋🏼 | ||
Please use PR titles according to [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted. | ||
<details><summary><b>Details</b></summary> | ||
``` | ||
${{ steps.lint.outputs.error_message }} | ||
``` | ||
</details> | ||
- name: delete comment about invalid PR title | ||
if: success() | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
header: conventional-commit-pr-title | ||
delete: true | ||
|
||
release-drafter: | ||
name: ${{ github.event_name == 'pull_request' && 'Assign Labels' || 'Draft Release' }} | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- name: ${{ github.event_name == 'pull_request' && 'Assign labels' || 'Update release draft' }} | ||
uses: release-drafter/release-drafter@v5 | ||
with: | ||
disable-releaser: ${{ github.event_name == 'pull_request' }} | ||
disable-autolabeler: ${{ github.event_name == 'push' }} | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: CI | ||
permissions: write-all | ||
on: | ||
pull_request: | ||
push: | ||
branches: [main] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
|
||
jobs: | ||
pre-commit-checks: | ||
name: Pre-commit Checks | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
env: | ||
PRE_COMMIT_USE_MICROMAMBA: 1 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: micromamba installation | ||
uses: mamba-org/setup-micromamba@da9b4fa3cd810fa222215d6062647d3e717e7662 | ||
- name: add micromamba to GITHUB_PATH | ||
run: echo "${HOME}/micromamba-bin" >> "$GITHUB_PATH" | ||
- name: Install Python 3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
- name: Run pre-commit checks | ||
uses: pre-commit/action@v3.0.0 | ||
env: | ||
PRE_COMMIT_USE_MICROMAMBA: 1 | ||
|
||
ci: | ||
name: Testing CI | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
# TODO: include services database container once needed | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: conda env setup | ||
uses: mamba-org/setup-micromamba@da9b4fa3cd810fa222215d6062647d3e717e7662 | ||
with: | ||
environment-file: environment.yml | ||
cache-environment: true | ||
- name: Install package | ||
run: python -m pip install --no-build-isolation --no-deps --disable-pip-version-check -e . | ||
- name: Run unit tests | ||
run: python -m pytest --cov-report=xml | ||
- name: Get Cover | ||
uses: orgoro/coverage@v3.1 | ||
if: github.event_name == 'pull_request' | ||
with: | ||
coverageFile: ./coverage.xml | ||
token: ${{ github.token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Deploy | ||
on: | ||
release: | ||
types: [published] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
|
||
jobs: | ||
prod-deployment: | ||
name: Publish release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: dummy | ||
run: echo "TODO" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Major Tag | ||
on: | ||
release: | ||
types: [published] | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
create-major-tag: | ||
name: major tag creation | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get major version | ||
id: version | ||
run: | | ||
MAJOR=$(echo ${{ github.ref_name }} | cut -d'.' -f1 | cut -c2-) | ||
echo "major=$MAJOR" >> $GITHUB_OUTPUT | ||
- name: Delete existing tag | ||
continue-on-error: true | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
await github.rest.git.deleteRef({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
ref: `tags/v${{ steps.version.outputs.major }}`, | ||
}); | ||
- name: Create tag | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const newTag = "v${{ steps.version.outputs.major }}"; | ||
const createdTag = await github.rest.git.createTag({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
tag: newTag, | ||
message: "Moving pointer to ${{ github.ref_name }}", | ||
object: "${{ github.sha }}", | ||
type: "commit", | ||
}); | ||
await github.rest.git.createRef({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
ref: `refs/tags/${newTag}`, | ||
sha: createdTag.data.sha | ||
}); |
Oops, something went wrong.