Skip to content

Shell files capable of automating the creation of data science projects. Some tutorials are provided.

License

Notifications You must be signed in to change notification settings

mtxslv/automating_ai_projects

Repository files navigation

automating_ai_projects

Shell files capable of automating the creation of data science projects. Some tutorials are provided.

If you are on Windows and have to work with an Ubuntu project you'll need to use Windows Subsystem for Linux. This tutorial will guide you to set up pyenv and poetry semi-automatically. It assumes you already installed VSCode and Git Bash and have your project locally available.

In order to download Windows Subsystem for Linux, do the following:

  1. Open powershell in adm mode;
  2. Type and run wsl --install -d Ubuntu;
  3. Once installed, choose login and password for the sub-system;

Now you will have to connect WSL-Ubuntu to VSCode:

  1. Install the Remote Development in your VSCode, by using VSCode's Extensions;
  2. Go into your project folder, and on the path (top part of the window), type: powershell;
  3. In the shell window type wsl (notice the shell changes);
  4. Type code . (the VS Code Server will be installed the first time you run this);

In this moment your WSL-Ubuntu is correctly connected to VSCode (notice the message at the bottom left green box). Now you need to configure the Ubuntu for your project (that is, installing python, pyenv and poetry). Luckly you don't need to do it by hand, since there are some shell scripts that do the job for you.

  1. Put the shell scripts in you project's folder;
  2. Change the selected end of line sequence in VSCode to 'LF' so the shell file will be executed correctly;
  3. Run the pyenv instalation script by running ./install_pyenv.sh (this installs pyenv for you).
  4. Once the install_pyenv.sh script stops, run pyenv install 3.9.10;
  5. Make your python version global by running pyenv global 3.9.10;
  6. Close the terminal and run the poetry installation script ./install_poetry.sh (this installs poetry for you);

Now you just need to install/create your poetry project:

  1. After closing the previous shell and opening another one, run install_project.sh. If you prefer, you can iteratively create a brand-new, fresh project with create_default_project.sh.

OBS: In case you are not happy with the software and decide to try something different, and it is necessary to uninstall poetry and pyenv, you can do the following:

Happy coding! ;)

Notes on Ubuntu installation

  • Make sure you have curl installed in your machine before running the first script. In case you don't have it, you can install using sudo apt install curl;
  • Make sure you have git installed in your machine before running the first script. Actually, in a Ubuntu machine you don't have to install Git Bash. Installing git only is enough. Here is some guide on installing git on Ubuntu;
  • Once pyenv is installed, it was necessary to install Tkinter in order to install Python using pyenv. Following PaulMest answer to this StackOverFlow question, you must run: $ sudo apt-get install python-tk python3-tk tk-dev.
  • Once pyenv is installed, it may be more comfortable to have pyenv to load automatically. At the end, it means it won't be [encher teu terminal de comando] everytime you open it. To do so, you must append the following lines to ~/.bash_profile if it exists, or to ~/.profile:
export PYENV_ROOT="$HOME/.pyenv" 
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)" 

About

Shell files capable of automating the creation of data science projects. Some tutorials are provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages