summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaran Jayachandra <mail@karanjayachandra.com>2024-11-15 17:25:22 +0100
committerKaran Jayachandra <mail@karanjayachandra.com>2024-11-15 17:25:22 +0100
commitd19720741fd37ea0a4b8a79f4f445bccdd360089 (patch)
tree4e98f0f304f7445bfca1d7a6750930c3514ac9ca
parent7b7af30b84ec430a6fccfe4d81df0119c773665c (diff)
Added the change to the README to follow the new package way of working
-rw-r--r--README.md40
1 files changed, 19 insertions, 21 deletions
diff --git a/README.md b/README.md
index 93f656e..27203ab 100644
--- a/README.md
+++ b/README.md
@@ -27,35 +27,35 @@ What this application ***IS NOT***:
- Secure: This was designed to be used locally on a machine
- Performant: It was designed for use by a single admin user
-## How to run
+## How to install
+
+With [python](https://realpython.com/installing-python/) installed, run the following command preferably in a seperate virtual environment.
+
+### Using pip
+
+```bash
+pip install git+https://gitlab.com/KaranJayachandra/match_up.git
+```
+
+### How to complile from source
Please install [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) and [python](https://realpython.com/installing-python/) on your machine before proceeding further. Once installed, open the terminal to a folder of your choosing and run the following commands to setup the application.
-```powershell
+```bash
git clone https://gitlab.com/KaranJayachandra/match_up.git
cd match_up
python -m venv .venv
.venv\Scripts\activate
-pip install -r requirements.txt
+pip install .
```
-Now create a file called .env with the environment variables needed by the application. An example is shown below.
-
-```text
-DATABASE = "database.csv"
-COURTS = 10
-APP_SETTINGS = "config.DevelopmentConfig"
-```
-
-The `DATABASE` variable contains the list of players which is just a simple CSV file with two columns, the first containing their name and the second containing their skill level from 1 to 10. The `COURTS` variable is the number of spaces or slots you have for creating pairings. `APP_SETTINGS` should be chosen between `config.DevelopmentConfig` or `config.ProductionConfig` based on the deployment.
-
-The application can then be run using (ensure you are in the virtual environment if you closed the terminal after the previous steps):
+To run the application, just run:
-```powershell
-flask run
+```bash
+match_up
```
-The application should be running now and the terminal should display the ip and port number. Most modern terminals will allow you to navigate directly to the application by clicking on the displayed address.
+The application should be running now in 'localhost', just navigate there using a browser. Use the `--help` option to get an explanation of the application.
## Technology used
@@ -65,11 +65,9 @@ This is a simple application build using [flask](https://flask.palletsprojects.c
Create a powershell script with the following content in the folder with the code.
-```powershell
-$env:DATABASE = "<data-base-file-name>.csv"
-$env:APP_SETTINGS = "config.ProductionConfig"
+```bash
.venv\Scripts\activate
-pythonw -m flask run -p <port-number>
+pythonw match_up
```
Create a task using Task Scheduler to run this script on start up.