Skip to content

Commit

Permalink
Migrates from Poetry to uv
Browse files Browse the repository at this point in the history
  • Loading branch information
cuducos committed Sep 5, 2024
1 parent 9bfd529 commit 63374f5
Show file tree
Hide file tree
Showing 6 changed files with 314 additions and 387 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,5 @@ jobs:
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
python -m venv .venv/
.venv/bin/pip install poetry
- name: Install dependencies
run: |
.venv/bin/pip install --upgrade pip
.venv/bin/poetry install
- name: Run tox
run: .venv/bin/poetry run tox -e py${{ matrix.python-version }}-django${{ matrix.django-version }}
- uses: astral-sh/setup-uv@v2
- run: uv run tox -e py${{ matrix.python-version }}-django${{ matrix.django-version }}
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,19 @@ A public and read-only version of the [Django Admin](https://docs.djangoproject.

## Contributing

We use `tox` to Run tests with different Python ad Django versions. Also we use [Ruff](https://astral.sh/ruff) integrated with the tests (including format checks and linters):
We use [`uv`](https://docs.astral.sh/uv/) packaghe manager and `tox` to run tests with different Python ad Django versions. Also we use [Ruff](https://astral.sh/ruff) integrated with the tests (including format checks and linters):

```console
$ poetry install
$ poetry run tox
$ uv run tox
```

### Docs

To build the docs we use [Sphinx](https://www.sphinx-doc.org/en/):

```
$ poetry run pip install docs/requirements.txt
$ poetry run sphinx-build docs docs/_build/
$ uv run pip install -r docs/requirements.txt
$ uv run sphinx-build docs docs/_build/
```

Them just jump to `docs/_build/index.html`.
Expand Down
9 changes: 4 additions & 5 deletions docs/example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,24 @@ Requirements
------------

* Git
* Python 3.9 or newer with `Poetry <https://python-poetry.org>`_
* `uv <>https://docs.astral.sh/uv/`_

Running the example
-------------------

First, clone the repository and install the dependencies:
First, clone the repository:

::

git clone https://github.com/cuducos/django-public-admin.git
poetry install

Then start the application:

::

poetry run python example/manage.py runexample
uv run python example/manage.py runexample

The ``runexample`` command is a wrapper around Django's native ``runserver``. It creates a temporary SQLite database, run migrations, creates a superuser, and collects static files *automagically* before spinning up the development server. If you are having trouble with this command, you can try to delete all these temporary files with ``poetry run python manage.py cleanexample``.
The ``runexample`` command is a wrapper around Django's native ``runserver``. It creates a temporary SQLite database, run migrations, creates a superuser, and collects static files *automagically* before spinning up the development server. If you are having trouble with this command, you can try to delete all these temporary files with ``uv run python manage.py cleanexample``.

Once the application is up and running, you can:

Expand Down
Loading

0 comments on commit 63374f5

Please sign in to comment.