-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
141 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# FAQ | ||
|
||
FAQ coming soon... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,4 @@ | ||
# Welcome to MkDocs | ||
# cli-surf | ||
|
||
For full documentation visit [mkdocs.org](https://www.mkdocs.org). | ||
|
||
## Commands | ||
|
||
* `mkdocs new [dir-name]` - Create a new project. | ||
* `mkdocs serve` - Start the live-reloading docs server. | ||
* `mkdocs build` - Build the documentation site. | ||
* `mkdocs -h` - Print help message and exit. | ||
|
||
## Project layout | ||
|
||
mkdocs.yml # The configuration file. | ||
docs/ | ||
index.md # The documentation homepage. | ||
... # Other markdown pages, images and other files. | ||
cli-surf is a simple command line tool (with a frontend too!) that sends custom ocean/surf report | ||
data! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Installation | ||
|
||
## Fork the repository | ||
|
||
- Press **Fork** on the repository's page ([or click here](https://github.com/ryansurf/cli-surf/fork)) | ||
- Press **Create fork** | ||
- On Github, navigate to your fork of the repository | ||
- Click on **<> Code** | ||
- Copy the URL for the repository | ||
|
||
## Cloning the forked repository | ||
|
||
Open your terminal and naviagate to the directory you want the fork to be in | ||
``` | ||
git clone <fork URL> | ||
Example: git clone https://github.com/ryansurf/cli-surf.git | ||
``` | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Setup | ||
|
||
## Environment Variables | ||
|
||
- Copy the variables from `.env.example` to `.env` | ||
``` | ||
cp .env.example .env | ||
``` | ||
- Edit the environment variables if necessary (see [settings]()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Structure | ||
|
||
The basic structure of the project is: | ||
|
||
``` | ||
├── docs | ||
├── images | ||
├── src | ||
├── static | ||
├── templates | ||
└── tests | ||
``` | ||
|
||
- `docs`: Contains markdown for the documentation (this website!) | ||
- `images`: Images/GIFs/Media | ||
- `src`: Source code! | ||
- `src/static`: JavaScript | ||
- `src/templates`: HTML | ||
- `src/tests`: Testing files | ||
|
||
|
||
|
||
More in-depth structure: | ||
|
||
``` | ||
├── CONTRIBUTING.md | ||
├── Dockerfile | ||
├── docs | ||
│ ├── faq.md | ||
│ ├── index.md | ||
│ ├── install.md | ||
│ ├── setup.md | ||
│ ├── styling.md | ||
│ └── tests.md | ||
├── help.txt | ||
├── images | ||
│ ├── ocean.gif | ||
│ ├── surf.gif | ||
│ ├── wave.png | ||
│ └── website.gif | ||
├── mkdocs.yml | ||
├── README.md | ||
├── requirements.txt | ||
├── src | ||
│ ├── api.py | ||
│ ├── art.py | ||
│ ├── cli.py | ||
│ ├── helper.py | ||
│ ├── __init__.py | ||
│ ├── send_email.py | ||
│ ├── server.py | ||
│ ├── static | ||
│ │ └── script.js | ||
│ ├── templates | ||
│ │ └── index.html | ||
│ └── tests | ||
│ ├── __init__.py | ||
│ └── test_code.py | ||
├── start_venv.sh | ||
└── venv | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Styling | ||
|
||
## Code Style and Quality | ||
|
||
The [PEP 8](https://realpython.com/python-pep8/) styling convention is used. | ||
|
||
To make sure you are following it, you can install [black](https://pypi.org/project/black/) | ||
|
||
`pip install black` | ||
|
||
To run black: | ||
|
||
`black .` | ||
|
||
On a push/pull request, git will run `black .` for you! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Tests | ||
|
||
To run tests, install pytest, `pip install pytest` and navigate to `src/test`. | ||
|
||
Run `pytest` | ||
|
||
On a push/pull request, git will run `pytest` for you to catch any errors. | ||
|
||
## Writing Tests | ||
|
||
In `src/tests`, there are multiple files for different types of test cases. | ||
|
||
- `test_helper.py`: Tests functions in `src/helper.py` (functions like rounding decimals, etc.) | ||
- `test_api.py`: Tests functions in `src/api.py`. | ||
- `test_server.py`: Tests the Flask server in `src/server/py` | ||
|
||
Writing tests is encouraged, especially if you introduce a new function/feature! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters