GithubHelp home page GithubHelp logo

martinlupa / devops-minitwit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from devopsgroupc/minitwit

0.0 0.0 0.0 13.58 MB

This project is part of the course DevOps, Software Evolution and Software Maintenance, MSc (Spring 2024)

Shell 0.24% JavaScript 0.65% Ruby 6.21% Python 9.64% C# 67.82% CSS 4.44% HTML 10.35% Dockerfile 0.65%

devops-minitwit's Introduction


DevOps-GroupC

Table of Contents
  1. About The Project
  2. Running the project
  3. Acknowledgments

About The Project

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#.

Built With

  • .Net 8
  • ASP.NET
  • SQLite

Prerequisites

  • 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
  • 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_tool is a C program, you have to compile it again:
      • flag_tool includes sqlite3.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.

Usage

itu-minitwit

This project can be run using a terminal. cd into the correct folder:

cd itu-minitwit

Run using Python:

python minitwit.py

itu-minitwit tests

Tests for itu-minitwit can be run by opening a new terminal and cd into correct folder:

cd itu-minitwit

And running the tests using Pytest:

pytest minitwit_tests.py

At this point, the application can be accessed using the link provided in the terminal (http://127.0.0.1:5000).

csharp-minitwit

This project can be run using a terminal. cd into the correct folder:

cd csharp-minitwit

Run using dotnet:

dotnet run

Run using docker - runs only the app:

docker build -t csharp-minitwit .
docker run -p 5000:8080 csharp-minitwit

At 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

Monitoring

Service Endpoint
Built-in metrics http://localhost:5000/metrics
Prometheus http://localhost:9090
Grafana http://localhost:3000

csharp-minitwit tests

Tests for csharp-minitwit can be run by opening a new terminal and cd into the test folder:

cd csharp-minitwit/Tests

And running the tests using Pytest:

pytest refactored_minitwit_tests.py

Acknowledgments

Shout out to Chatgpt for help with debugging.

devops-minitwit's People

Contributors

ebrvc avatar mathias-gleitze avatar martinlupa avatar cefritu avatar licraux avatar aswesty avatar semantic-release-bot avatar github-actions[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.