Skip to content

Commit 1968502

Browse files
authored
migrate to copier template (#23)
1 parent 6048d89 commit 1968502

9 files changed

+43
-17
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.1
3+
_src_path: git@github.com:quantco/copier-template-pre-commit-mirrors
4+
description: Check for common security issues.
5+
entry: bandit
6+
tool: bandit
7+
url: https://github.com/PyCQA/bandit

.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

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Keep
2+
on:
3+
schedule:
4+
- cron: 0 6 * * SUN
5+
6+
jobs:
7+
keep-alive:
8+
name: Alive
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: gautamkrishnar/keepalive-workflow@60b13c92aeda855e493b83aaf482c25da7e0043b
13+
with:
14+
commit_message: Ah ah ah, stayin' alive
15+
committer_username: ForrestQuant
16+
committer_email: forrestquant@users.noreply.github.com
17+
time_elapsed: 50 # days

.pre-commit-hooks.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
- id: bandit-conda
22
name: bandit-conda
3+
description: Check for common security issues.
34
entry: bandit
45
language: conda
5-
description: Check for common security issues.
6-
'types': [python]
6+
types: [python]

LICENSE.txt LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2022 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-6
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
bandit(-conda) mirror
2-
========================
1+
# bandit mirror
32

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

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

9-
### Using bandit with pre-commit and conda:
7+
For ansible-lint: see [here](https://github.com/PyCQA/bandit)
8+
9+
## Using bandit 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-bandit
14+
- repo: https://github.com/quantco/pre-commit-mirrors-bandit
1515
rev: '' # Use the sha / tag you want to point at
1616
hooks:
1717
- id: bandit-conda

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
- bandit=1.7.7

0 commit comments

Comments
 (0)