Giter VIP home page Giter VIP logo

yndx_sbd_enrll's Introduction

Yandex School of Backend Development enrollment

Architecture

In a root directory there are important for launch files:

  • Dockerfile & docker-compose.yaml (and compose files for testing)
  • requirements.txt (used libraries and their versions)
  • ignore files (.gitignore and .dockerignore)
  • README.md with instructions

Folder "tests" contains the following types of tests: end-to-end and unit. Also, in e2e there are another Dockerfile and requirements files for launching end-to-end tests.

Web_app has all server files in child directories with config.py file.

You also can see here the layers' division:

  • model/ is a folder with business domain model classes (model had been described due all OpenAPI specification file)
  • adapters/ contains special features for database interface
  • service/ is a service-layered functions which are connecting entrypoints with database
  • entrypoints/ the web-server itself: handlers of request's.

Launch

To run wep-app with PostgreSQL database you can launch Docker containers via Docker-compose

Use this command in your terminal (in case you launch Docker deamon under sudo access, be sure to startup your containers with the same rights):

docker-compose up --build

By default, on your machine you can access to web-server by http://127.0.0.1:8080

BUT hosted version for enrollment has 80 port instead 8080

Testing

All tests were made with pytest library

You can run unit tests, please use this command:

docker-compose -f docker-compose.yaml -f dc-unit-tests.yaml up --build --abort-on-container-exit

They cover the key functions:

  • Hand-made parser work
  • Method to_dict() of Node (OfferAndCategory) class
  • Creating node object form the json data (with validations)

You can run end-to-end tests, please use this command:

docker-compose -f docker-compose.yaml -f dc-e2e-tests.yaml up --build --abort-on-container-exit

It doesn't work correctly with slow connection speed They can also contain integration part of testing as well

Covered features are:

  • Import nodes (adding new and update exist)
  • Get node's information
  • Delete node (with children if they exist)
  • Get sales info
  • Get statistic about the node
  • Errors catching

Author - Kalashnikova Daria

Student in Innopolis University, 1st year bachelor

You can contact me on Telegram @ADari-Ka or by e-mail :)

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.