|
1 | | -# Code Challenge v2 |
| 1 | +# DataMade Code Challenge: React Map |
2 | 2 |
|
3 | | -_A shiny new Django project!_ |
| 3 | +--- |
4 | 4 |
|
5 | | -## Development |
| 5 | +Welcome to the DataMade code challenge! 👋 |
6 | 6 |
|
7 | | -### Setup |
| 7 | +## Contents |
| 8 | +1. [Overview](#overview) |
| 9 | +2. [Installation](#installation) |
| 10 | +3. [Completing the Challenge](#completing-the-challenge) |
| 11 | + a. [TODO:](#step-1-todo) |
8 | 12 |
|
9 | | -#### Docker |
| 13 | +## Overview |
| 14 | +Your task is to complete the following programming exercise to show us some of your code! This exercise is based on work that DataMade does every day: pulling data from the web, debugging tricky code, and presenting information to the world. |
10 | 15 |
|
11 | | -Development requires a local installation of [Docker](https://docs.docker.com/install/) |
12 | | -and [Docker Compose](https://docs.docker.com/compose/install/). |
| 16 | +Submissions should be submitted as a pull request against your fork of this original repository. **Make sure to make your pull request against your own fork of the repository, not the original DataMade repository**. |
13 | 17 |
|
14 | | -#### Pre-commit |
| 18 | +There’s no time limit, but don’t feel the need to go over the top with your submission. We expect this task to take about two hours to complete, but it could take more or less time depending on your familiarity with Django and JavaScript. When you’re all set, share your code with us as a repository on GitHub. |
15 | 19 |
|
16 | | -Pre-commit hooks are scripts that run on your local machine before every commit. |
| 20 | +We’ll be evaluating whether the code works, as well as its quality. Before submitting, make sure that your code does what you expect it to do, that it’s clean and neat enough to meet your standards, and that you’ve provided us some instructions on how to run it. Be warned: there are some intentional bugs in here that you'll have to iron out to get things working! |
17 | 21 |
|
18 | | -We use the [pre-commit](https://pre-commit.com/) framework to run code linters and formatters that keep our codebase clean. |
| 22 | +*Note: If you would prefer to keep your code challenge private, please share access with the following members of DataMade on GitHub:* |
19 | 23 |
|
20 | | -To set up Pre-Commit, install the Python package on your local machine using: |
| 24 | +| Member | GitHub Account | |
| 25 | +| ----------- | -------------------------------- | |
| 26 | +| Hannah | https://github.com/hancush | |
| 27 | +| Derek | https://github.com/derekeder | |
| 28 | +| Monkruman | https://github.com/antidipyramid | |
| 29 | +| Xavier | https://github.com/xmedr | |
| 30 | +| Hayley | https://github.com/haowens | |
21 | 31 |
|
22 | | -```bash |
23 | | -python -m pip install pre-commit |
24 | | -``` |
25 | | - |
26 | | -If you'd rather not install pre-commit globally, create and activate a [virtual environment](https://docs.python.org/3/library/venv.html) in this repo before running the above command. |
| 32 | +Keep in mind that you cannot create a private fork of a public repository on GitHub, so you’ll need to [follow these instructions](https://gist.github.com/0xjac/85097472043b697ab57ba1b1c7530274) to create a private copy of the repo. |
27 | 33 |
|
28 | | -Then, run: |
29 | 34 |
|
30 | | -```bash |
31 | | -pre-commit install |
32 | | -``` |
| 35 | +## Installation |
| 36 | +Development requires a local installation of [Docker](https://docs.docker.com/get-started/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/). These are the only two system-level dependencies you should need. |
33 | 37 |
|
34 | | -Since hooks are run locally, you can modify which scripts are run before each commit by modifying `.pre-commit-config.yaml`. |
35 | | - |
36 | | -### Usage |
37 | | - |
38 | | -#### Running the app |
| 38 | +Once you have Docker and Docker Compose installed, build the application containers: |
39 | 39 |
|
40 | 40 | ```bash |
41 | | -docker compose up |
| 41 | +docker compose build |
42 | 42 | ``` |
43 | 43 |
|
44 | | -#### Running the tests |
| 44 | +Next, run the app: |
45 | 45 |
|
46 | 46 | ```bash |
47 | | -docker compose -f docker-compose.yml -f tests/docker-compose.yml run --rm app |
| 47 | +docker compose up |
48 | 48 | ``` |
49 | 49 |
|
50 | | -#### Managing site styles |
| 50 | +The app will log to the console, and you should be able to visit it at http://localhost:8000 |
51 | 51 |
|
52 | | -We use the Bootstrap Node package to build a custom version of Bootstrap for our use. To |
53 | | -make changes to Bootstrap defaults (colors, layout, etc.), update the included Sass file |
54 | | -at `map/static/scss/map.scss`. Changes |
55 | | -to this file will automatically be applied during local development. |
| 52 | +## Completing the Challenge |
| 53 | +Once you have the app up and running on your computer, you'll need to flesh out certain code blocks to make the map functional. |
56 | 54 |
|
57 | | -To add styles unrelated to Bootstrap, e.g., customizing a map or some other novel element, |
58 | | -update the included CSS file at `map/static/css/map.css`. |
| 55 | +### Step 1: TODO: |
| 56 | +TODO: |
0 commit comments