This is the assignment of Orbital Mechanics.
- The server can directly be run using prebuilt docker image
docker run --rm -it -p 8000:8000 ghcr.io/ayush1325/orbital_calculator:main
- Create virtualenv:
python -m venv .venv
- Install dependencies
pip install -r requirements.txt
- Run Server
python manage.py runserver
- Goto
http://localhost:8000/
- Build Image
docker build . -t orbital_calculator_dev
- Run Image
docker run --rm -it -p 8000:8000 orbital_calculator_dev
- Goto
http://localhost:8000/
- Note: This is only tested on Linux.
Here is a video showing the PR process for anyone unfamiliar
- Add your task/formula in a file under
calculator_gui/tasks/somthing.py
. Remember to add your name and admission number as commments. - Create a function that takes any inputs the formula needs as inputs.
- Add any extra dependencies you use in the
requirements.txt
. - Add some Django tests. At least add 1 test to ensure that the function does not crash. I do not care if the output is correct but the function should not crash.
- Use Python type hints in argumentes and for return type of the function that backend is supposed to use. This is to ensure that I can make appropriate conversions before calling the function.
- Format code properly
- If you are not using python, add a python wrapper around your code so that it can be used from python. I will not accept it otherwise.
- Do not use Exceptions. Instead return None or something else.