Code Monkey home page Code Monkey logo

oclapi2's Introduction

oclapi2

The new and improved OCL terminology service v2

Dev Setup

  1. sysctl -w vm.max_map_count=262144 #required by Elasticsearch
  2. docker-compose up -d
  3. Go to http://localhost:8000/swagger/ to benefit.

Run Checks

(use the docker exec command in a service started with docker-compose up -d)

  1. Pylint (pep8):

    docker exec -it oclapi2_api_1 pylint -j2 core

    or

    docker-compose -f docker-compose.yml -f docker-compose.ci.yml run --rm api pylint -j0 core

  2. Coverage

    docker exec -it oclapi2_api_1 bash coverage.sh

    or

    docker-compose -f docker-compose.yml -f docker-compose.ci.yml run --rm api bash coverage.sh

  3. Tests

    docker exec -it oclapi2_api_1 python manage.py test --keepdb -v3

    or

    docker exec -it oclapi2_api_1 python manage.py test --keepdb -v3 -- core.sources.tests.tests.SourceTest

    or

    docker-compose -f docker-compose.yml -f docker-compose.ci.yml run --rm api python manage.py test --keepdb -v3

DB migrations

After modifying model you need to create migration files. Run:

docker-compose run --rm api python manage.py makemigrations

Make sure to commit newly created migration files.

Debugging

In order to debug tests or api you can use PDB. Set a breakpoint in code with:

import pdb; pdb.set_trace()

Run tests with:

docker-compose run --rm api python manage.py test core.code_systems --keepdb -v3

Run api with:

docker-compose run --rm --service-ports api

Release

Every build is a candidate for release.

In order to release please trigger the release build step in our CI. Please note that the maintenance version will be automatically increased after a successful release. It is desired only, if you are releasing the latest build and should be turned off by setting the increaseMaintenanceRelease variable to false on the Run stage "Release" popup in other cases.

A deployment release will be automatically created and pushed to the staging environment.

Major/minor version increase

In order to increase major/minor version you need to set the new version in core/__init__.py. Alongside you need to login to our CI and update the next release version on a deployment plan here with the same value.

Deployment

In order to deploy please trigger the deployment here. Please use an existing deployment release.

oclapi2's People

Contributors

snyaggarwal avatar openmrs-bot avatar rkorytkowski avatar dependabot[bot] avatar bmamlin avatar ibacher avatar paynejd avatar patrickcmd 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.