Skip to content

heig-vd-ie/utility-functions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IE Utility Functions

API used to download data from swiss geo admin.

Step 1. Install pipx on wsl (if not installed)

sudo apt update
sudo apt install pipx
pipx ensurepath 
pipx ensurepath --force

Step 2. Install python 3.12 on wsl (if not installed)

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.12
sudo apt install python3.12-venv

Reference: Tutorial is the following link

Important

If psycopg-c installation raise the error: psycopg-c (3.1.18) not supporting PEP 517 builds

sudo apt install libpq-dev gcc
sudo apt install python3.12-dev

Step 4. Install Poetry (of not installed)

pipx install poetry

Step 5. Add direnv

5.1 Install direnv (if not installed)

sudo apt install direnv

5.2 Check which shell you use (bash advised)

echo $0

5.3 Add direnv hook in bash config file

nano ~/.bashrc

If you don't use bash, please check direnv doc.

At the end of the file add the following row:

eval "$(direnv hook bash)"

Step 5.4 Create .envrc file and add the following row

export PYTHONPATH=$(pwd)/src

Step 5.5 Allow terminal to use direnv

direnv allow

You can check if the environment variable has been created (it should return the src folder path).

echo $PYTHONPATH

Step 6.Create pyproject.toml file (if needed)

poetry init

Step 7. Create virtual environment (.venv)

python3.12 -m venv .venv
poetry env use .venv/bin/python3.12

Step 8. Install packages in .venv environement

poetry install

Step 9. Install Julia API

9.1 Download Julia (of not installed)

curl -fsSL https://install.julialang.org | sh

9.2 Open a Julia session of the current project

julia --project

9.3 Inside the opened Julia session, install the required packages specified in Project.toml

]
status
instantiate

About

Garthering of every usefull small functions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published