Skip to content

Commit

Permalink
Adding numpy to requirements. Adding Python 3.10 venv to makefile. Up…
Browse files Browse the repository at this point in the history
…dating install instructions in readme.
  • Loading branch information
Biological Compatibility Benchmarks committed Dec 9, 2024
1 parent 745fae5 commit 1a773a8
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 8 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ run-pipeline: ## run pipeline
venv: ## create virtual environment
@if [ ! -f "$(VENV)/bin/activate" ]; then python3 -m venv $(VENV) ; fi;

venv-310: ## create virtual environment
@if [ ! -f "$(VENV)/bin/activate" ]; then python3.10 -m venv $(VENV) ; fi;

clean-venv: ## remove virtual environment
if [ -d $(VENV) ]; then rm -r $(VENV) ; fi;

Expand Down
49 changes: 41 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,49 @@ The project installation is managed via `make` and `pip`. Please see the
respective commanads in the `Makefile`. To setup the environment follow these
steps:

0. Install CPython from python.org. The code is tested with Python version 3.10.10
1. Create a virtual python environment: `make venv`
2. Activate the environment: `source venv_aintelope/bin/activate`
3. Install dependencies: `make install`
1. Install CPython from python.org. The code is tested with Python version 3.10.10

For development and testing follow (active environment):
Under Linux, run the following commands:

`sudo add-apt-repository ppa:deadsnakes/ppa`
<br>`sudo apt update`
<br>`sudo apt install python3.10 python3.10-dev python3.10-venv`
<br>`sudo curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10`

2. Get the code from repo:

`sudo apt install git-all`
<br>`git clone [email protected]:aintelope/biological-compatibility-benchmarks.git`

3. Create a virtual python environment:

`make venv-310`
<br>`source venv_aintelope/bin/activate`

4. Install dependencies:

`sudo apt update`
<br>`sudo apt install build-essential`
<br>`sudo apt install curl`
<br>`make install`
<br>*ignore warning about ai_safety_gridworlds*

5. If you use VSCode, then set up your launch configurations file:

`cp .vscode/launch.json.template .vscode/launch.json`

Edit the launch.json so that the PYTHONPATH variable points to the folder where you downloaded the repo and installed virtual environment:

replace all
<br>//"PYTHONPATH": "your_path_here"
<br>with
<br>"PYTHONPATH": "your_local_repo_path"

6. For development and testing:

* Install development dependencies: `make install-dev`
* Run tests: `make tests-local`

1. Install development dependencies: `make install-dev`
2. Install project locally: `make build-local`
3. Run tests: `make tests-local`

### Code formatting and style

Expand Down
1 change: 1 addition & 0 deletions requirements/api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ flatten-dict==0.4.2
gymnasium==0.29.1
hydra-core==1.3.0
matplotlib==3.7.0
numpy==1.26.4
pandas==1.5.3
PettingZoo==1.24.1
posix-ipc==1.1.1; platform_system != "Windows"
Expand Down

0 comments on commit 1a773a8

Please sign in to comment.