Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uv #26

Merged
merged 1 commit into from
Nov 27, 2024
Merged

uv #26

Show file tree
Hide file tree
Changes from all 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
7 changes: 3 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,11 @@ jobs:
- name: Install mkDocs
run: |
sudo apt-get install libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev
pip install pdm
pdm install
pdm run mkdocs build -d ./docs-output
pip install uv
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/opt/homebrew/lib/pkgconfig:$PKG_CONFIG_PATH"
export DYLD_LIBRARY_PATH="/usr/local/lib:/opt/homebrew/lib:$DYLD_LIBRARY_PATH"

uv sync
uv run mkdocs build -d ./docs-output
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@ This Repo is used to manage the official HOPE documentation

## Install

$ pdm install
$ pdm venv activate in-project
$ uv sync
$ uv build

#### Using .envrc

add in your .envrc

eval $(pdm venv activate in-project)
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/opt/homebrew/lib/pkgconfig:$PKG_CONFIG_PATH"
export DYLD_LIBRARY_PATH="/usr/local/lib:/opt/homebrew/lib:$DYLD_LIBRARY_PATH"
source .venv/bin/activate


#### Start
$ mkdocs build
Expand Down
2 changes: 1 addition & 1 deletion docs/components/hde/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ tags:

## Prerequisites

This project utilizes [PDM](https://pdm-project.org/) as the package manager for managing Python dependencies and environments.
This project utilizes [UV](https://docs.astral.sh/uv/) as the package manager for managing Python dependencies and environments.

To successfully set up and run this project, ensure that you have the following components in place:

Expand Down
13 changes: 6 additions & 7 deletions docs/guide-dev/tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Selenium tests run on the host machine.
This is due to the fact that Selenium does not currently support the ARM64 architecture for Linux Docker images.
This will require some more steps to be taken before running the tests.
### Prerequisites
- pdm
- uv

### Installation
1. **Services**
Expand All @@ -45,19 +45,18 @@ This will require some more steps to be taken before running the tests.

1. Install system requirements on MACOS:
`brew install wkhtmltopdf pango postgis gdal`
2. Crate virtualenvironment:
`pdm venv create`
2. Create virtualenvironment:
`uv venv .venv --python 3.12.0`
3. Register the created venv for the project with:
`pdm use`
`uv sync`
4. Activate your venv:
`eval $(pdm venv activate)`
`source .venv/bin/activate`
5. Check your environment:
eg. `$python --version` -> see that it uses Python 3.12.*
6. Install the packages:
`pdm sync --no-editable --no-self --no-isolation`
`uv build`
7. Run the tests:
```bash
source ./development_tools/local_selenium_init.sh`
python -m pytest -svvv tests/selenium --html-report=./report/report.html`
```

4 changes: 0 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,3 @@ dependencies = [
]
requires-python = "==3.12.*"
readme = "README.md"

[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
Loading