Skip to content

Commit b390545

Browse files
authored
Merge pull request #40 from data-science-extensions/updates
Enhanced Repository Configs and Automations and Update Dependencies in `actions` and `pip` Configs
2 parents e3e7003 + 3bf71d3 commit b390545

7 files changed

Lines changed: 138 additions & 12 deletions

File tree

.github/dependabot.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,26 @@ updates:
99

1010
# Update GitHub Actions workflow versions
1111
- package-ecosystem: "github-actions"
12+
target-branch: "main"
1213
directory: "/"
1314
schedule:
1415
interval: "weekly"
1516
labels:
1617
- "dependabot-actions"
17-
reviewers:
18+
assignees:
1819
- "chrimaho"
20+
commit-message:
21+
prefix: "deps(actions): "
22+
23+
# Update Python dependencies
24+
- package-ecosystem: "pip"
25+
target-branch: "main"
26+
directory: "/"
27+
schedule:
28+
interval: "weekly"
29+
labels:
30+
- "dependabot-python"
31+
assignees:
32+
- "chrimaho"
33+
commit-message:
34+
prefix: "deps(pip): "

.github/workflows/cd.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ permissions:
2424

2525
env:
2626
VERSION: ${{ github.event.release.tag_name }}
27-
PACKAGE_NAME: docstring-format-checker
27+
PACKAGE_NAME: ${{ github.event.repository.name }}
2828
UV_LINK_MODE: copy
2929
UV_NO_SYNC: true
3030
UV_INDEX_STRATEGY: unsafe-best-match
3131
GITHUB_ACTOR: ${{ github.actor }}
3232
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
3333
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3434
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
35-
REPOSITORY_NAME: data-science-extensions/docstring-format-checker
35+
REPOSITORY_NAME: ${{ github.repository }}
3636
GIT_BRANCH: ${{ github.event.release.target_commitish }}
3737
PYTHON_VERSION: '3.14'
3838
PYTHONIOENCODING: utf-8

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: CI
22
on: [push, pull_request]
33
env:
4-
PACKAGE_NAME: docstring-format-checker
4+
PACKAGE_NAME: ${{ github.event.repository.name }}
55
UV_LINK_MODE: copy
66
UV_NO_SYNC: true
77
UV_INDEX_STRATEGY: unsafe-best-match

