Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Prerequisites

Ask For Access And Branch Folder

Before start working, ask permission to access and clone the project Search API

https://source.digital.accenture.com/projects/ST/repos/search-api/browse

And the creation of a branch folder specific for your project, where you and your team will have complete freedom to create more branches, add, update and delete code.

Code Block
your-project/develop
your-project/main
your-project/features
your-project/release
Info
Why have a branch folder, in the same repository and not have my own repository? The branch folder is recommended to make synergy between the different project under development at the same time, features created on a project, may as well be used in another, all generic features are merge into the root develop branch, and from there can be distributed to other projects and user in future projects.

You still can have the code in another repository, but in that case we still recommend have the branch folder and synchronize changes, making the support of the project less invasive and the upgrade of the code, more fluid

Table of Contents

Download Python 

Download and install Python, currently version 3.11.2, except for windows which currently can manage 3.9.X due to a C compilation issue with a dependency


Info

The new backend of the Enterprise Search is built in Python, using Fast API, which allow us to maintain a structure like ExpressJs, but with a better understanding and on-the-fly documentation with Swagger UI and Redoc

You can see more about the features of Fast API here


Setup Environment

Clone and Set The Branch

Tip

Connection to Accenture's VPN is required

  1. Clone the project from the repository

    Code Block
    git clone https://source.digital.accenture.com/scm/st/search-api.git
  2. Verify the current brach executing the command below, it should be main

    Code Block
    git branch
    1. If the branch wasn't main, checkout the main branch:

      Code Block
      git checkout main
  3. Create a branch to work on, using the branch folder assigned <branch_folder>/develop (we recommend using develop as your working branch)

    Code Block
    git checkout -b <branch_folder>/develop

Create & Use A Virtual Environment

We recommend the creation of a virtual environment to prevent python dependencies conflicts, is also helpful if you have multiple versions of python in the same machine

 


Column
Code Block
python -m venv {name_of_your_venv}


or


Column
Code Block
`python3 -m venv {name_of_your_venv}


If you want to name you virtual environment test then the command would look like this

Code Block