Skip to content

Commit

Permalink
Change installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
ReTeam Labs committed May 6, 2020
1 parent 9013b95 commit 1f3e4f4
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 18 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ build/Release
# Dependency directories
node_modules/
jspm_packages/
*-venv/

# pytest-json-report generated file
.report.json

# TypeScript v1 declaration files
typings/
Expand Down
10 changes: 0 additions & 10 deletions Makefile

This file was deleted.

50 changes: 43 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,52 @@ In this project you will implement a simple reminder app with a command line int

First, we will guide you through implementing simple text reminders. Then, you will have reminders with a deadline, which is either a date, or a date and a time. As each of these have their own class, you will see how these can play together nicely. This basis makes it easy for you to go beyond the course scope and implement other types of reminders, such as recurrent ones.

## Setup
## Installation

You should have [Docker](https://www.docker.com/products/docker-desktop) installed, as well as `make`. These ensure the app is easy to run regardless of your platform.
This project requires `python3.8` or higher. Once you have this installed, follow the instructions below to setup a virtual environment for this project, which ensures that its dependencies will not conflict with other projects of yours.

### Play with the app
Note that you may have to use `python3` instead of `python` depending on how you have installed python.

Now that you have all the requirements ready, you can test the app by running `make` in the root directory. You can add a new reminder, or list the ones you have already added.
First, regardless of your platform, open up a terminal and navigate to the project directory:
```
$ cd <path/to/project/root>
```

Try adding a couple of reminders, such as *Drink water*, *Take a break* or *Buy some milk*.
Then, create a virtual environment `reminders-venv`:
```
$ python -m venv reminders-venv
```
You will have to use this whenever you want to work on this project, to ensure that you have the right dependencies.
To activate your environment, run:

### Test the app
- Windows
```
> reminders-venv\Scripts\activate.bat
```
- macOS / Linux
```
$ source reminders-venv/bin/activate
```

To test your app, run `make test`. Since you have not implemented anything, all the tests should be failing. As you progress through the tasks, more and more of them will pass. When you are stuck, running the tests may give you a hint about your error.
Then, if you need to work on a different project, you can deactivate your environment by running `deactivate` at the command prompt.

Finally, install the dependencies:
```
python -m pip install -r requirements.txt
```

If you see a warning about `pip` being outdated, that's OK; `pip` updates frequently.

## Verify Setup

At the root of your project, run
```
$ pytest tests/tests.py
```
You should see all tests failing in the beginning, but no error about `pytest` itself. If so, you are ready to start making your app.

As you progress through the tasks you can re-run the above command to check the tasks. The error messages should give you a hint as to why a test is failing.

## Previewing Your Work

Start playing with your app by running `python src/app.py`. Try adding a couple of reminders such as `Drink water` and `Complete the Reminders project`. :)
2 changes: 1 addition & 1 deletion tests/pytest.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[pytest]
addopts = --json-report -v --tb=short
markers =
task_1_regular_class_exists
task_1_regular_class_implementation
Expand Down Expand Up @@ -31,4 +32,3 @@ markers =

task_12_polite_reminder_touchup
task_12_registration
addopts = --json-report

0 comments on commit 1f3e4f4

Please sign in to comment.