quant-ranger 0.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. quant_ranger-0.1.1/.claude/CLAUDE.md +1 -0
  2. quant_ranger-0.1.1/.copier-answers.yml +21 -0
  3. quant_ranger-0.1.1/.envrc +4 -0
  4. quant_ranger-0.1.1/.gitattributes +10 -0
  5. quant_ranger-0.1.1/.github/CODEOWNERS +1 -0
  6. quant_ranger-0.1.1/.github/PULL_REQUEST_TEMPLATE.md +7 -0
  7. quant_ranger-0.1.1/.github/dependabot.yml +36 -0
  8. quant_ranger-0.1.1/.github/release-drafter.yml +98 -0
  9. quant_ranger-0.1.1/.github/workflows/build.yml +56 -0
  10. quant_ranger-0.1.1/.github/workflows/chore.yml +89 -0
  11. quant_ranger-0.1.1/.github/workflows/ci.yml +59 -0
  12. quant_ranger-0.1.1/.github/workflows/copilot-setup-steps.yml +19 -0
  13. quant_ranger-0.1.1/.github/workflows/docs.yml +57 -0
  14. quant_ranger-0.1.1/.github/workflows/release-drafter.yml +21 -0
  15. quant_ranger-0.1.1/.github/workflows/scorecard.yml +79 -0
  16. quant_ranger-0.1.1/.gitignore +400 -0
  17. quant_ranger-0.1.1/.lefthook.yaml +57 -0
  18. quant_ranger-0.1.1/.prettierignore +10 -0
  19. quant_ranger-0.1.1/.prettierrc +7 -0
  20. quant_ranger-0.1.1/AGENTS.md +5 -0
  21. quant_ranger-0.1.1/LICENSE +28 -0
  22. quant_ranger-0.1.1/PKG-INFO +89 -0
  23. quant_ranger-0.1.1/README.md +63 -0
  24. quant_ranger-0.1.1/SECURITY.md +7 -0
  25. quant_ranger-0.1.1/docs/.gitignore +19 -0
  26. quant_ranger-0.1.1/docs/README.md +42 -0
  27. quant_ranger-0.1.1/docs/contents/built-in-aggregators/index.md +81 -0
  28. quant_ranger-0.1.1/docs/contents/built-in-updaters/copier.md +110 -0
  29. quant_ranger-0.1.1/docs/contents/built-in-updaters/github-actions.md +69 -0
  30. quant_ranger-0.1.1/docs/contents/built-in-updaters/index.md +57 -0
  31. quant_ranger-0.1.1/docs/contents/built-in-updaters/node-dependency-cooldown.md +117 -0
  32. quant_ranger-0.1.1/docs/contents/built-in-updaters/pixi.md +187 -0
  33. quant_ranger-0.1.1/docs/contents/index.md +45 -0
  34. quant_ranger-0.1.1/docs/contents/plugins/index.md +9 -0
  35. quant_ranger-0.1.1/docs/contents/plugins/installable-plugins.md +244 -0
  36. quant_ranger-0.1.1/docs/contents/plugins/one-off-updaters.md +85 -0
  37. quant_ranger-0.1.1/docs/contents/plugins/site-configuration.md +137 -0
  38. quant_ranger-0.1.1/docs/contents/quant-ranger-at-quantco.md +66 -0
  39. quant_ranger-0.1.1/docs/contents/reference/cli.md +261 -0
  40. quant_ranger-0.1.1/docs/contents/reference/python-api.md +1649 -0
  41. quant_ranger-0.1.1/docs/contents/usage/authentication.md +90 -0
  42. quant_ranger-0.1.1/docs/contents/usage/getting-started.md +92 -0
  43. quant_ranger-0.1.1/docs/contents/usage/results-and-aggregation.md +35 -0
  44. quant_ranger-0.1.1/docs/contents/usage/running-updates.md +137 -0
  45. quant_ranger-0.1.1/docs/contents/usage/scheduling.md +89 -0
  46. quant_ranger-0.1.1/docs/docusaurus.config.ts +104 -0
  47. quant_ranger-0.1.1/docs/package.json +45 -0
  48. quant_ranger-0.1.1/docs/pnpm-lock.yaml +13762 -0
  49. quant_ranger-0.1.1/docs/pnpm-workspace.yaml +3 -0
  50. quant_ranger-0.1.1/docs/reference_docs_app.py +233 -0
  51. quant_ranger-0.1.1/docs/sidebars.ts +33 -0
  52. quant_ranger-0.1.1/docs/src/css/custom.css +91 -0
  53. quant_ranger-0.1.1/docs/static/.nojekyll +0 -0
  54. quant_ranger-0.1.1/docs/static/img/pixi_update_pr_dark.png +0 -0
  55. quant_ranger-0.1.1/docs/static/img/pixi_update_pr_light.png +0 -0
  56. quant_ranger-0.1.1/docs/static/img/quant-ranger-bot-transparent.png +0 -0
  57. quant_ranger-0.1.1/docs/tsconfig.json +14 -0
  58. quant_ranger-0.1.1/examples/plugin/.github/workflows/updater-copier.yml +64 -0
  59. quant_ranger-0.1.1/examples/plugin/.github/workflows/updater-pixi-update.yml +125 -0
  60. quant_ranger-0.1.1/examples/plugin/.github/workflows/updater.yml +115 -0
  61. quant_ranger-0.1.1/examples/plugin/README.md +31 -0
  62. quant_ranger-0.1.1/examples/plugin/pixi.lock +3266 -0
  63. quant_ranger-0.1.1/examples/plugin/pixi.toml +27 -0
  64. quant_ranger-0.1.1/examples/plugin/pyproject.toml +21 -0
  65. quant_ranger-0.1.1/examples/plugin/quant_ranger_example_plugin/aggregator.py +52 -0
  66. quant_ranger-0.1.1/examples/plugin/quant_ranger_example_plugin/scanner.py +39 -0
  67. quant_ranger-0.1.1/examples/plugin/quant_ranger_example_plugin/site_config.py +51 -0
  68. quant_ranger-0.1.1/examples/plugin/quant_ranger_example_plugin/updater.py +61 -0
  69. quant_ranger-0.1.1/examples/simple_custom_updater.py +25 -0
  70. quant_ranger-0.1.1/pixi.lock +5369 -0
  71. quant_ranger-0.1.1/pixi.toml +110 -0
  72. quant_ranger-0.1.1/pyproject.toml +99 -0
  73. quant_ranger-0.1.1/quant_ranger/__init__.py +59 -0
  74. quant_ranger-0.1.1/quant_ranger/__main__.py +4 -0
  75. quant_ranger-0.1.1/quant_ranger/_impl/__init__.py +1 -0
  76. quant_ranger-0.1.1/quant_ranger/_impl/_plugins.py +180 -0
  77. quant_ranger-0.1.1/quant_ranger/_impl/aggregators/__init__.py +11 -0
  78. quant_ranger-0.1.1/quant_ranger/_impl/aggregators/_base.py +82 -0
  79. quant_ranger-0.1.1/quant_ranger/_impl/aggregators/_incident_io/__init__.py +3 -0
  80. quant_ranger-0.1.1/quant_ranger/_impl/aggregators/_incident_io/_aggregator.py +254 -0
  81. quant_ranger-0.1.1/quant_ranger/_impl/aggregators/_incident_io/_client.py +136 -0
  82. quant_ranger-0.1.1/quant_ranger/_impl/aggregators/_log_failures.py +67 -0
  83. quant_ranger-0.1.1/quant_ranger/_impl/artifacts.py +86 -0
  84. quant_ranger-0.1.1/quant_ranger/_impl/cli/__init__.py +3 -0
  85. quant_ranger-0.1.1/quant_ranger/_impl/cli/_aggregate.py +149 -0
  86. quant_ranger-0.1.1/quant_ranger/_impl/cli/_app.py +355 -0
  87. quant_ranger-0.1.1/quant_ranger/_impl/cli/_helpers.py +95 -0
  88. quant_ranger-0.1.1/quant_ranger/_impl/cli/_update.py +374 -0
  89. quant_ranger-0.1.1/quant_ranger/_impl/cli_options.py +44 -0
  90. quant_ranger-0.1.1/quant_ranger/_impl/git.py +122 -0
  91. quant_ranger-0.1.1/quant_ranger/_impl/github.py +681 -0
  92. quant_ranger-0.1.1/quant_ranger/_impl/helpers.py +263 -0
  93. quant_ranger-0.1.1/quant_ranger/_impl/logger.py +178 -0
  94. quant_ranger-0.1.1/quant_ranger/_impl/models.py +238 -0
  95. quant_ranger-0.1.1/quant_ranger/_impl/runtime.py +17 -0
  96. quant_ranger-0.1.1/quant_ranger/_impl/sandbox.py +183 -0
  97. quant_ranger-0.1.1/quant_ranger/_impl/scanners/__init__.py +10 -0
  98. quant_ranger-0.1.1/quant_ranger/_impl/scanners/_base.py +119 -0
  99. quant_ranger-0.1.1/quant_ranger/_impl/scanners/_repositories.py +19 -0
  100. quant_ranger-0.1.1/quant_ranger/_impl/scanners/_repository_file.py +43 -0
  101. quant_ranger-0.1.1/quant_ranger/_impl/site_config.py +220 -0
  102. quant_ranger-0.1.1/quant_ranger/_impl/testing.py +360 -0
  103. quant_ranger-0.1.1/quant_ranger/_impl/updaters/__init__.py +23 -0
  104. quant_ranger-0.1.1/quant_ranger/_impl/updaters/_base.py +214 -0
  105. quant_ranger-0.1.1/quant_ranger/_impl/updaters/_copier/__init__.py +7 -0
  106. quant_ranger-0.1.1/quant_ranger/_impl/updaters/_copier/_common.py +228 -0
  107. quant_ranger-0.1.1/quant_ranger/_impl/updaters/_copier/_migration.py +304 -0
  108. quant_ranger-0.1.1/quant_ranger/_impl/updaters/_copier/_update.py +254 -0
  109. quant_ranger-0.1.1/quant_ranger/_impl/updaters/_custom.py +130 -0
  110. quant_ranger-0.1.1/quant_ranger/_impl/updaters/_github_app_token.py +243 -0
  111. quant_ranger-0.1.1/quant_ranger/_impl/updaters/_node_dependency_cooldown.py +669 -0
  112. quant_ranger-0.1.1/quant_ranger/_impl/updaters/_pixi_update/__init__.py +3 -0
  113. quant_ranger-0.1.1/quant_ranger/_impl/updaters/_pixi_update/_auth.py +273 -0
  114. quant_ranger-0.1.1/quant_ranger/_impl/updaters/_pixi_update/_update.py +595 -0
  115. quant_ranger-0.1.1/quant_ranger/_impl/updaters/_pixi_version.py +288 -0
  116. quant_ranger-0.1.1/quant_ranger/_impl/updaters/_zizmor.py +112 -0
  117. quant_ranger-0.1.1/quant_ranger/_impl/updaters/zizmor.yml +69 -0
  118. quant_ranger-0.1.1/quant_ranger/aggregators.py +6 -0
  119. quant_ranger-0.1.1/quant_ranger/cli.py +3 -0
  120. quant_ranger-0.1.1/quant_ranger/py.typed +0 -0
  121. quant_ranger-0.1.1/quant_ranger/scanners.py +10 -0
  122. quant_ranger-0.1.1/quant_ranger/site_config.py +23 -0
  123. quant_ranger-0.1.1/quant_ranger/updaters.py +8 -0
  124. quant_ranger-0.1.1/skills/create-custom-updater/SKILL.md +302 -0
  125. quant_ranger-0.1.1/tests/conftest.py +52 -0
  126. quant_ranger-0.1.1/tests/test_aggregators.py +33 -0
  127. quant_ranger-0.1.1/tests/test_artifacts.py +146 -0
  128. quant_ranger-0.1.1/tests/test_cli.py +1824 -0
  129. quant_ranger-0.1.1/tests/test_copier.py +944 -0
  130. quant_ranger-0.1.1/tests/test_copier_migration.py +939 -0
  131. quant_ranger-0.1.1/tests/test_custom_updater.py +363 -0
  132. quant_ranger-0.1.1/tests/test_git.py +164 -0
  133. quant_ranger-0.1.1/tests/test_github.py +1479 -0
  134. quant_ranger-0.1.1/tests/test_github_app_token.py +377 -0
  135. quant_ranger-0.1.1/tests/test_helpers.py +433 -0
  136. quant_ranger-0.1.1/tests/test_incident_io_aggregator.py +381 -0
  137. quant_ranger-0.1.1/tests/test_incident_io_client.py +154 -0
  138. quant_ranger-0.1.1/tests/test_log_failures_aggregator.py +137 -0
  139. quant_ranger-0.1.1/tests/test_logger.py +147 -0
  140. quant_ranger-0.1.1/tests/test_models.py +182 -0
  141. quant_ranger-0.1.1/tests/test_node_dependency_cooldown.py +980 -0
  142. quant_ranger-0.1.1/tests/test_pixi_auth.py +473 -0
  143. quant_ranger-0.1.1/tests/test_pixi_update.py +1486 -0
  144. quant_ranger-0.1.1/tests/test_pixi_version.py +536 -0
  145. quant_ranger-0.1.1/tests/test_plugins.py +527 -0
  146. quant_ranger-0.1.1/tests/test_repositories_scanner.py +32 -0
  147. quant_ranger-0.1.1/tests/test_repository_file_scanner.py +67 -0
  148. quant_ranger-0.1.1/tests/test_sandbox.py +341 -0
  149. quant_ranger-0.1.1/tests/test_scanner_base.py +105 -0
  150. quant_ranger-0.1.1/tests/test_site_config.py +47 -0
  151. quant_ranger-0.1.1/tests/test_testing.py +55 -0
  152. quant_ranger-0.1.1/tests/test_updater_base.py +377 -0
  153. quant_ranger-0.1.1/tests/test_zizmor.py +293 -0
