Table of Contents
This project is part of the course DevOps, Software Evolution and Software Maintenance, MSc (Spring 2024)
The project currently consists of two folders:
- itu-minitwit, which is a small Twitter copy made in Python.
- csharp-minitwit, which is a ported version of itu-minitwit, made in C#.
- .Net 8
- ASP.NET
- SQLite
-
A modern Python, i.e., version >= 3.10,
- There are various ways of installing it, either via the system's package manager (
apt search python3) - manually from python.org
- via pyenv
- via Anaconda
- There are various ways of installing it, either via the system's package manager (
-
The Python dependencies from
itu-minitwit: -
A current C compiler, e.g.,
gcc- Likely it is already part of your Linux installation.
- You can check that, for example with:
gcc --version
- Since the
flag_toolis a C program, you have to compile it again:flag_toolincludessqlite3.h, which is likely not yet installed on your system.- It can be installed (together with the required shared library) via:
sudo apt install libsqlite3-dev
-
To work with the database, you likely need
sqlite3((apt search sqlite3))- To inspect the database file while refactoring, you might want to use a tool to "look into" your database file, such as the DB Browser for SQLite, which you can install via:
sudo apt install sqlitebrowser
-
The .NET 8.0 SDK. There are multiple options for downloading depending on your operating system. If on linux, we recommend the scripted install.
This project can be run using a terminal. cd into the correct folder:
cd itu-minitwitRun using Python:
python minitwit.pyTests for itu-minitwit can be run by opening a new terminal and cd into correct folder:
cd itu-minitwitAnd running the tests using Pytest:
pytest minitwit_tests.pyAt this point, the application can be accessed using the link provided in the terminal (http://127.0.0.1:5000).
This project can be run using a terminal. cd into the correct folder:
cd csharp-minitwitRun using dotnet:
dotnet runRun using docker - runs only the app:
docker build -t csharp-minitwit .
docker run -p 5000:8080 csharp-minitwitAt this point, the application can be accessed using the link provided in the terminal (http://localhost:5000). Furthermore, API documentation can be accessed at http://localhost:5000/swagger.
Run using docker-compose - runs multiple development services, such as Prometheus, Grafana, etc.:
docker-compose up| Service | Endpoint |
|---|---|
| Built-in metrics | http://localhost:5000/metrics |
| Prometheus | http://localhost:9090 |
| Grafana | http://localhost:3000 |
Tests for csharp-minitwit can be run by opening a new terminal and cd into the test folder:
cd csharp-minitwit/TestsAnd running the tests using Pytest:
pytest refactored_minitwit_tests.pyShout out to Chatgpt for help with debugging.