Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to pixi #74

Merged
merged 31 commits into from
Jun 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
3b5533e
Switch to pixi
timmens May 18, 2024
2a35bd0
Fix pixi lockfile
timmens May 18, 2024
e660daa
Fix CI?
timmens May 19, 2024
dc731ef
Update pixi.lock
timmens May 19, 2024
1d84dcd
Update pyproject.toml
timmens May 19, 2024
2f8b73e
Update pixi.lock
timmens May 19, 2024
942670e
Update pixi environment and GitHub CI
timmens May 29, 2024
42b5c48
Merge branch 'main' into pixi
timmens May 29, 2024
d0c1181
Restrict scipy and fix broken GH-CI task
timmens May 29, 2024
8efc514
Fix pixi lockfile
timmens May 29, 2024
74e0500
Update pyproject
timmens May 29, 2024
c558577
Update lockfile
timmens May 29, 2024
bf92eeb
Delete .envs, environment.yml; Update README.md
timmens May 29, 2024
03e58b9
Move to hatch build system and remove MANIFEST.in
timmens May 31, 2024
b9de78e
Update black and ruff version for nbqa
timmens May 31, 2024
dfe8fc4
Add custom pre-commit hook to check for version mismatch with nbQA
timmens May 31, 2024
36a4c5e
Add custom pre-commit hook to check for version mismatch with nbQA
timmens May 31, 2024
3337043
Update README.md
timmens May 31, 2024
d83ffca
Changes
timmens May 31, 2024
6b50ac0
Changes
timmens May 31, 2024
b312a97
Remove Windows from pixi
timmens May 31, 2024
febe2ec
Fix environment
timmens May 31, 2024
724f12c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 31, 2024
083f951
Fix CI
timmens May 31, 2024
279c4ca
Merge branch 'pixi' of https://github.com/OpenSourceEconomics/lcm int…
timmens May 31, 2024
9be911d
Fix README because mdformat does not understand GitHub Markdown flavor
timmens May 31, 2024
1d22893
Fix mypy CI error?
timmens May 31, 2024
13748cc
Update lockfile
timmens May 31, 2024
acb73c0
Use pixi run -e test-cpu tests in CI
timmens May 31, 2024
2a1d6a0
Beautify a few things
timmens May 31, 2024
5941f9d
Merge branch 'main' into pixi
timmens Jun 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
timmens marked this conversation as resolved.
Show resolved Hide resolved
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
Loading