@@ -0,0 +1 @@
1
+ ../AGENTS.md
@@ -0,0 +1,21 @@
1
+ # This file is managed by Copier; DO NOT EDIT OR REMOVE.
2
+ #
3
+ # If you want to change any of the copier answers, run one of the following:
4
+ # 1. If you want to answer _all_ questions again:
5
+ # `copier update --trust --vcs-ref=:current: .`
6
+ # 2. If you want to answer a _specific_ question again:
7
+ # `copier update --trust --defaults --vcs-ref=:current: --data answer_name=answer_value .`
8
+ #
9
+ # If you want to run this as a one-off command, prefix with:
10
+ # `pixi exec --spec copier --spec ruamel.yaml -- {command}`
11
+ _commit: v0.5.3
12
+ _src_path: https://github.com/Quantco/copier-template-python-open-source
13
+ add_autobump_workflow: false
14
+ author_email: noreply@quantco.com
15
+ author_name: QuantCo, Inc.
16
+ github_url: https://github.com/quantco/quant-ranger
17
+ github_user: JakobKlaushoferQC
18
+ minimal_python_version: py314
19
+ project_short_description: Tool for maintenance work across GitHub repositories.
20
+ project_slug: quant-ranger
21
+ use_devcontainer: false
@@ -0,0 +1,4 @@
1
+ watch_file pixi.toml pixi.lock
2
+ eval "$(pixi shell-hook)"
3
+
4
+ dotenv_if_exists .env
@@ -0,0 +1,10 @@
1
+ * text=auto
2
+
3
+ *.{diff,patch} binary
4
+
5
+ *.{py,yaml,yml,sh} text eol=lf
6
+ *.bat text eol=crlf
7
+
8
+ pixi.lock merge=binary linguist-language=YAML linguist-generated=true
9
+
10
+ docs/docs/reference/*.md merge=binary linguist-generated=true
@@ -0,0 +1 @@
1
+ * @JakobKlaushoferQC @ytausch @pavelzw
@@ -0,0 +1,7 @@
1
+ # Motivation
2
+
3
+ <!-- Why is this change necessary? Link issues here if applicable. -->
4
+
5
+ # Changes
6
+
7
+ <!-- What changes have been performed? -->
@@ -0,0 +1,36 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: github-actions
4
+ directories:
5
+ - /
6
+ - /examples/plugin
7
+ schedule:
8
+ interval: monthly
9
+ groups:
10
+ gh-actions:
11
+ patterns:
12
+ - "*"
13
+ cooldown:
14
+ default-days: 7
15
+ commit-message:
16
+ prefix: ci
17
+ - package-ecosystem: npm
18
+ directory: /docs
19
+ schedule:
20
+ interval: monthly
21
+ groups:
22
+ docs:
23
+ patterns:
24
+ - "*"
25
+ update-types:
26
+ - minor
27
+ - patch
28
+ docs-major:
29
+ patterns:
30
+ - "*"
31
+ update-types:
32
+ - major
33
+ cooldown:
34
+ default-days: 7
35
+ commit-message:
36
+ prefix: build
@@ -0,0 +1,98 @@
1
+ # ------------------------------------- PULL REQUEST LABELS ------------------------------------- #
2
+ autolabeler:
3
+ # Conventional Commit Types (https://github.com/commitizen/conventional-commit-types)
4
+ - label: build
5
+ title:
6
+ - '/^build(\(.*\))?(\!)?\:/'
7
+ - label: chore
8
+ title:
9
+ - '/^chore(\(.*\))?(\!)?\:/'
10
+ - label: ci
11
+ title:
12
+ - '/^ci(\(.*\))?(\!)?\:/'
13
+ - label: documentation
14
+ title:
15
+ - '/^docs(\(.*\))?(\!)?\:/'
16
+ - label: enhancement
17
+ title:
18
+ - '/^feat(\(.*\))?(\!)?\:/'
19
+ - label: fix
20
+ title:
21
+ - '/^fix(\(.*\))?(\!)?\:/'
22
+ - label: performance
23
+ title:
24
+ - '/^perf(\(.*\))?(\!)?\:/'
25
+ - label: refactor
26
+ title:
27
+ - '/^refactor(\(.*\))?(\!)?\:/'
28
+ - label: revert
29
+ title:
30
+ - '/^revert(\(.*\))?(\!)?\:/'
31
+ - label: style
32
+ title:
33
+ - '/^style(\(.*\))?(\!)?\:/'
34
+ - label: test
35
+ title:
36
+ - '/^test(\(.*\))?(\!)?\:/'
37
+ # Custom Types
38
+ - label: breaking
39
+ title:
40
+ - '/^[a-z]+(\(.*\))?\!\:/'
41
+ # ------------------------------------- AUTOMATIC VERSIONING ------------------------------------ #
42
+ version-resolver:
43
+ minor:
44
+ labels:
45
+ - breaking
46
+ default: patch
47
+ # ------------------------------------ RELEASE CONFIGURATION ------------------------------------ #
48
+ name-template: "v$RESOLVED_VERSION"
49
+ tag-template: "v$RESOLVED_VERSION"
50
+ category-template: "### $TITLE"
51
+ change-template: "- $TITLE by @$AUTHOR in [#$NUMBER]($URL)"
52
+ replacers:
53
+ # remove conventional commit tag & scope from change list
54
+ - search: '/- [a-z]+(\(.*\))?(\!)?\: /g'
55
+ replace: "- "
56
+ template: |
57
+ ## What's Changed
58
+
59
+ $CHANGES
60
+
61
+ **Full Changelog:** [`$PREVIOUS_TAG...v$RESOLVED_VERSION`](https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION)
62
+ categories:
63
+ - title: ⚠️ Breaking Changes
64
+ labels:
65
+ - breaking
66
+ - title: ✨ New Features
67
+ labels:
68
+ - enhancement
69
+ - title: 🐞 Bug Fixes
70
+ labels:
71
+ - fix
72
+ - title: 🏎️ Performance Improvements
73
+ labels:
74
+ - performance
75
+ - title: 📚 Documentation
76
+ labels:
77
+ - documentation
78
+ - title: 🏗️ Testing
79
+ labels:
80
+ - test
81
+ - title: ⚙️ Automation
82
+ labels:
83
+ - ci
84
+ - title: 🛠 Builds
85
+ labels:
86
+ - build
87
+ - title: 💎 Code Style
88
+ labels:
89
+ - style
90
+ - title: 📦 Refactorings
91
+ labels:
92
+ - refactor
93
+ - title: ♻️ Chores
94
+ labels:
95
+ - chore
96
+ - title: 🗑 Reverts
97
+ labels:
98
+ - revert
@@ -0,0 +1,56 @@
1
+ name: Build
2
+ on:
3
+ pull_request:
4
+ push:
5
+ branches:
6
+ - main
7
+ tags:
8
+ - "*"
9
+
10
+ jobs:
11
+ build:
12
+ runs-on: ubuntu-latest
13
+ permissions:
14
+ contents: read
15
+ steps:
16
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
17
+ with:
18
+ fetch-depth: 0
19
+ - name: Set up pixi
20
+ uses: prefix-dev/setup-pixi@a09b6247153796b190642a2b53fac4241043cf6f # v0.10.0
21
+ - name: Derive version
22
+ id: version
23
+ if: startsWith(github.ref, 'refs/tags/')
24
+ shell: bash
25
+ run: echo "version=$(git describe --tags --abbrev=0 | sed 's/^v//')" >> $GITHUB_OUTPUT
26
+ - name: Replace version
27
+ if: startsWith(github.ref, 'refs/tags/')
28
+ run: |
29
+ sed -i -e "s/0.0.0/${STEPS_VERSION_OUTPUTS_VERSION}/g" pyproject.toml
30
+ env:
31
+ STEPS_VERSION_OUTPUTS_VERSION: ${{ steps.version.outputs.version }}
32
+ - name: Build project
33
+ run: pixi run build-wheel
34
+ - name: Check package
35
+ run: pixi run check-wheel
36
+ - name: Upload package
37
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
38
+ with:
39
+ name: artifact
40
+ path: dist/*
41
+
42
+ release:
43
+ name: Publish package
44
+ if: startsWith(github.ref, 'refs/tags/')
45
+ needs: [build]
46
+ runs-on: ubuntu-latest
47
+ permissions:
48
+ id-token: write
49
+ environment: pypi
50
+ steps:
51
+ - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
52
+ with:
53
+ name: artifact
54
+ path: dist
55
+ - name: Publish package on PyPi
56
+ uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
@@ -0,0 +1,89 @@
1
+ name: Chore
2
+ on:
3
+ pull_request:
4
+ branches: [main]
5
+ types: [opened, reopened, edited, synchronize]
6
+
7
+ concurrency:
8
+ group: ${{ github.workflow }}-${{ github.ref }}
9
+ cancel-in-progress: true
10
+
11
+ jobs:
12
+ check-public-api:
13
+ name: Check Public API
14
+ runs-on: ubuntu-latest
15
+ permissions:
16
+ contents: read
17
+ steps:
18
+ - name: Check out branch
19
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
20
+ with:
21
+ fetch-depth: 0
22
+ persist-credentials: false
23
+ - name: Set up pixi
24
+ uses: prefix-dev/setup-pixi@a09b6247153796b190642a2b53fac4241043cf6f # v0.10.0
25
+ - name: Check for breaking public API changes
26
+ env:
27
+ BASE_SHA: ${{ github.event.pull_request.base.sha }}
28
+ PR_TITLE: ${{ github.event.pull_request.title }}
29
+ # The `github` format duplicates annotations on every workflow rerun,
30
+ # therefore we use `oneline`.
31
+ run: |
32
+ if pixi run griffe check quant_ranger \
33
+ --against "${BASE_SHA}" --format oneline; then
34
+ exit 0
35
+ fi
36
+
37
+ if [[ ! "${PR_TITLE}" =~ ^[a-z]+(\(.*\))?\!: ]]; then
38
+ echo "::error::Griffe detected a breaking public API change. Mark the PR title as breaking (for example, 'feat!: Remove deprecated API')."
39
+ exit 1
40
+ fi
41
+
42
+ check-pr-title:
43
+ name: Check PR Title
44
+ runs-on: ubuntu-latest
45
+ permissions:
46
+ contents: read
47
+ pull-requests: write
48
+ steps:
49
+ - name: Check valid conventional commit message
50
+ id: lint
51
+ uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
52
+ with:
53
+ subjectPattern: ^[A-Za-z].+[^. ]$ # subject must start with a letter and may not end with a dot/space
54
+ env:
55
+ GITHUB_TOKEN: ${{ github.token }}
56
+ - name: Post comment about invalid PR title
57
+ if: failure()
58
+ uses: marocchino/sticky-pull-request-comment@5770ad5eb8f42dd2c4f34da00c94c5381e49af88 # v3.0.5
59
+ with:
60
+ header: conventional-commit-pr-title
61
+ message: |
62
+ Thank you for opening this pull request! 👋🏼
63
+
64
+ This repository requires pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted.
65
+
66
+ <details><summary><b>Details</b></summary>
67
+
68
+ ```
69
+ ${{ steps.lint.outputs.error_message }}
70
+ ```
71
+ </details>
72
+ - name: Delete comment about invalid PR title
73
+ if: success()
74
+ uses: marocchino/sticky-pull-request-comment@5770ad5eb8f42dd2c4f34da00c94c5381e49af88 # v3.0.5
75
+ with:
76
+ header: conventional-commit-pr-title
77
+ delete: true
78
+
79
+ assign-labels:
80
+ name: Assign Labels
81
+ runs-on: ubuntu-latest
82
+ permissions:
83
+ contents: read
84
+ pull-requests: write
85
+ steps:
86
+ - name: Assign labels
87
+ uses: release-drafter/release-drafter/autolabeler@eada3c96a64734dd381cfbda23511034e328ddb0 # v7.6.0
88
+ with:
89
+ token: ${{ github.token }}
@@ -0,0 +1,59 @@
1
+ name: CI
2
+ on:
3
+ pull_request:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ # Automatically stop old builds on the same branch/PR
9
+ concurrency:
10
+ group: ${{ github.workflow }}-${{ github.ref }}
11
+ cancel-in-progress: true
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ jobs:
17
+ lint:
18
+ name: Lint
19
+ timeout-minutes: 30
20
+ runs-on: ubuntu-latest
21
+ steps:
22
+ - name: Checkout branch
23
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
24
+ - name: Set up pixi
25
+ uses: prefix-dev/setup-pixi@a09b6247153796b190642a2b53fac4241043cf6f # v0.10.0
26
+ - name: Run linting
27
+ run: pixi run lint
28
+ env:
29
+ CLICOLOR_FORCE: 1
30
+
31
+ pytest:
32
+ timeout-minutes: 30
33
+ runs-on: ${{ matrix.os }}
34
+ permissions:
35
+ contents: read
36
+ id-token: write
37
+ strategy:
38
+ fail-fast: false
39
+ matrix:
40
+ environment:
41
+ - py314
42
+ os:
43
+ - ubuntu-latest
44
+ - macos-latest
45
+ steps:
46
+ - name: Checkout branch
47
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
48
+ with:
49
+ fetch-depth: 0
50
+ - name: Set up pixi
51
+ uses: prefix-dev/setup-pixi@a09b6247153796b190642a2b53fac4241043cf6f # v0.10.0
52
+ with:
53
+ environments: ${{ matrix.environment }}
54
+ - name: Run pytest
55
+ run: pixi run -e ${{ matrix.environment }} test-coverage --color=yes
56
+ - name: Upload coverage reports to Codecov
57
+ uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
58
+ with:
59
+ use_oidc: true
@@ -0,0 +1,19 @@
1
+ name: Copilot Setup Steps
2
+ on:
3
+ pull_request:
4
+ paths:
5
+ - .github/workflows/copilot-setup-steps.yml
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ copilot-setup-steps:
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ contents: read
13
+ steps:
14
+ - name: Check out branch
15
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
16
+ - name: Set up pixi
17
+ uses: prefix-dev/setup-pixi@a09b6247153796b190642a2b53fac4241043cf6f # v0.10.0
18
+ with:
19
+ locked: false
@@ -0,0 +1,57 @@
1
+ name: Documentation
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+
7
+ concurrency:
8
+ group: github-pages
9
+ cancel-in-progress: false
10
+
11
+ jobs:
12
+ build:
13
+ name: Build Documentation
14
+ timeout-minutes: 30
15
+ runs-on: ubuntu-latest
16
+ permissions:
17
+ contents: read
18
+ pages: read
19
+ id-token: write
20
+ steps:
21
+ - name: Check out branch
22
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
23
+ with:
24
+ persist-credentials: false
25
+ - name: Configure GitHub Pages
26
+ id: pages
27
+ uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
28
+ - name: Set up Pixi
29
+ uses: prefix-dev/setup-pixi@a09b6247153796b190642a2b53fac4241043cf6f # v0.10.0
30
+ with:
31
+ environments: docs
32
+ - name: Build documentation
33
+ env:
34
+ DOCS_SITE_URL: ${{ steps.pages.outputs.origin }}
35
+ DOCS_BASE_URL: ${{ steps.pages.outputs.base_path }}/
36
+ run: pixi run -e docs docs-build
37
+ - name: Upload documentation
38
+ uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
39
+ with:
40
+ path: docs/build
41
+ include-hidden-files: true
42
+
43
+ deploy:
44
+ name: Deploy Documentation
45
+ needs: build
46
+ timeout-minutes: 10
47
+ runs-on: ubuntu-latest
48
+ permissions:
49
+ pages: write
50
+ id-token: write
51
+ environment:
52
+ name: github-pages
53
+ url: ${{ steps.deployment.outputs.page_url }}
54
+ steps:
55
+ - name: Deploy to GitHub Pages
56
+ id: deployment
57
+ uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
@@ -0,0 +1,21 @@
1
+ name: Release Drafter
2
+ on:
3
+ push:
4
+ branches: [main]
5
+
6
+ concurrency:
7
+ group: ${{ github.workflow }}-${{ github.ref }}
8
+ cancel-in-progress: true
9
+
10
+ jobs:
11
+ draft-release:
12
+ name: Draft Release
13
+ runs-on: ubuntu-latest
14
+ permissions:
15
+ contents: write
16
+ pull-requests: read
17
+ steps:
18
+ - name: Update release draft
19
+ uses: release-drafter/release-drafter@eada3c96a64734dd381cfbda23511034e328ddb0 # v7.6.0
20
+ with:
21
+ token: ${{ github.token }}
@@ -0,0 +1,79 @@
1
+ # This workflow uses actions that are not certified by GitHub. They are provided
2
+ # by a third-party and are governed by separate terms of service, privacy
3
+ # policy, and support documentation.
4
+
5
+ name: Scorecard supply-chain security
6
+ on:
7
+ # For Branch-Protection check. Only the default branch is supported. See
8
+ # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
9
+ branch_protection_rule:
10
+ # To guarantee Maintained check is occasionally updated. See
11
+ # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
12
+ schedule:
13
+ - cron: "34 5 * * 0"
14
+ workflow_dispatch:
15
+ push:
16
+ branches: ["main"]
17
+
18
+ # Declare default permissions as read only.
19
+ permissions: read-all
20
+
21
+ jobs:
22
+ analysis:
23
+ name: Scorecard analysis
24
+ runs-on: ubuntu-latest
25
+ # `publish_results: true` only works when run from the default branch. conditional can be removed if disabled.
26
+ if: (github.event.repository.default_branch == github.ref_name || github.event_name == 'pull_request') && github.repository == 'quantco/quant-ranger'
27
+ permissions:
28
+ # Needed to upload the results to code-scanning dashboard.
29
+ security-events: write
30
+ # Needed to publish results and get a badge (see publish_results below).
31
+ id-token: write
32
+ # Uncomment the permissions below if installing in a private repository.
33
+ # contents: read
34
+ # actions: read
35
+
36
+ steps:
37
+ - name: "Checkout code"
38
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
39
+ with:
40
+ persist-credentials: false
41
+
42
+ - name: "Run analysis"
43
+ uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4
44
+ with:
45
+ results_file: results.sarif
46
+ results_format: sarif
47
+ # (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
48
+ # - you want to enable the Branch-Protection check on a *public* repository, or
49
+ # - you are installing Scorecard on a *private* repository
50
+ # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional.
51
+ # repo_token: ${{ secrets.SCORECARD_TOKEN }}
52
+
53
+ # Public repositories:
54
+ # - Publish results to OpenSSF REST API for easy access by consumers
55
+ # - Allows the repository to include the Scorecard badge.
56
+ # - See https://github.com/ossf/scorecard-action#publishing-results.
57
+ # For private repositories:
58
+ # - `publish_results` will always be set to `false`, regardless
59
+ # of the value entered here.
60
+ publish_results: true
61
+
62
+ # (Optional) Uncomment file_mode if you have a .gitattributes with files marked export-ignore
63
+ # file_mode: git
64
+
65
+ # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
66
+ # format to the repository Actions tab.
67
+ - name: "Upload artifact"
68
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
69
+ with:
70
+ name: SARIF file
71
+ path: results.sarif
72
+ retention-days: 5
73
+
74
+ # Upload the results to GitHub's code scanning dashboard (optional).
75
+ # Commenting out will disable upload of results to your repo's Code Scanning dashboard
76
+ - name: "Upload to code-scanning"
77
+ uses: github/codeql-action/upload-sarif@f205ea1c3313d32999d8d6a48b4f6530d4437b38 # v4.37.4
78
+ with:
79
+ sarif_file: results.sarif