Skip to content

igudesman/linkbrary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

133 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linkbrary Bot

made-with-python Tests Passing Telegram Bot GitHub license

Welcome to Linkbrary Bot project!

Want to collect all your links, articles and videos in one place for future reading? Try out Linkbrary!

Linkbrary helps you to collect links and videos you want to go through later in one place. As easy as sending link to the bot. Have time for reading? Just ask the bot - it will send you random link! Or specify topic, estimated time of difficulty to get what you want!

Table of Contents

Demo

til

Features

  • Universal link storage accessible from any platform
  • Automatic links tagging
  • Automatic time to read/view estimation
  • Getting random unread links

Technology Stack

  • TelegramAPI
  • Python
  • MongoDB

Project Glossary

  • Telegram Bot - automated dialogue system in Telegram that is able to connect user and backend service of the app.
  • Link Analyzer Tool - part of backend app service, which is able to: process links, get link’s text, determine features of a link’s text (topic, estimated time to read/view).
  • Link Classification Tool - trained machine learning model for topic classification task.
  • Links Database - database of links and custom tags assigned to them.

Project Architecture

Code Best Practices

  1. SOLID Principles:

    • Single Responsibility Principle

      The principle of single duty requires that one class does only one job. Thus, if a class has more than one job, it becomes dependent. Changing the behavior of one class job leads to a change in another. Link Analyzer is an example of such a class.

    • Liskov Substitution Principle

      The main idea behind the Liskov Substitution Principle is that for any class, the client should be able to use any subclass of the base class without noticing the difference between them, and therefore without any changes in the behavior of the program during execution. This means that the client is completely isolated and unaware of changes in the class hierarchy. For example, we used InvalidUrl, which inherits from BaseException and uses all its methods.

    • Interface Segregation Principle

      Create thin interfaces that are customer-centric. Clients should not depend on interfaces that they do not use. This principle eliminates the disadvantages of implementing large interfaces. An example in our project is the Analyzer interface.

  2. Using Linter:

We use Pylint that is a plugin of PyCharm. We have a small amount of warnings, which is fine; but a lot of conventions notice - this is due to tests and import issues that we did not manage to overcome. We will shortly try to conform all conventions practices so that our code looks nice.
  1. Using PyTest:

We set up PyTest with GitHub Actions (you can see badge above), and managed to provide very high coverage. Our next step in testing our product is setting up not only class tests, but interactions tests, where interaction with bot could be fully simulated. However, this requires some cloud environemnts setup and API keys safe management, which was out of this MVP scope.

Materials for SSAD Course

Credits

Innopolis University students, Data Science track:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages