From 7f5a16d6ef106c5aa750c0fe2d12558f043a393b Mon Sep 17 00:00:00 2001 From: Kevin Klein <7267523+kklein@users.noreply.github.com> Date: Tue, 18 Jun 2024 17:10:31 +0200 Subject: [PATCH] Add badges to readme and enable codecov (#14) --- .github/workflows/ci.yml | 9 ++++++++- CHANGELOG.rst | 5 +++++ README.md | 25 ++++++++++++------------- 3 files changed, 25 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 58caef9..58768de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,6 +24,7 @@ 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 @@ -45,7 +46,7 @@ jobs: run: mypy . unit-tests: - name: Unit Tests - ${{ matrix.os == 'ubuntu-latest-8core' && 'Linux' || 'Windows' }} - Python ${{ matrix.python-version }} + name: Unit Tests - ${{ matrix.os == 'ubuntu-latest' && 'Linux' || 'Windows' }} - Python ${{ matrix.python-version }} timeout-minutes: 30 runs-on: ${{ matrix.os }} strategy: @@ -76,3 +77,9 @@ jobs: with: 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 + if: matrix.python-version == '3.12' + uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + file: ./coverage.xml diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 88aeeef..259d800 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -7,6 +7,11 @@ Changelog ========= +0.4.2 (2024-06-18) +------------------ + +* Ship license file. + 0.4.1 (2024-06-18) ------------------ diff --git a/README.md b/README.md index 6a37ca2..cfb344f 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,23 @@ # metalearners +[![CI](https://github.com/Quantco/metalearners/actions/workflows/ci.yaml/badge.svg)](https://github.com/Quantco/metalearners/actions/workflows/ci.yaml) +[![Documentation Status](https://readthedocs.org/projects/metalearners/badge/?version=latest)](https://metalearners.readthedocs.io/en/latest/?badge=latest) +[![Conda-forge](https://img.shields.io/conda/vn/conda-forge/metalearners?logoColor=white&logo=conda-forge)](https://anaconda.org/conda-forge/metalearners) +[![PypiVersion](https://img.shields.io/pypi/v/metalearners.svg?logo=pypi&logoColor=white)](https://pypi.org/project/metalearners) +[![codecov.io](https://codecov.io/github/QuantCo/metalearners/coverage.svg?branch=main)](https://codecov.io/github/QuantCo/metalearners?branch=main) + MetaLearners for CATE estimation ## Installation -You can install the package in development mode using: +`metalearners` can either be installed via PyPI with ```bash -git clone https://github.com/quantco/metalearners -cd metalearners - -# create and activate a fresh environment named metalearners -# see environment.yml for details -micromamba create -f environment.yml -micromamba activate metalearners - -pre-commit install -pip install --no-build-isolation -e . +$ pip install metalearners ``` -## Credits +or via conda-forge with -Original implementation by @FrancescMartiEscofetQC and @kklein. +```bash +$ conda install metalearners -c conda-forge +```