Skip to content

Commit

Permalink
Merge branch 'main' of github_lpo:lpoaura/weatherlink2pg
Browse files Browse the repository at this point in the history
  • Loading branch information
hypsug0 committed May 22, 2024
2 parents faa00b4 + 112cb66 commit 67bca21
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
retention-days: 30

- name: Setup Pages
uses: actions/configure-pages@v4
uses: actions/configure-pages@v5
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main')

- name: Upload artifact
Expand Down
42 changes: 41 additions & 1 deletion docs/source/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,49 @@
## Installation

```bash
python3 venv weatherlink_venv
pip install weatherlink2pg
```

## Usage

Coming soon...
Usage require some variable environment as mentionned in file `.env.sample`
for weatherlink api authentication and database connection.

### Full download

Required as first launch

```sh
source weatherlink_env/bin/activate
source <env file>
weatherlink2pg full
```

### Update

```sh
source weatherlink_env/bin/activate
source <env file>
weatherlink2pg update
```

### crontask

recommanded way to update data using cron tasks

Create a script with the following code

```bash
#!/bin/bash

SCRIPT_RELATIVE_DIR=$(dirname "${BASH_SOURCE[0]}")

source $SCRIPT_RELATIVE_DIR/bin/activate

set -a # automatically export all variables
source $SCRIPT_RELATIVE_DIR/.weatherlink2pg.env
set +a

weatherlink2pg update
```
15 changes: 8 additions & 7 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ click = "^8.1.7"


[tool.poetry.group.dev.dependencies]
spyder-kernels = "==2.4.*"
spyder-kernels = ">=2.4,<2.6"
ipykernel = "^6.29.4"
black = "^24.4.1"
isort = "^5.13.2"
Expand Down

0 comments on commit 67bca21

Please sign in to comment.