Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
6 changes: 1 addition & 5 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
{
"name": "xarray-dataclasses",
"image":"python:3.13",
"onCreateCommand": "pip install poetry==1.8.5",
"postCreateCommand": "poetry install",
"containerEnv": {
"POETRY_VIRTUALENVS_CREATE": "false"
},
"postCreateCommand": "pip install -e \".[dev]\" && npm install",
"customizations": {
"vscode": {
"extensions": [
Expand Down
12 changes: 6 additions & 6 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ Thank you for your contribution!

## Development environment

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

```shell
poetry install
pip install -e ".[dev]"
npm install
```

Expand All @@ -68,9 +68,9 @@ It is used for status checks when a pull request is created.
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).

```shell
poetry run pytest docs tests xarray_dataclasses
poetry run flake8 docs tests xarray_dataclasses
poetry run black --check docs tests xarray_dataclasses
pytest docs tests xarray_dataclasses
flake8 docs tests xarray_dataclasses
black --check docs tests xarray_dataclasses
npm run pyright docs tests xarray_dataclasses
```

Expand All @@ -95,7 +95,7 @@ When [a release is created][release], the workflow is triggered and the docs are
[issues]: https://github.com/astropenguin/xarray-dataclasses/issues?q=is%3Aissue
[napoleon-google]: https://www.sphinx-doc.org/en/master/usage/extensions/example_google.html#example-google
[nodejs]: https://nodejs.org/
[poetry]: https://python-poetry.org/
[pip]: https://pip.pypa.io/en/stable/
[pull-requests]: https://github.com/astropenguin/xarray-dataclasses/pulls?q=is%3Apr
[pypi]: https://pypi.org/project/xarray-dataclasses/
[pypi-workflow]: https://github.com/astropenguin/xarray-dataclasses/blob/main/.github/workflows/pypi.yml
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,15 @@ jobs:
job:
name: GitHub Pages
runs-on: ubuntu-latest
env:
POETRY_VIRTUALENVS_CREATE: false
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install project dependencies
run: pip install poetry && poetry install
run: pip install -e ".[dev]"
- name: Build docs
run: docs/build
run: python -m sphinx -b html docs docs/_build
- name: Deploy docs
uses: peaceiris/actions-gh-pages@v3
with:
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,16 @@ jobs:
name: PyPI
runs-on: ubuntu-latest
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v2
with:
python-version: "3.13"
- name: Install build and twine
run: pip install build twine
- name: Build package
run: python -m build
- name: Publish package to PyPI
run: pip install poetry==1.8.5 && poetry publish --build
run: twine upload dist/*
6 changes: 2 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:
job:
name: Test (Python ${{ matrix.python }})
runs-on: ubuntu-latest
env:
POETRY_VIRTUALENVS_CREATE: false
strategy:
fail-fast: false
matrix:
Expand All @@ -24,12 +22,12 @@ jobs:
with:
python-version: ${{ matrix.python }}
- name: Install project dependencies
run: pip install poetry==1.8.5 && poetry install
run: pip install -e ".[dev]"
- name: Test code's formatting (Black)
run: black --check docs tests xarray_dataclasses
- name: Test code's typing (Pyright)
run: pyright docs tests xarray_dataclasses
- name: Test code's execution (pytest)
run: pytest -v tests
- name: Test docs' building (Sphinx)
run: docs/build
run: python -m sphinx -b html docs docs/_build
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,6 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.idea/

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