Skip to content
This repository has been archived by the owner on Sep 30, 2019. It is now read-only.

EntryDSM/Hermes

Repository files navigation

Hermes

Python: 3.7 Code Style: Black Codacy Badge Build Status codecov Coverage Code Smells Duplicated Lines (%) Lines of Code Quality Gate Status Reliability Rating Maintainability Rating Technical Debt

Handles all EntryDSM user(admin, applicant) related functions on the EntryDSM platform

Getting Started

By follow these instructions, you can run and test hermes on your environment

configure pyenv

$ pyenv virtualenv 3.7.2 hermes

$ pyenv local hermes

$ pip install -r requirements.txt

$ pip install -r requirements_dev.txt

Running

For run this, you must configure some environment variables.

Let's configure. if you want to run in the pycharm, configure below environment variables to pycharm run setting. Run/Debug Configurations > Environment Variables

$ export VAULT_ADDR=vault.entrydsm.hs.kr

$ export GITHUB_TOKEN={{your read::org permission github token}}

$ export SERVICE_NAME=hermes

$ export RUN_ENV={{test or prod}}

Testing

hermes uses pytest.

NOTICE!

hermes uses pytest-mysql and pytest-redis. these extensions require executable for test setup(they are demonizing executable while testing).

so, you must install mysql(5.7) and redis executable.

For run the tests. you must install everything on requirements_dev.txt via pip.

after install every test requirements. just run this command.

$ pytest --cov=./hermes ./tests

There's probably no problem. but if you get trouble, follow the below instructions.

Cofigure test arguments

every configurations are in the pytest.ini

  • Known case I: pytest-mysql configuration(MacOS)

    you can see this part on the pytest.ini

    ;mysql_mysqld = /usr/local/opt/mysql@5.7/bin/mysqld
    ;mysql_mysqld_safe = /usr/local/opt/mysql@5.7/bin/mysqld_safe
    ;mysql_install_db = /usr/local/opt/mysql@5.7/bin/mysql_install_db
    ;mysql_admin = /usr/local/opt/mysql@5.7/bin/mysqladmin
    

    un-annotate this.

Stack

  • Sanic - A async web framework
  • marshmallow - A lightweight schema valiator
  • MySQL - Most popular RDBMS
  • Redis - In-memory DB for caching
  • Vault - Super secure secret backend
  • Travis CI - Hosted CI/CD pipeline
  • Docker - Most popular container platform

Versioning

{Major}.{Minor}.{Patch}

ex: 0.2.3

  • Major: without subcompatibility
  • Minor: with partial subcompatibility
  • Patch: with full subcompatibility

Maintainer

About

Handles all EntryDSM user(admin, applicant) related functions on the EntryDSM platform

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages