Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nickpowersys committed Dec 12, 2024
1 parent 5be1306 commit 7e36fa6
Showing 1 changed file with 28 additions and 34 deletions.
62 changes: 28 additions & 34 deletions docs/contribute/01_environment.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,14 @@ for manager, params in managers.items():

| | Python 3.9 | Python 3.10 | Python 3.11 |
| -----------------------------------------: | :--------------------------: | :-----------------------: | :-----------------------: |
| | | | |
| **Linux** | {{< fa check >}}[^supported] | {{< fa check >}} | {{< fa check >}} |
| | | | |
| **Linux** | {{< fa check >}} | {{< fa check >}} | {{< fa check >}} |
| **macOS (x86_64)** | {{< fa check >}} | {{< fa check >}} | {{< fa check >}} |
| **macOS (arm64/M1/M2)** | {{< fa check >}} | {{< fa check >}} | {{< fa check >}} |
| **Windows** | {{< fa check >}} | {{< fa check >}} | {{< fa check >}} |

1. Git clone the project repository.

1. Install `Docker Desktop` for your platform.

1. [Install `VS Code`](https://code.visualstudio.com/)
Expand All @@ -203,53 +205,45 @@ for manager, params in managers.items():

1. If using an Apple Silicon Mac, virtualization may be fastest with Colima.
1. [Install `Colima`](https://github.com/abiosoft/colima)
2. To use colima for virtualization, `docker context use colima` or `export DOCKER_CONTEXT=colima`.
3. Verify that the Colima context is in effect with `docker context ls`.
4. Start Colima: `start colima`.
5. If you encounter disk resource issues after building images, `colima prune` or `colima delete` may be needed.
2. Verify that the disk allocation to Colima is satisfactory with `colima template --editor code`.
3. To use Colima for virtualization, `docker context use colima` or `export DOCKER_CONTEXT=colima`.
4. Verify that the Colima context is in effect with `docker context ls` (look for '*').
5. Start the Colima VM: `start colima`.
6. If you encounter disk resource issues after building images, `colima prune` or `colima delete` may be needed.

As an alternative to `Colima`, install Rosetta 2.

```sh
softwareupdate --install-rosetta
```

1. Build the .devcontainer image from the project directory. (*name:tag* values are flexible.)

```sh
docker build -f .devcontainer/Dockerfile . -t ibisproj:1
```

This will build an image for the build (host) platform by default.

1. Inspect the ID of the built image: `docker images` (see `IMAGE` column)

1. Launch a development container with `docker run -itd $IMAGE_ID bash`.
1. In `VS Code`, open the project directory.

1. In VS Code, open the project directory.
1. Menu options for working with devcontainers are available through the blue `'><'`
button, at the lower left corner of the project window.

1. Menu options for working with devcontainers are available through the blue `'><'` button with tooltip `'Open a Remote Window'`, at the lower left corner of the project window.
* Use `'Reopen the container'` to build an image and launch a container.
* Press any button to close the automatically launched terminal.
* Launch a new `VS Code` terminal from the main menu.
* The project will be in the container as an editable install with Ibis library,
dev and test dependencies installed, and with the working directory `/app`.

* Use `'Attach to Running Container'` then select the container.
* Other menu options, such as `'Reopen in Container'`, will give less control over naming and tagging.
* Containers continue to run until they are explicitly stopped. Use `docker ps -a` to see
their status.
1. Use `uv` commands such `uv pip list` to show the installed packages in the `uv`
.venv.

1. After pressing any button to close the automatically launched terminal, launch a new
`VS Code` terminal. The project will be in the container as an editable install,
with the working directory `/app`.

1. Use `uv` commands, such `uv pip list` to show the install packages within the `uv`
.venv. Run non-`uv` commands within the virtual environment using `uv run`, for
1. Run non-`uv` commands in the virtual environment using `uv run`, for
example `uv run pytest -m core`. Standard `git` commands are available without
`uv run` because they do not need packages in the .venv to work.

1. To exit a container, click the `'Dev Container'` button on the lower left of the
window and select the last menu option, `'Close Remote Connection'`.

1. To ensure you have the latest dependencies from the main branch, based on `pyproject.toml`,
exit any running container, and from your local copy of the repo,
`git pull origin main`. Reopen the project in a new container.
window and select the last menu option, `'Close Remote Connection'`. You can reopen
a container and any changes since the last session will persist.

1. To ensure you have the latest dependencies from the main branch based on
`pyproject.toml`, exit any running container. From your local copy of the repo,
`git pull origin main`. Reopen the project in a new container, then
`'Rebuild the Container'` to copy files from the local git repo and have the build
run `uv sync`.

## pip

Expand Down

0 comments on commit 7e36fa6

Please sign in to comment.