Project Lovelace is a bunch of free scientific programming problems. Each problem teaches you some science like how to simulate a guitar, splice DNA, or predict the weather, and requires the use of scientific insight and some programming skills to solve. The problems get progressively harder but the goal is to learn cool science through programming (or vice versa)!
This repository holds the website frontend HTML, CSS, and Django template code which was created using Bulma as well as the server backend code which uses the Django framework.
If you have an idea for a new problem please consider submitting a new problem, we love receiving new contributions! We discuss new problems on Discord mostly but you can also open a GitHub issue or post on Discourse to discuss. Also feel free to ask us any questions at all! Let us know if you're interested in submitting new problems so we can invite you to the Project Lovelace GitHub organization.
There are three steps to submitting a new problem:
- Open a pull request to lovelace-solutions with the solution to the problem.
- Open a pull request to lovelace-problems with code to generate test cases for the problem.
- Open a pull request to lovelace-website with the problem description, code stubs, and any visualization code. (You are here!)
- Add a new problem description to the
src/problems/templates/problems/
directory. It's mostly HTML but has some Django template stuff in there, but you should be able to create one by following what the other templates look like. - Add code stubs for the new problem in the
src/static/code_stubs/
directory. If you're not sure what the code stub should look like, you can leave it blank (i.e. leave an empty file). - Add problem-specific visualization code to the
src/static/visualization/
directory. This tells your browser how to render and visualize the test case results. Usually it's just text but you could get fancy and plot things with Plotly if you want. - Open a pull request! Once all the tests pass it can be merged.
- Make sure you have recent versions of
docker
anddocker-compose
installed. - Clone this repository.
- Run
bash update_development.bash
to set up a development environment with the website locally. - Run
bash populate_development_env.bash
to populate the website with problems and a couple of users. - You should see a list of problems at
http://localhost:8000/problems/
and be able to submit solutions. - You should be able to log into
http://localhost:8000/admin/
and add new problems.