Skip to content

Commit

Permalink
Update copier template to v0.11.1 (#62)
Browse files Browse the repository at this point in the history
Co-authored-by: quant-ranger[bot] <132915763+quant-ranger[bot]@users.noreply.github.com>
Co-authored-by: kklein </>
  • Loading branch information
quant-ranger[bot] authored May 6, 2024
1 parent 50c7dc8 commit 3c09dce
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 58 deletions.
5 changes: 0 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
<!--
Thank you for pull request.
Below are a few things we ask you kindly to self-check before getting a review. Remove checks that are not relevant.
-->

# Checklist

- [ ] Added a `CHANGELOG.rst` entry
32 changes: 26 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,35 @@ jobs:
fetch-depth: 0
- name: Run pre-commit-conda
uses: quantco/pre-commit-conda@v1
mypy-type-checks:
name: Mypy Type Checks
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Set up Conda env
uses: mamba-org/setup-micromamba@422500192359a097648154e8db4e39bdb6c6eed7
with:
condarc-file: .github/assets/.condarc
environment-file: environment.yml
cache-environment: true
- name: Install repository
run: python -m pip install --no-build-isolation --no-deps --disable-pip-version-check -e .
- name: Run mypy
run: mypy .

linux-unittests:
name: "Unit tests - Python ${{ matrix.PYTHON_VERSION }}"
unit-tests:
name: Unit Tests - ${{ matrix.os == 'ubuntu-latest-8core' && 'Linux' || 'Windows' }} - Python ${{ matrix.python-version }}
timeout-minutes: 30
runs-on: ubuntu-latest-8core
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
PYTHON_VERSION: ["3.10", "3.11", "3.12"]
os: [ubuntu-latest-8core]
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Checkout branch
uses: actions/checkout@v4
Expand All @@ -49,15 +69,15 @@ jobs:
environment-file: environment.yml
cache-environment: true
create-args: >-
python=${{ matrix.PYTHON_VERSION }}
python=${{ matrix.python-version }}
pytest-md
pytest-emoji
- name: Install repository
run: python -m pip install --no-build-isolation --no-deps --disable-pip-version-check -e .
- name: Run unittests
uses: quantco/pytest-action@v2
with:
report-title: "Unit tests Linux - Python ${{ matrix.PYTHON_VERSION }}"
report-title: Unit Tests - ${{ matrix.os == 'ubuntu-latest' && 'Linux' || 'Windows' }} - Python ${{ matrix.python-version }}
custom-arguments: --cov=metalearners --cov-report=xml --cov-report term-missing --color=yes
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
Expand Down
36 changes: 0 additions & 36 deletions .github/workflows/mypy.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ repos:
hooks:
- id: docformatter-conda
- repo: https://github.com/Quantco/pre-commit-mirrors-ruff
rev: 0.3.4
rev: 0.4.2
hooks:
- id: ruff-conda
- repo: https://github.com/Quantco/pre-commit-mirrors-black
rev: 24.3.0
rev: 24.4.2
hooks:
- id: black-conda
- repo: https://github.com/Quantco/pre-commit-mirrors-mypy
Expand All @@ -32,13 +32,13 @@ repos:
- id: prettier-conda
files: \.(md|yml|yaml)$
- repo: https://github.com/Quantco/pre-commit-mirrors-pre-commit-hooks
rev: 4.5.0
rev: 4.6.0
hooks:
- id: trailing-whitespace-conda
- id: end-of-file-fixer-conda
- id: check-merge-conflict-conda
args: ["--assume-in-merge"]
- repo: https://github.com/Quantco/pre-commit-mirrors-typos
rev: 1.19.0
rev: 1.20.10
hooks:
- id: typos-conda
11 changes: 6 additions & 5 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@ dependencies:
- pip
- python>=3.10
- setuptools-scm
- mypy=1.9.0
- setuptools>=61 # Adds support for pyproject.toml package declaration.
## Documentation
- setuptools >=61 # Adds support for pyproject.toml package declaration.
# Documentation
- make
- numpydoc
- sphinx
- sphinxcontrib-apidoc
- sphinx_rtd_theme
## Testing
- pytest>=6 # Adds --import-mode option
# Development
- mypy =1.9.0
# Testing
- pytest >=6 # Adds --import-mode option
- pytest-cov
## Numerical
# First version to add the return_indices parameter to cross_validate.
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ exclude = '''

[tool.ruff]
line-length = 88

[tool.ruff.lint]
ignore = [
"N803", # https://docs.astral.sh/ruff/rules/invalid-argument-name
Expand Down Expand Up @@ -79,4 +80,4 @@ testpaths = [
]

[tool.typos.default]
extend-ignore-re = ["HTE", "crace"]
extend-ignore-re = ["HTE", "crace", "(?Rm)^.*#\\s*spellchecker:disable-line$"]
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def mindset_data():
categorical_feature_columns = [
"ethnicity",
"gender",
"frst_in_family",
"frst_in_family", # spellchecker:disable-line
"school_urbanicity",
"schoolid",
]
Expand Down

0 comments on commit 3c09dce

Please sign in to comment.