🏡 Cette application compare deux options d'investissement pour l'achat d'un bien immobilier utilisé comme résidence principale :
- Achat personnel avec les dividendes d'une SASU à l'IS.
- Achat via holding et SCI à l'IS, avec une SASU à l'IS comme société d'exploitation .
- Calculs financiers détaillés pour chaque option.
- Interface interactive avec Streamlit.
- Visualisations graphiques pour comparer les coûts.
🌐 Access the app and start your exploration now at @Not implemented yet.
- Anaconda or Miniconda: For easy environment management (optional)
- Docker (optional): To run the app in a containerized setup
- Python 3.12
This project uses Poetry for dependency management, which offers an option to create virtual environments directly. You have two choices to set up your environment:
Poetry can handle the creation and activation of a virtual environment automatically, without needing Conda or other virtual environment tools.
-
Clone the repository:
git clone https://github.com/LudovicGardy/the_project_name cd the_project_name
-
Install Dependencies and Create the Environment:
- Run the following command to let
poetry
create an isolated environment and install dependencies directly:poetry install --no-root
- Run the following command to let
-
Activate the Environment:
- Poetry automatically creates a virtual environment, but it may not activate it by default. Use the following command to activate it:
poetry shell
- Poetry automatically creates a virtual environment, but it may not activate it by default. Use the following command to activate it:
-
Run the Application:
streamlit run main.py
Using poetry install
to create and activate an environment directly is a streamlined approach, making Conda unnecessary. This can be ideal if you want a simple, Python-only virtual environment managed by poetry
.
If you prefer using Conda, follow these steps:
-
Clone the repository:
git clone https://github.com/LudovicGardy/the_project_name cd the_project_name
-
Create and Activate the Conda Environment:
- Using Conda (recommended):
conda create -n myenv python=3.11 conda activate myenv
- Using Conda (recommended):
-
Install Dependencies with Poetry:
- Once the environment is active, install dependencies within it:
poetry install --no-root
- Once the environment is active, install dependencies within it:
-
Run the Application:
streamlit run main.py
If you prefer to run the application in a containerized setup, use Docker.
-
Prepare Docker environment
- Ensure Docker is installed and running on your system.
-
Navigate to project directory
- For multiple containers:
cd [path-to-app-folder-containing-docker-compose.yml]
- For a single container:
cd [path-to-app-folder-containing-Dockerfile]
- For multiple containers:
-
Build the image (if does not already exit)
- For multiple containers:
docker-compose up --build
- For a single container:
docker build -t my-app-title .
- For multiple containers:
-
Run the containers
- For multiple containers:
docker run -p 8501:8501 my-app-title
- The application will be accessible at
http://localhost:8501
.
- For multiple containers:
-
Other notes
⚠️ If you encounter issues withpymssql
, adjust its version inrequirements.txt
or remove it before building the Docker image.⚠️ If you encounter issues withpyspark
, you might need to uninstall and reinstall it. Additionally, ensure that Java is installed and properly configured on your system, aspyspark
depends on Java. You can install Java by following the instructions on the official Java website. Make sure to set theJAVA_HOME
environment variable to point to your Java installation directory.
Poetry can also manage unit tests to help you verify that the application functions as expected. This project uses pytest for testing.
-
Add Testing Dependencies:
If
pytest
and other test dependencies are not yet added, include them using Poetry:poetry add --dev pytest
-
Writing Tests:
- Place your test files in a
tests
directory at the root of the project. - Name your test files following the pattern
test_*.py
.
- Place your test files in a
-
Running Tests:
To run tests within the Poetry environment, use:
poetry run pytest
Alternatively, if you are in an activated Poetry shell (
poetry shell
), you can simply run:pytest
-
Viewing Test Results:
- Test results will appear in the terminal, with a summary of passed, failed, and skipped tests.
- Use
pytest -v
for more detailed output.
- LinkedIn: Ludovic Gardy
- Website: https://www.sotisanalytics.com