Skip to content

Commit 0370155

Browse files
authored
migrate to uv (#54)
1 parent 6c62ce9 commit 0370155

19 files changed

Lines changed: 188 additions & 1131 deletions

.github/workflows/build-doc.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ jobs:
1717
with:
1818
python-version: '3.11'
1919

20-
- name: Install pipenv
21-
run: |
22-
python -m pip install --upgrade pip
23-
pip install pipenv
24-
20+
- name: Install uv
21+
uses: astral-sh/setup-uv@v4
22+
with:
23+
version: "latest"
24+
2525
- name: Install dependencies
2626
run: |
27-
pipenv install --dev --system
27+
uv sync --dev
2828
2929
- name: Build documentation
3030
run: |
3131
cd docs
32-
make html
32+
uv run make html
3333
3434
- name: Deploy to GitHub Pages
3535
uses: peaceiris/actions-gh-pages@v4

.github/workflows/build.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,19 @@ jobs:
2222
with:
2323
python-version: ${{ matrix.python-version }}
2424

25+
- name: Install uv
26+
uses: astral-sh/setup-uv@v4
27+
with:
28+
version: "latest"
29+
2530
- name: Install dependencies
2631
run: |
27-
python -m pip install --upgrade pip
28-
pip install .
29-
pip install -r requirements-dev.txt
32+
uv sync --dev
3033
3134
- name: Lint with ruff
3235
run: |
33-
ruff check .
36+
uv run ruff check .
3437
3538
- name: Run unit tests
3639
run: |
37-
python -m unittest
40+
uv run python -m unittest

.github/workflows/publish.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,19 @@ jobs:
1717
with:
1818
python-version: '3.11'
1919

20-
- name: Install dependencies
20+
- name: Install uv
21+
uses: astral-sh/setup-uv@v4
22+
with:
23+
version: "latest"
24+
25+
- name: Install build dependencies
2126
run: |
22-
python -m pip install --upgrade pip
23-
pip install build twine
27+
uv tool install build
28+
uv tool install twine
2429
2530
- name: Build package
2631
run: |
27-
python -m build
32+
uv run python -m build
2833
2934
- name: Publish package to PyPI
3035
env:

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,4 +168,4 @@ cython_debug/
168168

169169
# Used for experiments
170170
*.csv
171-
experiments
171+
experiments

CONTRIBUTING.md

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,29 +28,38 @@ Pull requests are welcome! If you plan to make significant changes, please open
2828
- Open a pull request in the original repository.
2929

3030
## Development
31-
Important commands and major dependencies are managed in Pipenv. Here are the basic commands you can use to develop this package.
31+
Important commands and major dependencies are managed with uv. Here are the basic commands you can use to develop this package.
3232

33-
### Install Pipenv
34-
If you don't have `pipenv` installed, you can install it using `pip`:
33+
### Install Dependencies
34+
Install all development dependencies using uv:
3535

3636
```sh
37-
pip install pipenv
37+
uv sync --dev
3838
```
3939

40-
### Linting
41-
We use `ruff` for linting the code. To run the linter, use the following command:
40+
### Pre-commit Hooks
41+
We use pre-commit hooks to automatically format code and check for issues. Install them with:
42+
43+
```sh
44+
uv run pre-commit install
45+
```
46+
47+
### Manual Commands
48+
49+
#### Linting
50+
We use `ruff` for linting the code. To run the linter manually:
4251
```sh
43-
pipenv run lint
52+
uv run ruff check
4453
```
4554

46-
### Auto format
47-
We use `ruff` for formatting the code. To run the formatter, use the following command:
55+
#### Auto format
56+
We use `ruff` for formatting the code. To run the formatter manually:
4857
```sh
49-
pipenv run format
58+
uv run ruff format
5059
```
5160

52-
### Unit test
53-
We use `unittest` for testing the code. To run the unit tests, use the following command:
61+
#### Unit test
62+
We use `unittest` for testing the code. To run the unit tests:
5463
```sh
55-
pipenv run unittest
56-
```
64+
uv run python -m unittest
65+
```

Pipfile

Lines changed: 0 additions & 25 deletions
This file was deleted.

Pipfile.lock

Lines changed: 0 additions & 1027 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ We welcome contributions to the project! Please review our [Contribution Guide](
2828
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
2929

3030
## Maintainers
31-
- [Tomu Hirata](https://github.com/TomeHirata)
31+
- [Tomu Hirata](https://github.com/TomeHirata)

docs/source/api/local.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ AdjustedLocalDistributionEstimator
1919
:members:
2020
:undoc-members:
2121
:show-inheritance:
22-
:no-index:
22+
:no-index:

docs/source/api/plot.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ This page documents plotting utilities for visualizing distribution treatment ef
77
:members:
88
:undoc-members:
99
:show-inheritance:
10-
:no-index:
10+
:no-index:

0 commit comments

Comments
 (0)