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

New readme section : Requirements to build html page in virtual environments #443

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Python Virtual Environment
/venv
/env
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CAVEAT: there might be limits on using this (PyCharm) IDE in certain environments.

# PyCharm files
/.idea
# Rendered html files
Expand Down
43 changes: 41 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This is needed just for local render of documentation, so it can be checked befo
Requirements are in `build_requirements.txt`
Could be installed with: `pip install -r build_requirements.txt`

## Build
### Build

```
cd docs
Expand All @@ -20,7 +20,7 @@ cd docs
make clean
```

## Displaying the site locally
### Displaying the site locally

`docs/generated_docs/index.html` can be opened in a web browser, or alternatively you can use python's built-in http server:

Expand All @@ -32,3 +32,42 @@ python3 -m http.server
Then, navigate to http://localhost:8000

Alternatively, if you would like to auto refresh every time you run make, the documentation works with [httpwatcher](https://pypi.org/project/httpwatcher/).

## Requirements to build html page in virtual environments

```bash
# 1. install virtualenv (if needed)
python3 -m pip install --user virtualenv

# 2. clone this repository
git clone [email protected]:kokkos/kokkos-core-wiki.git
cd kokkos-core-wiki

# 3. create virtual environment
python3 -m venv env

# 4. activate virtual environment
source env/bin/activate

# 5. install doc requirements
python3 -m pip install -r build_requirements.txt

# 6. build
cd docs
make html

# 7. display
cd docs/generated_docs
python3 -m http.server
```

Usefull commands:
```bash
# list installed packages
python3 -m pip list

# leave virtual environment
deactivate
```

Source: https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/