Giter Club home page Giter Club logo

osmose-app's Introduction

OsmoseApp

Continuous integration Code style: black

Deployment

For Ifremer infrastructure follow the comments in the .gitlab-ci.yml file, otherwise use the docker-compose.yml file (you should create a .env file with the required variables).

Development

This project uses poetry (pip install poetry) for Python dev and npm for Javascript dev.

Setup

Backend:

# Initial setup
poetry install
docker run --name devdb -e POSTGRES_PASSWORD=postgres -p 127.0.0.1:5432:5432 -d postgis/postgis
docker start devdb
poetry run ./manage.py migrate
poetry run ./manage.py seed

# Run
docker start devdb
poetry run ./manage.py runserver

Frontend:

# Initial setup
cd frontend
npm install
# Run
npm start

Testing

# Run backend & frontend tests
docker start devdb
poetry run ./manage.py test
cd frontend; npm test

# Run backend coverage
coverage run ./manage.py test && coverage report
# You can also get an html report in the htmlcov folder
coverage html

Before pushing to github

# Be sure not to forget any migrations
poetry run ./manage.py makemigrations
# You should run Pylint regularly when coding to get tips and avoid bad patterns
poetry run pylint backend
# Also don't forget to use black in order to unify code style
poetry run black backend

Tooling & maintenance

To update a package to a specific version do not directly edit the pyproject.toml file but rather use the following command:

poetry add --group dev "pylint==2.14.5"

Here --group dev because this is a dev tool, if it's a library to also be used in production you can drop that option.

If you want to changes pylint rules, the configuration options are in the pyproject.toml file.

Formatting :

If you use VSCode, you can add "python.formatting.provider": "black" to your .vscode/settings.json

osmose-app's People

Contributors

ixio avatar rvovard avatar qouagga avatar jobar avatar maellettrt avatar mathieudpnt avatar flo-bou 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.