Skip to content

Commit 44aac00

Browse files
committed
move to src, use pixi, adjust xarray dependency
1 parent 5506e35 commit 44aac00

File tree

16 files changed

+3000
-1630
lines changed

16 files changed

+3000
-1630
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
{
22
"name": "xarray-dataclasses",
33
"image":"python:3.13",
4-
"onCreateCommand": "pip install poetry==1.8.5",
5-
"postCreateCommand": "poetry install",
6-
"containerEnv": {
7-
"POETRY_VIRTUALENVS_CREATE": "false"
8-
},
4+
"postCreateCommand": "pip install -e \".[dev]\" && npm install",
95
"customizations": {
106
"vscode": {
117
"extensions": [

.github/CONTRIBUTING.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ Thank you for your contribution!
5151

5252
## Development environment
5353

54-
We manage the development environment (i.e., Python and JavaScript and their dependencies) with [Poetry][poetry] and [Node.js][nodejs].
54+
We manage the development environment (i.e., Python and JavaScript and their dependencies) with [pip][pip] and [Node.js][nodejs].
5555
After cloning the repository you forked, you can setup the environment by the following command.
5656

5757
```shell
58-
poetry install
58+
pip install -e ".[dev]"
5959
npm install
6060
```
6161

@@ -68,9 +68,9 @@ It is used for status checks when a pull request is created.
6868
If you would like to check them in local, the following commands are almost equivalent (the difference is that the workflow is run under multiple Python versions).
6969

7070
```shell
71-
poetry run pytest docs tests xarray_dataclasses
72-
poetry run flake8 docs tests xarray_dataclasses
73-
poetry run black --check docs tests xarray_dataclasses
71+
pytest docs tests xarray_dataclasses
72+
flake8 docs tests xarray_dataclasses
73+
black --check docs tests xarray_dataclasses
7474
npm run pyright docs tests xarray_dataclasses
7575
```
7676

@@ -95,7 +95,7 @@ When [a release is created][release], the workflow is triggered and the docs are
9595
[issues]: https://github.com/astropenguin/xarray-dataclasses/issues?q=is%3Aissue
9696
[napoleon-google]: https://www.sphinx-doc.org/en/master/usage/extensions/example_google.html#example-google
9797
[nodejs]: https://nodejs.org/
98-
[poetry]: https://python-poetry.org/
98+
[pip]: https://pip.pypa.io/en/stable/
9999
[pull-requests]: https://github.com/astropenguin/xarray-dataclasses/pulls?q=is%3Apr
100100
[pypi]: https://pypi.org/project/xarray-dataclasses/
101101
[pypi-workflow]: https://github.com/astropenguin/xarray-dataclasses/blob/main/.github/workflows/pypi.yml

.github/workflows/gh-pages.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,15 @@ jobs:
99
job:
1010
name: GitHub Pages
1111
runs-on: ubuntu-latest
12-
env:
13-
POETRY_VIRTUALENVS_CREATE: false
1412
steps:
1513
- uses: actions/checkout@v4
1614
- uses: actions/setup-python@v5
1715
with:
1816
python-version: "3.13"
1917
- name: Install project dependencies
20-
run: pip install poetry && poetry install
18+
run: pip install -e ".[dev]"
2119
- name: Build docs
22-
run: docs/build
20+
run: python -m sphinx -b html docs docs/_build
2321
- name: Deploy docs
2422
uses: peaceiris/actions-gh-pages@v3
2523
with:

.github/workflows/pypi.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,16 @@ jobs:
1010
name: PyPI
1111
runs-on: ubuntu-latest
1212
env:
13-
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
13+
TWINE_USERNAME: __token__
14+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
1415
steps:
1516
- uses: actions/checkout@v4
1617
- uses: actions/setup-python@v2
1718
with:
1819
python-version: "3.13"
20+
- name: Install build and twine
21+
run: pip install build twine
22+
- name: Build package
23+
run: python -m build
1924
- name: Publish package to PyPI
20-
run: pip install poetry==1.8.5 && poetry publish --build
25+
run: twine upload dist/*

.github/workflows/tests.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ jobs:
1212
job:
1313
name: Test (Python ${{ matrix.python }})
1414
runs-on: ubuntu-latest
15-
env:
16-
POETRY_VIRTUALENVS_CREATE: false
1715
strategy:
1816
fail-fast: false
1917
matrix:
@@ -24,12 +22,12 @@ jobs:
2422
with:
2523
python-version: ${{ matrix.python }}
2624
- name: Install project dependencies
27-
run: pip install poetry==1.8.5 && poetry install
25+
run: pip install -e ".[dev]"
2826
- name: Test code's formatting (Black)
2927
run: black --check docs tests xarray_dataclasses
3028
- name: Test code's typing (Pyright)
3129
run: pyright docs tests xarray_dataclasses
3230
- name: Test code's execution (pytest)
3331
run: pytest -v tests
3432
- name: Test docs' building (Sphinx)
35-
run: docs/build
33+
run: python -m sphinx -b html docs docs/_build

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,6 @@ cython_debug/
162162
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
163163
# and can be added to the global gitignore or merged into this file. For a more nuclear
164164
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
165-
#.idea/
165+
.idea/
166166

167167
# End of https://www.toptal.com/developers/gitignore/api/python

0 commit comments

Comments
 (0)