Skip to content

Commit eb49a49

Browse files
authored
Migrate to copier template (#61)
1 parent 4089cd4 commit eb49a49

14 files changed

Lines changed: 3199 additions & 391 deletions

.copier-answers.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# This file is managed by Copier; DO NOT EDIT OR REMOVE.
2+
_commit: v0.1.0-2-g162001d
3+
_src_path: https://github.com/quantco/copier-template-python-open-source
4+
add_autobump_workflow: false
5+
author_email: noreply@quantco.com
6+
author_name: QuantCo, Inc.
7+
github_url: https://github.com/quantco/multiregex
8+
github_user: pavelzw
9+
minimal_python_version: py38
10+
project_short_description: Quickly match many regexes against a string. Provides 2-10x
11+
speedups over naïve regex matching.
12+
project_slug: multiregex
13+
use_devcontainer: false

.gitattributes

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1 @@
1-
* text=auto
2-
3-
*.{diff,patch} binary
4-
5-
*.{py,yaml,yml,sh} text eol=lf
6-
*.bat text eol=crlf
7-
# GitHub syntax highlighting
81
pixi.lock linguist-language=YAML linguist-generated=true

.github/CODEOWNERS

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
* @0xbe7a
2-
* @pavelzw
1+
* @0xbe7a @pavelzw

.github/dependabot.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
version: 2
22
updates:
3-
- package-ecosystem: "github-actions"
4-
directory: "/"
3+
- package-ecosystem: github-actions
4+
directory: /
55
schedule:
6-
interval: "weekly"
6+
interval: monthly
77
reviewers:
88
- "quantco/ci"
9+
groups:
10+
gh-actions:
11+
patterns:
12+
- "*"

.github/workflows/build.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
pull_request:
44
push:
55
branches:
6-
- "main"
6+
- main
77
tags:
88
- "*"
99

@@ -13,10 +13,9 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v4
1515
with:
16-
ref: ${{ github.ref }}
1716
fetch-depth: 0
1817
- name: Set up pixi
19-
uses: prefix-dev/setup-pixi@v0.8.1
18+
uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659
2019
with:
2120
environments: build
2221
- name: Build project
@@ -41,8 +40,8 @@ jobs:
4140
name: artifact
4241
path: dist
4342
- name: Publish package on TestPyPi
44-
uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0
43+
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450
4544
with:
4645
repository-url: https://test.pypi.org/legacy/
4746
- name: Publish package on PyPi
48-
uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0
47+
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450

.github/workflows/ci.yml

Lines changed: 32 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,55 @@
11
name: CI
22
on:
3+
pull_request:
34
push:
45
branches:
56
- main
6-
pull_request:
77

8-
defaults:
9-
run:
10-
shell: bash -el {0}
8+
# Automatically stop old builds on the same branch/PR
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
1112

1213
jobs:
13-
unit-tests:
14-
name: pytest
15-
timeout-minutes: 10
16-
runs-on: ${{ matrix.os }}
17-
strategy:
18-
fail-fast: false
19-
matrix:
20-
include:
21-
- { os: ubuntu-latest, environment: py38 }
22-
- { os: ubuntu-latest, environment: py312 }
23-
- { os: windows-latest, environment: py38 }
24-
- { os: windows-latest, environment: py312 }
25-
- { os: macos-latest, environment: py38 }
26-
- { os: macos-latest, environment: py312 }
14+
pre-commit:
15+
timeout-minutes: 30
16+
runs-on: ubuntu-latest
2717
steps:
2818
- name: Checkout branch
2919
uses: actions/checkout@v4
30-
with:
31-
ref: ${{ github.ref }}
32-
fetch-depth: 0
3320
- name: Set up pixi
34-
uses: prefix-dev/setup-pixi@v0.8.1
21+
uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659
3522
with:
36-
environments: ${{ matrix.environment }}
37-
- name: Install repository
38-
run: pixi run -e ${{ matrix.environment }} postinstall
39-
- name: Run unittests
40-
uses: quantco/pytest-action@v2
41-
with:
42-
report-title: Unit tests ${{ matrix.environment }}
43-
custom-pytest: pixi run -e ${{ matrix.environment }} pytest
23+
environments: default lint
24+
- name: pre-commit
25+
run: pixi run pre-commit-run --color=always --show-diff-on-failure
4426

45-
pre-commit-checks:
46-
name: Pre-commit Checks
27+
pytest:
4728
timeout-minutes: 30
4829
runs-on: ubuntu-latest
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
environment:
34+
- py38
35+
- py39
36+
- py310
37+
- py311
38+
- py312
39+
os:
40+
- ubuntu-latest
41+
- macos-latest
42+
- windows-latest
4943
steps:
5044
- name: Checkout branch
5145
uses: actions/checkout@v4
5246
with:
53-
ref: ${{ github.ref }}
5447
fetch-depth: 0
5548
- name: Set up pixi
56-
uses: prefix-dev/setup-pixi@v0.8.1
49+
uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659
5750
with:
58-
environments: lint default
59-
- name: pre-commit
60-
run: pixi run pre-commit-run --color=always --show-diff-on-failure
51+
environments: ${{ matrix.environment }}
52+
- name: Install repository
53+
run: pixi run -e ${{ matrix.environment }} postinstall
54+
- name: Run pytest
55+
run: pixi run -e ${{ matrix.environment }} test-coverage --color=yes

0 commit comments

Comments
 (0)