Git Product home page Git Product logo

oak-signs's Introduction

Oak Signs

python black wemake-python-styleguide pre-commit Checked with mypy Continuous Integration

๐Ÿ“ Table of Contents

๐Ÿง About

GraphQL application powered by FastAPI and Strawberry. Similarly to Shulker Box, this service uses Beanie as the ORM in front of MongoDB. The approach is a little different here, since the app does not expose a create endpoint, but instead it consumes events from the other microservices and creates the notifications.

๐Ÿ Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

To get started you need to have Docker installed and optionally Poetry, if you want to have virtual environment locally. All the needed commands are available via Makefile.

Installing

First, build the images.

make build

Then, you can just start the containers.

make up

After that, you should be able to see the output from the FastAPI server. It will be running on port 8004, so you can access the documentation via http://localhost:8004/api/docs.

๐ŸŽˆ Usage

There are also few useful commands to help manage the project.

If you have Poetry installed, you can run below command to have all the dependencies installed locally.

make install

In case you want to avoid installing anything locally, you can enter server container and run other commands from there.

make enter

๐Ÿ”ง Development

To make development smoother, this project supports pre-commit hooks for linting and code formatting along with pytest for testing. All the configs can be found in .pre-commit-config.yaml and pyproject.toml files.

To install the hooks, run the following command.

pre-commit install

Then you can use the following to run the hooks.

make lint

There is also a command for running tests.

make test

pytest is configured to clean the database after every test. Tests are also using different sessions to have a clean separation. You can check more fixtures in the conftest.py file, or the general configuration in the pytest.ini section.

oak-signs's People

Contributors

dependabot[bot] avatar tobias-piotr avatar

Stargazers

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