Skip to content

Commit

Permalink
docs(readme): improve readme & docs' homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
Xenepix committed Dec 21, 2023
1 parent 5b2f910 commit af6929a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 39 deletions.
41 changes: 7 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,56 +22,29 @@

<p align="center">
<a href="#django-napse"><strong>Django Napse</strong></a> ·
<a href="#usefull-commands"><strong>Usefull commands</strong></a> .
<a href="#documentation"><strong>Documentation</strong></a> .
<a href="#how-to-contribute"><strong>How to contribute</strong></a>
</p>
<br/>

## django-napse

Django napse is a portfolio management module using trading bots.

This directory can be used as a django module, which you can install as follows:

```bash
pip install django-napse
```

Or you can use it as a local backend for the [Napse desktop application](https://github.com/napse-invest/Napse), by cloning the repo (possibly after forking it).

## Useful commands
Unless otherwise specified, all commands are to be run at the root folder of the project.

### Create a new project
- Unix \
```source setup-unix.sh```
Or you can use it as a local backend for the [Napse desktop application](https://github.com/napse-invest/Napse), by cloning the repository.

- Windows \
```.\setup-windows.ps1```
Find more details for installation in the [documentation](https://napse-invest.github.io/django-napse/#installation).

### Run a test version of the project
### Documentation

- Build migrations \
```make makemigrations```
- Apply migrations \
```make migrate```
- Run server \
```make runserver```
You can find the documentation [here](https://napse-invest.github.io/django-napse/).

### Run coverage tests

- Run tests \
```test-napse```
- Run tests with coverage \
```coverage```
- Run tests with coverage and open coverage report \
```coverage-open```
## How to contribute

## Documentation

[Docs](https://napse-invest.github.io/django-napse/)

Run mkdocs server:
```
make mkdocs
```
If you want to contribute to the project, please read the [contributing guidelines](https://napse-invest.github.io/django-napse/contributing/) first. You will find the setup instructions and our standards.
4 changes: 3 additions & 1 deletion docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,11 @@ At `tests/test_app/`, build a `secret.json` file (or run the `./setup_secrets.sh
}
}
}

```

!!! note
We **strongly recommend** to add the `secret.json` file to your `.gitignore` file to avoid sharing your API keys.

#### Run

```bash
Expand Down
32 changes: 28 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,19 @@

# Welcome to django-napse's documentation!

Django napse is a portfolio management module using trading bots.

## Installation
---

This project can be used as a django module, which you can install as follows:

To install the latest version of django-napse:
```bash
pip install django-napse
```

Or you can use it as a local backend for the [Napse desktop application](https://github.com/napse-invest/Napse), by cloning the repo (possibly after forking it).

### Setup initial exchange accounts

To make full use of the project, we recommend that you fill in the API keys of at least one exchange (among the django-napse [compabile exchanges](#compatible-exchanges)).
Expand All @@ -38,18 +44,35 @@ At the root of your project, build a `secret.json` file. Here is an exemple with
{
"Exchange Accounts": {
"Binance EA_NAME": {
"exchange": "BINANCE", # Name of your exchange (BINANCE, DYDX, ...)
"exchange": "BINANCE", # Name of your exchange
"testing": true,
"public_key": "YOUR_PUBLIC_KEY",
"private_key": "YOUR_PRIVATE_KEY"
}
}
}
```
We **strongly** recommand you to add the `secret.json` file to your `.gitignore`.

??? note "Note for developers"
We **strongly recommend** to add the `secret.json` file to your `.gitignore` file to avoid sharing your API keys.

## Use django-napse
---

### Local backend

If you want to use django-napse as a local backend for the Napse desktop application, clone the repository and setup the project:
```bash
make setup
```

Then, you can run the server:
```bash
make up
```

Please check the documentation for more information about [endpoints](https://napse-invest.github.io/django-napse/api/).

### Django module

After the installation step, in a `.py` file you can use django-napse after importing it:
```python
Expand All @@ -59,6 +82,7 @@ exchange_account_query = ExchangeAccount.objects.all()
```

## Miscellaneous
---

### Compatible exchanges

Expand Down

0 comments on commit af6929a

Please sign in to comment.