diff --git a/.gemini/config.yaml b/.gemini/config.yaml new file mode 100644 index 0000000..a9c55b3 --- /dev/null +++ b/.gemini/config.yaml @@ -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 diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..3949421 --- /dev/null +++ b/.github/dependabot.yml @@ -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" diff --git a/.github/rulesets/main.json b/.github/rulesets/main.json new file mode 100644 index 0000000..98d3035 --- /dev/null +++ b/.github/rulesets/main.json @@ -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" + } + ] +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 578f18d..e16bd3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/README.md b/README.md index 299416e..36db868 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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 @@ -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**: @@ -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**: diff --git a/pyproject.toml b/pyproject.toml index 195b6f6..58bbf98 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 = "github@fmind.dev" }] readme = "README.md" diff --git a/tasks/install.just b/tasks/install.just index e1392f1..e8a74df 100644 --- a/tasks/install.just +++ b/tasks/install.just @@ -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"