Skip to content

Commit fc7f204

Browse files
committed
migrate to copier template
1 parent aac589b commit fc7f204

10 files changed

+33
-27
lines changed

.copier-answers.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# This file is managed by Copier; DO NOT EDIT OR REMOVE.
2+
_commit: v0.1.4
3+
_src_path: git@github.com:quantco/copier-template-pre-commit-mirrors
4+
description: This hook runs mypy.
5+
entry: mypy
6+
tool: mypy
7+
url: https://github.com/python/mypy

.github/dependabot.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ updates:
33
- package-ecosystem: github-actions
44
directory: /
55
schedule:
6-
interval: weekly
6+
interval: monthly
77
reviewers:
88
- quantco/ci
99
groups:

.github/workflows/autoupdate.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
name: Autoupdate
2+
23
on:
34
workflow_dispatch:
45
schedule:
5-
- cron: "0 */6 * * *"
6+
- cron: "0 0 * * 0"
67

78
defaults:
89
run:
@@ -16,11 +17,10 @@ jobs:
1617
steps:
1718
- name: Checkout branch
1819
uses: actions/checkout@v4
19-
with:
20-
ref: ${{ github.head_ref }}
2120
- name: Set up Conda env
22-
uses: mamba-org/provision-with-micromamba@3c96c0c27676490c63c18bc81f5c51895ac3e0e6
21+
uses: mamba-org/setup-micromamba@8767fb704bd78032e9392f0386bf46950bdd1194
2322
with:
23+
environment-file: environment.yml
2424
environment-name: check-env
2525
- name: Find latest version
2626
id: versions
@@ -31,8 +31,8 @@ jobs:
3131
new_version=$(micromamba list -n check-env "$pkgname" --json | jq -r '.[0].version')
3232
if [[ "$new_version" != "$old_version" ]]; then
3333
sed -i "s/$old_version/$new_version/g" environment.yml
34-
echo "pkgname=$pkgname" >> "$GITHUB_OUTPUT"
35-
echo "new-version=$new_version" >> "$GITHUB_OUTPUT"
34+
echo "pkgname=$pkgname" >> $GITHUB_OUTPUT
35+
echo "new-version=$new_version" >> $GITHUB_OUTPUT
3636
fi
3737
- uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38
3838
if: steps.versions.outputs.pkgname

.github/workflows/ci.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: CI
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77
pull_request:
88

99
jobs:
@@ -16,6 +16,7 @@ jobs:
1616
with:
1717
ref: ${{ github.head_ref }}
1818
- name: Set up Conda env
19-
uses: mamba-org/provision-with-micromamba@3c96c0c27676490c63c18bc81f5c51895ac3e0e6
19+
uses: mamba-org/setup-micromamba@8767fb704bd78032e9392f0386bf46950bdd1194
2020
with:
21+
environment-file: environment.yml
2122
environment-name: test-env

.github/workflows/keep-alive.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
name: Keep
22
on:
3-
# pull_request:
43
schedule:
5-
- cron: "0 6 * * SUN" # Once weekly on Sunday @ 0600 UTC
4+
- cron: 0 6 * * SUN
65

76
jobs:
87
keep-alive:
98
name: Alive
109
runs-on: ubuntu-latest
1110
steps:
1211
- uses: actions/checkout@v4
13-
- uses: gautamkrishnar/keepalive-workflow@60b13c92aeda855e493b83aaf482c25da7e0043b
12+
- uses: gautamkrishnar/keepalive-workflow@5b3128727d02fe1a892d0a2987517c9ec8ca7425
1413
with:
15-
commit_message: "Ah ah ah, stayin' alive"
14+
commit_message: Ah ah ah, stayin' alive
1615
committer_username: ForrestQuant
17-
committer_email: "forrestquant@users.noreply.github.com"
18-
time_elapsed: 50 # days
16+
committer_email: forrestquant@users.noreply.github.com
17+
time_elapsed: 50 # days

.github/workflows/tag.yml

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
branches:
66
- main
7-
- master
87

98
jobs:
109
tag:

.pre-commit-hooks.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
- id: mypy-conda
22
name: mypy-conda
3+
description: 'This hook runs mypy.'
34
entry: mypy
45
language: conda
5-
'types': [python]
6-
args: ["--ignore-missing-imports", "--scripts-are-modules"]
6+
types: [python]
7+
args: ['--ignore-missing-imports', '--scripts-are-modules']
78
require_serial: true
8-
additional_dependencies: []

LICENSE.txt LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2019 QuantCo, Inc.
1+
Copyright 2024 QuantCo, Inc.
22

33
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
44

README.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
1-
mypy(-conda) mirror
2-
===================
1+
# mypy mirror
32

43
Mirror of mypy for pre-commit with conda as a language.
54

6-
* For pre-commit: see https://github.com/pre-commit/pre-commit
7-
* For black: see https://github.com/python/mypy
5+
For pre-commit: see [here](https://github.com/pre-commit/pre-commit)
86

9-
### Using mypy with pre-commit and conda:
7+
For mypy: see [here](https://github.com/python/mypy)
8+
9+
## Using mypy with pre-commit and conda:
1010

1111
Add this to your `.pre-commit-config.yaml`
1212

1313
```yaml
14-
- repo: https://github.com/Quantco/pre-commit-mirrors-mypy
14+
- repo: https://github.com/quantco/pre-commit-mirrors-mypy
1515
rev: '' # Use the sha / tag you want to point at
1616
hooks:
1717
- id: mypy-conda
1818
```
19-

environment.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
channels:
22
- conda-forge
3+
- nodefaults
34
dependencies:
45
- mypy=1.8.0

0 commit comments

Comments
 (0)