Skip to content

V4.1.0 #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .gemini/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# https://developers.google.com/gemini-code-assist/docs/customize-gemini-behavior-github
have_fun: false
code_review:
disable: false
comment_severity_threshold: MEDIUM
max_review_comments: -1
pull_request_opened:
help: false
summary: true
code_review: true
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/dependabot-options-reference
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
58 changes: 58 additions & 0 deletions .github/rulesets/main.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"name": "main",
"target": "branch",
"enforcement": "active",
"conditions": {
"ref_name": {
"exclude": [],
"include": [
"~DEFAULT_BRANCH"
]
}
},
"rules": [
{
"type": "deletion"
},
{
"type": "required_linear_history"
},
{
"type": "pull_request",
"parameters": {
"required_approving_review_count": 0,
"dismiss_stale_reviews_on_push": true,
"require_code_owner_review": false,
"require_last_push_approval": false,
"required_review_thread_resolution": false,
"allowed_merge_methods": [
"squash",
"rebase"
]
}
},
{
"type": "required_status_checks",
"parameters": {
"strict_required_status_checks_policy": true,
"do_not_enforce_on_create": false,
"required_status_checks": [
{
"context": "checks",
"integration_id": 15368
}
]
}
},
{
"type": "non_fast_forward"
}
],
"bypass_actors": [
{
"actor_id": 5,
"actor_type": "RepositoryRole",
"bypass_mode": "always"
}
]
}
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## v4.1.0 (2025-03-05)

### Feat

- **gemini**: add support for gemini code assist (#51)
- **dependabot**: add dependabot configuration file (#50)
- **github**: add default rulesets and installation (#47)

### Fix

- **workflows**: fix just in workflows

### Refactor

- **cruft**: update to new template version

## v4.0.0 (2025-03-04)

### Feat
Expand Down
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ You can use this package as part of your MLOps toolkit or platform (e.g., Model
- [Workflows](#workflows)
- [Tools](#tools)
- [Automation](#automation-1)
- [AI Assistant: Gemini Code Assist](#ai-assistant-gemini-code-assist)
- [Commits: Commitizen](#commits-commitizen)
- [Dependabot: Dependabot](#dependabot-dependabot)
- [Git Hooks: Pre-Commit](#git-hooks-pre-commit)
- [Tasks: Just](#tasks-just)
- [CI/CD](#cicd)
Expand Down Expand Up @@ -287,6 +289,7 @@ format-source # format code source
install # run install tasks
install-hooks # install git hooks
install-project # install the project
install-rulesets # install github rulesets

[mlflow]
mlflow # run mlflow tasks
Expand Down Expand Up @@ -321,6 +324,15 @@ This sections motivates the use of developer tools to improve your coding experi

Pre-defined actions to automate your project development.

### AI Assistant: [Gemini Code Assist](https://developers.google.com/gemini-code-assist/docs/review-github-code)

- **Motivations**:
- Increase your coding productivity
- Get code suggestions and completions
- Reduce the time spent on reviewing code
- **Limitations**:
- Can generate wrong code, reviews, or summaries

### Commits: [Commitizen](https://commitizen-tools.github.io/commitizen/)

- **Motivations**:
Expand All @@ -332,6 +344,17 @@ Pre-defined actions to automate your project development.
- **Alternatives**:
- Do It Yourself (DIY)

### Dependabot: [Dependabot](https://docs.github.com/en/code-security/getting-started/dependabot-quickstart-guide)

- **Motivations**:
- Avoid security issues
- Avoid breaking changes
- Update your dependencies
- **Limitations**:
- Can break your code
- **Alternatives**:
- Do It Yourself (DIY)

### Git Hooks: [Pre-Commit](https://pre-commit.com/)

- **Motivations**:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[project]
name = "bikes"
version = "4.0.0"
version = "4.1.0"
description = "Predict the number of bikes available."
authors = [{ name = "Médéric HURIER", email = "[email protected]" }]
readme = "README.md"
Expand Down
10 changes: 10 additions & 0 deletions tasks/install.just
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,13 @@ install-hooks:
[group('install')]
install-project:
uv sync --all-groups

# install github rulesets
[group('install')]
install-rulesets:
#!/usr/bin/env bash
set -euo pipefail
repo=$(gh repo view --json=name --jq=.name)
owner=$(gh repo view --json=owner --jq=.owner.login)
gh api --method POST -H "Accept: application/vnd.github+json" \
"/repos/$owner/$repo/rulesets" --input=".github/rulesets/main.json"
Comment on lines +23 to +24
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Consider adding error handling to the gh api command to ensure that deployment failures are detected and reported. This can be done by checking the exit code of the command and logging an error message if it is non-zero.

    gh api --method POST -H "Accept: application/vnd.github+json" \
    "/repos/$owner/$repo/rulesets" --input=".github/rulesets/main.json" || echo "Failed to install rulesets" >&2 && exit 1