Skip to content

Commit

Permalink
fix: fix venv issue in ci (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
jnussbaum authored Aug 8, 2024
1 parent 07bb809 commit e49bf77
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 19 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ jobs:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
make install-requirements
sudo apt-get install graphviz
- name: build graphviz figures
run: make graphvizfigures
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ jobs:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
make install-requirements
sudo apt-get install graphviz
- name: build graphviz figures
run: make graphvizfigures
Expand All @@ -36,4 +35,4 @@ jobs:
- name: Update OpenAPI docs
run: make openapi-update
- name: Build docs in strict mode
run: mkdocs build --strict --verbose
run: .venv/bin/mkdocs build --strict --verbose
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ deploy: ## build and publish docs to Github Pages with versioning from the relea

.PHONY: install-requirements
install-requirements: ## install requirements
test -d .venv || python3 -m venv .venv
.venv/bin/pip3 install --upgrade pip > /dev/null
.venv/bin/pip3 install -r requirements.txt > /dev/null

Expand Down
16 changes: 2 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,7 @@ make update-submodules

### Install Python packages in a virtual environment

Create a new virtual environment:

```shell
python3 -m venv .venv
source .venv/bin/activate
```

The virtual environment is now active,
as can be seen from the `(.venv)` at the beginning of the command line.
Install the required python packages by running
Install the required python packages (this will automatically create a virtual environment):

```shell
make install-requirements
Expand All @@ -134,10 +125,7 @@ make install-requirements

MkDocs comes with a built-in dev-server that lets you preview your documentation as you work on it.

Make sure that

- the virtual environment is active (`(.venv)` at the beginning of the command line)
- the submodules are up-to-date (run `make update-submodules`)
Make sure that the submodules are up-to-date (run `make init-submodules` and/or `make update-submodules`).

Then start the server with:

Expand Down

0 comments on commit e49bf77

Please sign in to comment.