.github/workflows/codeql.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
12+
name: "CodeQL Advanced"
13+
14+
on:
15+
push:
16+
branches: [ "main" ]
17+
pull_request:
18+
branches: [ "main" ]
19+
schedule:
20+
- cron: '30 23 * * 0'
21+
22+
jobs:
23+
analyze:
24+
25+
name: Analyze (${{ matrix.language }})
26+
# Runner size impacts CodeQL analysis time. To learn more, please see:
27+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
28+
# - https://gh.io/supported-runners-and-hardware-resources
29+
# - https://gh.io/using-larger-runners (GitHub.com only)
30+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
31+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
32+
permissions:
33+
34+
# required for all workflows
35+
security-events: write
36+
37+
# required to fetch internal or private CodeQL packs
38+
packages: read
39+
40+
# only required for workflows in private repositories
41+
actions: read
42+
contents: read
43+
44+
strategy:
45+
fail-fast: false
46+
matrix:
47+
include:
48+
- language: actions
49+
build-mode: none
50+
- language: python
51+
build-mode: none
52+
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
53+
# Use `c-cpp` to analyze code written in C, C++ or both
54+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
55+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
56+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
57+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
58+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
59+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
60+
61+
steps:
62+
63+
- name: Checkout repository
64+
uses: actions/checkout@v4
65+
66+
# Add any setup steps before running the `github/codeql-action/init` action.
67+
# This includes steps like installing compilers or runtimes (`actions/setup-node` or others).
68+
# This is typically only required for manual builds.
69+
# - name: Setup runtime (example)
70+
# uses: actions/setup-example@v1
71+
72+
# Initializes the CodeQL tools for scanning.
73+
- name: Initialize CodeQL
74+
uses: github/codeql-action/init@v4
75+
with:
76+
languages: ${{ matrix.language }}
77+
build-mode: ${{ matrix.build-mode }}
78+
# If you wish to specify custom queries, you can do so here or in a config file.
79+
# By default, queries listed here will override any specified in a config file.
80+
# Prefix the list here with "+" to use these queries and those in the config file.
81+
82+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
83+
# queries: security-extended,security-and-quality
84+
85+
# If the analyze step fails for one of the languages you are analyzing with
86+
# "We were unable to automatically build your code", modify the matrix above
87+
# to set the build mode to "manual" for that language. Then modify this step
88+
# to build your code.
89+
# ℹ️ Command-line programs to run using the OS shell.
90+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
91+
- name: Run manual build steps
92+
if: matrix.build-mode == 'manual'
93+
shell: bash
94+
run: |
95+
echo 'If you are using a "manual" build mode for one or more of the' \
96+
'languages you are analyzing, replace this with the commands to build' \
97+
'your code, for example:'
98+
echo ' make bootstrap'
99+
echo ' make release'
100+
exit 1
101+
102+
- name: Perform CodeQL Analysis
103+
uses: github/codeql-action/analyze@v4
104+
with:
105+
category: "/language:${{matrix.language}}"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Pipfile.lock
77
.github/copilot-instructions.md
88
git_output/
99
.github/instructions/*
10+
.github/prompts/*
1011
.complexipy_cache/*
1112

1213
# Byte-compiled / optimized / DLL files

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ repos:
3333

3434
# Linter
3535
- repo: https://github.com/psf/black
36-
rev: "25.12.0"
36+
rev: "26.1.0"
3737
hooks:
3838
- id: black
3939
language_version: python3.13
@@ -103,7 +103,7 @@ repos:
103103

104104
# Check uv configs
105105
- repo: https://github.com/astral-sh/uv-pre-commit
106-
rev: "0.9.21"
106+
rev: "0.9.26"
107107
hooks:
108108
- id: uv-lock
109109
- id: uv-sync
@@ -116,7 +116,7 @@ repos:
116116

117117
- id: ty
118118
name: ty-check
119-
entry: uv run ty check ./src/docstring_format_checker
119+
entry: uv run ty check
120120
language: python
121121
types: [python]
122122
pass_filenames: true

pyproject.toml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,15 @@ dfc = "docstring_format_checker.cli:entry_point"
5050
[dependency-groups]
5151
dev = [
5252
"black==25.*",
53+
# "black==25.*; python_version<'3.10'",
54+
# "black==26.*; python_version>='3.10'",
5355
"blacken-docs==1.*",
5456
"codespell==2.*",
5557
"ipykernel==6.*; python_version<'3.10'",
5658
"ipykernel==7.*; python_version>='3.10'",
5759
"isort==6.*; python_version<'3.10'",
5860
"isort==7.*; python_version>='3.10'",
59-
"pre-commit==4.*",
61+
"prek==0.*",
6062
"pycln==2.*",
6163
"pylint==3.*; python_version<'3.10'",
6264
"pylint==4.*; python_version>='3.10'",
@@ -67,25 +69,27 @@ dev = [
6769
]
6870
docs = [
6971
"black==25.*",
70-
"docstring-inheritance==3.*; python_version>='3.10'",
72+
# "black==25.*; python_version<'3.10'",
73+
# "black==26.*; python_version>='3.10'",
7174
"docstring-inheritance==2.*; python_version<'3.10'",
75+
"docstring-inheritance==3.*; python_version>='3.10'",
7276
"livereload==2.*",
7377
"mike==2.*",
7478
"mkdocs==1.*",
7579
"mkdocs-autorefs==1.*",
7680
"mkdocs-coverage==2.*",
7781
"mkdocs-material==9.*",
78-
"mkdocstrings==1.*; python_version>='3.10'",
7982
"mkdocstrings==0.*; python_version<'3.10'",
80-
"mkdocstrings-python==2.*; python_version>='3.10'",
83+
"mkdocstrings==1.*; python_version>='3.10'",
8184
"mkdocstrings-python==1.*; python_version<'3.10'",
85+
"mkdocstrings-python==2.*; python_version>='3.10'",
8286
"pygithub==2.*",
8387
]
8488
test = [
8589
"ty==0.*",
8690
"parameterized==0.*",
87-
"pytest==9.*; python_version>='3.10'",
8891
"pytest==8.*; python_version<'3.10'",
92+
"pytest==9.*; python_version>='3.10'",
8993
"pytest-clarity==1.*",
9094
"pytest-cov==7.*",
9195
"pytest-icdiff==0.*",

0 commit comments

Comments
 (0)