Skip to content

Commit 48804c4

Browse files
committed
migrate to copier template
1 parent 6f775cb commit 48804c4

8 files changed

+38
-47
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.2
3+
_src_path: git@github.com:quantco/copier-template-pre-commit-mirrors
4+
description: An opinionated code formatter
5+
entry: prettier
6+
tool: prettier
7+
url: https://github.com/prettier/prettier

.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@e820223f89c8720d6c740ca154a7adf32fcd278a
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

+2-1
Original file line numberDiff line numberDiff line change
@@ -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@e820223f89c8720d6c740ca154a7adf32fcd278a
2020
with:
21+
environment-file: environment.yml
2122
environment-name: test-env

.github/workflows/keep-alive.yml

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
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:
@@ -12,7 +11,7 @@ jobs:
1211
- uses: actions/checkout@v4
1312
- uses: gautamkrishnar/keepalive-workflow@60b13c92aeda855e493b83aaf482c25da7e0043b
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

LICENSE

+6-24
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,11 @@
1-
BSD 3-Clause License
1+
Copyright 2024 QuantCo, Inc.
22

3-
Copyright (c) 2021, QuantCo
4-
All rights reserved.
3+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
54

6-
Redistribution and use in source and binary forms, with or without
7-
modification, are permitted provided that the following conditions are met:
5+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
86

9-
1. Redistributions of source code must retain the above copyright notice, this
10-
list of conditions and the following disclaimer.
7+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
118

12-
2. Redistributions in binary form must reproduce the above copyright notice,
13-
this list of conditions and the following disclaimer in the documentation
14-
and/or other materials provided with the distribution.
9+
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
1510

16-
3. Neither the name of the copyright holder nor the names of its
17-
contributors may be used to endorse or promote products derived from
18-
this software without specific prior written permission.
19-
20-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
11+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
# prettier pre-commit hook
1+
# prettier mirror
22

3-
Hook for prettier with conda as a language.
3+
Mirror of prettier for pre-commit with conda as a language.
44

5-
- For pre-commit: see https://github.com/pre-commit/pre-commit
6-
- For prettier: see https://github.com/prettier/prettier
5+
For pre-commit: see [here](https://github.com/pre-commit/pre-commit)
76

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

10-
Add this to your `.pre-commit-config.yaml`:
9+
## Using prettier with pre-commit and conda:
10+
11+
Add this to your `.pre-commit-config.yaml`
1112

1213
```yaml
13-
- repo: https://github.com/Quantco/pre-commit-mirrors-prettier
14-
rev: "" # The git sha / tag you want to point to
15-
hooks:
16-
- id: prettier-conda
14+
- repo: https://github.com/quantco/pre-commit-mirrors-prettier
15+
rev: '' # Use the sha / tag you want to point at
16+
hooks:
17+
- id: prettier-conda
1718
```

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
- prettier=3.2.4

0 commit comments

Comments
 (0)