Skip to content

Andresgarciasch/apiv2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


BreatheCode
BreatheCode

BreatheCode's mission is to accelerate the way junior developers learn and evolve using technology.

Coveralls Docker Hub Linter Test Test

Documentation

You can find the development documentation on the website.

Check out the Postman docs, Swagger or Redoc.

The documentation is divided into several sections:

Working inside Gitpod (no installation)

How to work Gitpod

Creating a workspace is as easy as prefixing any GitHub URL with gitpod.io/#.

Add the browser extension

Gitpod provide the extension for:

  • Chrome - also works for Edge, Brave and other Chromium-based browsers.
  • Firefox

How to use Gitpod browser extension

For convenience, Gitpod developed a Gitpod browser extension. It adds a button to GitHub, GitLab or Bitbucket that does the prefixing for you - as simple as that.

How to use gitpod extension

Working inside Docker (easier)

Build BreatheCode Dev docker image

For mac and pc users install docker desktop, else, for linux find a guide to install Docker and Docker Compose in your linux distribution uname -a.

# Check which dependencies you need install in you operating system
python -m scripts.doctor

# Generate the BreatheCode Dev docker image
docker-compose build bc-dev

Testing inside BreatheCode Dev

# Open the BreatheCode Dev, this shell don't export the port 8000
docker-compose run bc-dev fish

# Testing
pipenv run test ./breathecode/activity  # path

# Testing in parallel
pipenv run ptest ./breathecode/activity  # path

# Coverage
pipenv run cov breathecode.activity  # python module path

# Coverage in parallel
pipenv run pcov breathecode.activity  # python module path

Run BreatheCode API as docker service

# open BreatheCode API as a service and export the port 8000
docker-compose up -d bc-dev

# open the BreatheCode Dev, this shell don't export the port 8000
docker-compose run bc-dev fish

# create super user
pipenv run python manage.py createsuperuser

# Close the BreatheCode Dev
exit

# See the output of Django
docker-compose logs -f bc-dev

# open localhost:8000 to view the api
# open localhost:8000/admin to view the admin

Working in your local machine (recommended)

Installation in your local machine

Install docker desktop in your Windows, else find a guide to install Docker and Docker Compose in your linux distribution uname -a.

# Check which dependencies you need install in your operating system
python -m scripts.doctor

# Setting up the redis and postgres database, you also can install manually in your local machine this databases
docker-compose up -d redis postgres

# Install and setting up your development environment (this command replace your .env file)
python -m scripts.install

Testing in your local machine

# Testing
pipenv run test ./breathecode/activity  # path

# Testing in parallel
pipenv run ptest ./breathecode/activity  # path

# Coverage
pipenv run cov breathecode.activity  # python module path

# Coverage in parallel
pipenv run pcov breathecode.activity  # python module path

Run BreatheCode API in your local machine

# Collect statics
pipenv run python manage.py collectstatic --noinput

# Run migrations
pipenv run python manage.py migrate

# Load fixtures (populate the database)
pipenv run python manage.py loaddata breathecode/*/fixtures/dev_*.json

# Create super user
pipenv run python manage.py createsuperuser

# Run server
pipenv run start

# open localhost:8000 to view the api
# open localhost:8000/admin to view the admin

About

breathecode/registry/models.py#L273 modifications

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 97.1%
  • HTML 2.9%