Merge modifications for more separate backend functions #69
| @@ -6,31 +6,31 @@ This repository contains the backend code for the application. It utilizes **Fas | |||||||
|  |  | ||||||
| ### Directory Structure | ### Directory Structure | ||||||
| - The code for the Python application is located in the `src` directory. | - The code for the Python application is located in the `src` directory. | ||||||
| - Package management is handled with **pipenv**, and the dependencies are listed in the `Pipfile`. | - Package management is handled with **uv**, and the dependencies are listed in the `pyproject.toml` file. | ||||||
| - Since the application is designed to be deployed in a container, the `Dockerfile` is provided to build the image. | - Since the application is designed to be deployed in a container, the `Dockerfile` is provided to build the image. | ||||||
|  |  | ||||||
| ### Setting Up the Development Environment | ### Setting Up the Development Environment | ||||||
|  |  | ||||||
| To set up your development environment using **pipenv**, follow these steps: | To set up your development environment using **uv**, follow these steps: | ||||||
|  |  | ||||||
| 1. Install `pipenv` by running: | 1. Make sure you find yourself in the `backend` directory: | ||||||
|     ```bash |     ```bash | ||||||
|     sudo apt install pipenv |     cd backend | ||||||
|     ``` |     ``` | ||||||
|  |  | ||||||
| 2. Create and activate a virtual environment: | 1. Install `uv` by running: | ||||||
|     ```bash |     ```bash | ||||||
|     pipenv shell |     curl -LsSf https://astral.sh/uv/install.sh | sh | ||||||
|     ``` |     ``` | ||||||
|  |  | ||||||
| 3. Install the dependencies listed in the `Pipfile`: | 3. Install the dependencies listed in `pyproject.toml` and create the virtual environment at the same time: | ||||||
|     ```bash |     ```bash | ||||||
|     pipenv install |     uv sync | ||||||
|     ``` |     ``` | ||||||
|  |  | ||||||
| 4. The virtual environment will be created under: | 4. The virtual environment will be created under: | ||||||
|     ```bash |     ```bash | ||||||
|     ~/.local/share/virtualenvs/... |     backend/.venv/... | ||||||
|     ``` |     ``` | ||||||
|  |  | ||||||
| ### Deployment | ### Deployment | ||||||
|   | |||||||
| @@ -28,6 +28,11 @@ This folder defines the commonly used data structures used within the project. T | |||||||
| ### src/tests | ### src/tests | ||||||
| This folder contains unit tests and test cases for the application's various modules. It is used to ensure the correctness and stability of the code. | This folder contains unit tests and test cases for the application's various modules. It is used to ensure the correctness and stability of the code. | ||||||
|  |  | ||||||
|  | Run the unit tests with the following command: | ||||||
|  | ```bash | ||||||
|  | uv run pytest src --log-cli-level=DEBUG --html=report.html --self-contained-html | ||||||
|  | ``` | ||||||
|  |  | ||||||
| ### src/utils | ### src/utils | ||||||
| The `utils` folder contains utility classes and functions that provide core functionality for the application. The main component in this folder is the `LandmarkManager`, which is central to the process of fetching and organizing landmarks. | The `utils` folder contains utility classes and functions that provide core functionality for the application. The main component in this folder is the `LandmarkManager`, which is central to the process of fetching and organizing landmarks. | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user