Skip to content

Commit

Permalink
migrate to copier template (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelzw authored Jan 29, 2024
1 parent be5de89 commit 3e30ab1
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 25 deletions.
6 changes: 6 additions & 0 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This file is managed by Copier; DO NOT EDIT OR REMOVE.
_commit: v0.1.0
_src_path: [email protected]:quantco/copier-template-pre-commit-mirrors
entry: pyright
tool: pyright
url: https://github.com/microsoft/pyright
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
interval: monthly
reviewers:
- quantco/ci
groups:
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/autoupdate.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Autoupdate

on:
workflow_dispatch:
schedule:
Expand All @@ -16,8 +17,6 @@ jobs:
steps:
- name: Checkout branch
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up Conda env
uses: mamba-org/setup-micromamba@e820223f89c8720d6c740ca154a7adf32fcd278a
with:
Expand All @@ -32,8 +31,8 @@ jobs:
new_version=$(micromamba list -n check-env "$pkgname" --json | jq -r '.[0].version')
if [[ "$new_version" != "$old_version" ]]; then
sed -i "s/$old_version/$new_version/g" environment.yml
echo "pkgname=$pkgname" >> "$GITHUB_OUTPUT"
echo "new-version=$new_version" >> "$GITHUB_OUTPUT"
echo "pkgname=$pkgname" >> $GITHUB_OUTPUT
echo "new-version=$new_version" >> $GITHUB_OUTPUT
fi
- uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38
if: steps.versions.outputs.pkgname
Expand All @@ -42,7 +41,7 @@ jobs:
title: "Update ${{ steps.versions.outputs.pkgname }} to ${{ steps.versions.outputs.new-version }}"
body: |
A new release of ${{ steps.versions.outputs.pkgname }} was detected on conda-forge.
This PR updates ${{ steps.versions.outputs.pkgname }} to version ${{ steps.versions.outputs.new-version }} and will push a tag on merge automatically.
branch: v${{ steps.versions.outputs.new-version }}
delete-branch: true
8 changes: 4 additions & 4 deletions .github/workflows/keep-alive.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Keep
on:
schedule:
- cron: "0 6 * * SUN" # Once weekly on Sunday @ 0600 UTC
- cron: 0 6 * * SUN

jobs:
keep-alive:
Expand All @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v4
- uses: gautamkrishnar/keepalive-workflow@60b13c92aeda855e493b83aaf482c25da7e0043b
with:
commit_message: "Ah ah ah, stayin' alive"
commit_message: Ah ah ah, stayin' alive
committer_username: ForrestQuant
committer_email: "[email protected]"
time_elapsed: 50 # days
committer_email: [email protected]
time_elapsed: 50 # days
18 changes: 9 additions & 9 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
- id: pyright-conda
name: pyright-conda
description: 'Python command line wrapper for pyright, a static type checker'
entry: pyright
language: conda
types: [python]
require_serial: true
additional_dependencies: []
minimum_pre_commit_version: '2.9.2'
- id: pyright-conda
name: pyright-conda
description: Python command line wrapper for pyright, a static type checker
entry: pyright
language: conda
types: [python]
require_serial: true
additional_dependencies: []
minimum_pre_commit_version: '2.9.2'
2 changes: 1 addition & 1 deletion LICENSE.txt → LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2023 QuantCo, Inc.
Copyright 2024 QuantCo, Inc.

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

Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
Pyright(-conda) mirror
======================
# pyright mirror

Mirror of pyright for pre-commit with conda as a language.

For pre-commit: see https://github.com/pre-commit/pre-commit For pyright: see https://github.com/microsoft/pyright
For pre-commit: see [here](https://github.com/pre-commit/pre-commit)

### Using pyright with pre-commit and conda:
For ansible-lint: see [here](https://github.com/microsoft/pyright)

## Using pyright with pre-commit and conda:

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

```yaml
- repo: https://github.com/Quantco/pre-commit-mirrors-pyright
- repo: https://github.com/quantco/pre-commit-mirrors-pyright
rev: '' # Use the sha / tag you want to point at
hooks:
- id: pyright-conda
Expand Down

0 comments on commit 3e30ab1

Please sign in to comment.