Skip to content

Commit

Permalink
Switch to pixi (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
timmens committed Jun 1, 2024
1 parent 3bed4b6 commit 009ba08
Show file tree
Hide file tree
Showing 17 changed files with 15,514 additions and 314 deletions.
24 changes: 0 additions & 24 deletions .envs/testenv.yml

This file was deleted.

11 changes: 11 additions & 0 deletions .github/depandabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly # or daily, weekly
groups:
dependencies:
patterns:
- '*'
43 changes: 24 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,35 @@ jobs:
- macos-latest
- windows-latest
python-version:
- '3.11'
- '3.12'
steps:
- uses: actions/checkout@v3
- name: create test environment
uses: mamba-org/setup-micromamba@v1
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.8.0
with:
environment-file: ./.envs/testenv.yml
environment-name: lcm
cache-environment: true
create-args: >-
python=${{ matrix.python-version }}
pixi-version: v0.23.0
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
environments: test-cpu
activate-environment: true
- name: Run pytest
shell: bash -l {0}
run: |
micromamba activate lcm
pytest --cov-report=xml --cov=./
run: pixi run -e test-cpu tests
- name: Upload coverage report
if: runner.os == 'Linux' && matrix.python-version == '3.11'
uses: codecov/codecov-action@v3
if: runner.os == 'Linux' && matrix.python-version == '3.12'
uses: codecov/codecov-action@v4
run-mypy:
name: Run mypy on Python 3.12
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.8.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
pixi-version: v0.23.0
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
environments: mypy
- name: Run mypy
shell: bash -l {0}
if: runner.os == 'Linux' && matrix.python-version == '3.11'
run: |-
micromamba activate lcm
mypy src
run: pixi run mypy
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,5 @@ venv.bak/


.pytask.sqlite3


src/lcm/_version.py
.pixi
27 changes: 14 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ repos:
rev: 1.16.0
hooks:
- id: yamlfix
- repo: local
hooks:
- id: check-nbqa-version-mismatch
name: Check for version mismatch between black, ruff, and nbQA
entry: python scripts/check_nbqa_version_mismatch.py
language: python
always_run: true
require_serial: true
additional_dependencies:
- pyyaml
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
Expand Down Expand Up @@ -49,13 +59,13 @@ repos:
rev: 24.4.2
hooks:
- id: black
language_version: python3.11
language_version: python3.12
- repo: https://github.com/asottile/blacken-docs
rev: 1.16.0
hooks:
- id: blacken-docs
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.4
rev: v0.4.6
hooks:
- id: ruff
# args:
Expand All @@ -65,10 +75,10 @@ repos:
hooks:
- id: nbqa-black
additional_dependencies:
- black==24.4.0
- black==24.4.2
- id: nbqa-ruff
additional_dependencies:
- ruff==v0.3.7
- ruff==v0.4.6
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.17
hooks:
Expand All @@ -80,14 +90,5 @@ repos:
- --wrap
- '88'
files: (README\.md)
- repo: https://github.com/mgedmin/check-manifest
rev: '0.49'
hooks:
- id: check-manifest
args:
- --no-build-isolation
additional_dependencies:
- setuptools-scm
- toml
ci:
autoupdate_schedule: monthly
34 changes: 0 additions & 34 deletions MANIFEST.in

This file was deleted.

10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,13 @@

This package aims to generalize and facilitate the specification, solution, and
estimation of dynamic choice models.

## Installation

`LCM` currently needs to be installed from GitHub and requires `jax` and `jaxlib`. If
you aim to run `LCM` on a GPU, you need to install `jaxlib` with CUDA support (for
Linux) or with support for AMD GPUs / ARM-based Silicon GPUs (for MacOS). In any case,
for installation of `jax` and `jaxlib`, please consult the `jax`
[docs](https://jax.readthedocs.io/en/latest/installation.html#supported-platforms).

> **Note:** We currently test GPU support for `LCM` only on Linux with CUDA 12.
20 changes: 0 additions & 20 deletions docs/Makefile

This file was deleted.

35 changes: 0 additions & 35 deletions docs/make.bat

This file was deleted.

Empty file removed docs/source/__init__.py
Empty file.
73 changes: 0 additions & 73 deletions docs/source/conf.py

This file was deleted.

15 changes: 0 additions & 15 deletions docs/source/index.rst

This file was deleted.

Loading

0 comments on commit 009ba08

Please sign in to comment.