Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Commit

Permalink
📖 DOC: change README
Browse files Browse the repository at this point in the history
  • Loading branch information
tallguyjenks committed May 9, 2023
1 parent 38ba64a commit ad706e5
Show file tree
Hide file tree
Showing 4 changed files with 322 additions and 316 deletions.
18 changes: 12 additions & 6 deletions .github/linters/.flake8
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@ exclude =
dist
select = B,C,E,F,W,T4,B9
ignore =
E203, # E203: whitespace before ‘:’
E266, # E266: too many leading ‘#’ for block comment
E501, # E501: line too long (82 > 79 characters)
W503, # W503: line break before binary operator
F401, # F401: module imported but unused
F403 # F403: ‘from module import *’ used; unable to detect undefined names
E203,
E266,
E501,
W503,
F401,
F403
# E203: whitespace before ‘:’
# E266: too many leading ‘#’ for block comment
# E501: line too long (82 > 79 characters)
# W503: line break before binary operator
# F401: module imported but unused
# F403: ‘from module import *’ used; unable to detect undefined names
273 changes: 204 additions & 69 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,106 +1,241 @@
# Strong_App_Import
# PyRM

<!-- markdownlint-disable MD033-->
<!-- Header & Preview Image -->

<h1 align="center">
<a href="https://www.strong.app/" target="_blank">
<img src="images/strongapp_banner.png" height="50%" width="50%">
</a>
</h1>

<!-- Shields -->
<p align="center">
<a href="https://github.com/Bryan-Jenks-Home-Lab/etl_strong_app/blob/master/LICENSE">
<img src="https://img.shields.io/static/v1.svg?style=flat&label=License&message=Apache 2.0&logoColor=eceff4&logo=github&colorA=black&colorB=green"/>
</a>
<a href="https://github.com/psf/black">
<img src="https://img.shields.io/badge/code%20style-black-000000.svg"/>
</a>
<img src="https://img.shields.io/github/commit-activity/m/Bryan-Jenks-Home-Lab/etl_strong_app">
<a href="https://github.com/Bryan-Jenks-Home-Lab/etl_strong_app/graphs/contributors">
<img src="https://img.shields.io/github/contributors/Bryan-Jenks-Home-Lab/etl_strong_app"/>
</a>
<img src="https://img.shields.io/github/v/release/Bryan-Jenks-Home-Lab/etl_strong_app">
<a href="https://wakatime.com/badge/github/Bryan-Jenks-Home-Lab/etl_strong_app">
<img src="https://wakatime.com/badge/github/Bryan-Jenks-Home-Lab/etl_strong_app.svg"/>
</a>
<a href="https://github.com/marketplace/actions/super-linter">
<img src="https://github.com/Bryan-Jenks-Home-Lab/etl_strong_app/workflows/Lint%20Code%20Base/badge.svg"/>
</a>
<a href="https://interrogate.readthedocs.io/en/latest/">
<img src="images/interrogate_badge.svg"/>
</a>
<a href="https://github.com/Bryan-Jenks-Home-Lab/etl_strong_app/pulls">
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?longCache=true" alt="Pull Requests">
</a>
</p>

<!-- Description -->

> <++>
<++>

## Purpose
---

## Table of Contents

---

- [PyRM](#pyrm)
- [Table of Contents](#table-of-contents)
- [Features](#features)
- [Requirements](#requirements)
- [Recommended](#recommended)
- [Installation](#installation)
- [Users](#users)
- [Contributors](#contributors)
- [Usage](#usage)
- [Example](#example)
- [Documentation](#documentation)
- [Resources](#resources)
- [Development](#development)
- [Security](#security)
- [Future](#future)
- [History](#history)
- [Community](#community)
- [Credits](#credits)
- [License](#license)

---

## Features

---

[Return To Top](#table-of-contents)

Ingestion of a flat file export from the `Strong App` that i use for my workout tracking as there is no API to access said data.
<++>

## SIPOC
---

## Requirements

### Scopes
---

- Operations external to this containerized app take place in an SMB network share.
- The Ingestion, processing, and archival of a flat file export
- The insert/upsert of data in/into the Postgres Database
-
[Return To Top](#table-of-contents)

### Inputs
<++>

- Flat File Export
- With this naming convention: `strong.csv`
- into target location on client machine
- With the following Columns:
---

| Column | Data Definition | Nullability |
| --------------------------- | ------------------- | ----------- |
| RowID^[Postgres Table Only] | BIGINT IDENTITY(11) | NOT NULL |
| Date | DATETIME2(7) | NULL |
| [Workout Name] | NVARCHAR(500) | NULL |
| Duration | NVARCHAR(50) | NULL |
| [Exercise Name] | NVARCHAR(500) | NULL |
| Set Order | TINYINT | NULL |
| Weight | DECIMAL(18, 2) | NULL |
| Reps | INT | NULL |
| Distance | INT | NULL |
| Seconds | INT | NULL |
| Notes | NVARCHAR(1000) | NULL |
| [Workout Notes] | NVARCHAR(1000) | NULL |
| RPE | DECIMAL(3, 1) | NULL |
### Recommended

- Configuration variables govern the service's behavior
---

TODO provide list of variables and their uses
[Return To Top](#table-of-contents)

### Process
<++>

TODO process documentation
---

## Installation

1. `python -m pip install poetry python-dotenv pre-commit`
1. `pre-commit install`
1. `pre-commit autoupdate`
---

[Return To Top](#table-of-contents)

<++>

---

### Users

---

[Return To Top](#table-of-contents)

<++>

See [Usage](#usage)

---

### Contributors

---

[Return To Top](#table-of-contents)

See [CONTRIBUTING](#contributing)

---

## Usage

---

[Return To Top](#table-of-contents)

<++>

---

### Example

---

[Return To Top](#table-of-contents)

<++>

---

## Documentation

---

[Return To Top](#table-of-contents)

<++>

---

## Resources

---

[Return To Top](#table-of-contents)

<++>

---

## Development

---

Pull image from ghcr.io
[Return To Top](#table-of-contents)

```sh
docker pull ghcr.io/bryan-jenks-home-lab/etl_strong_app:main
```
<++>

Run image
See [Road Map](ROADMAP.md)

```sh
docker run -d \
-e DB_CONNECTION_STRING='postgresql+psycopg2://<USER>:<PASSWORD>@<SERVER>:<PORT>/<DATABASE>' \
-e EXPECTED_FILE=strong.csv \
-e TARGET_TABLE=<DATABASE>.<SCHEMA>.<TABLE_NAME> \
-e WATCH_PATH=/data/inbound \
-e STAGING_PATH=/data/outbound \
-e PROCESSED_PATH=/data/processed \
-v /<PATH_ON_YOUR_MACHINE>/strong_app_import/inbound:/data/inbound \
-v /<PATH_ON_YOUR_MACHINE>/strong_app_import/outbound:/data/outbound \
-v /<PATH_ON_YOUR_MACHINE>/strong_app_import/processed:/data/processed \
ghcr.io/bryan-jenks-home-lab/etl_strong_app:main
```
---

### Security

---

[Return To Top](#table-of-contents)

See [SECURITY](SECURITY.md)

---

### Future

[Return To Top](#table-of-contents)

See [ROADMAP](ROADMAP.md)

---

### Outputs
### History

- Data Payload into target database table
- Archived Flat File Export `strong.csv` in archival directory
[Return To Top](#table-of-contents)

### Customers
See [RELEASES](https://github.com/Bryan-Jenks-Home-Lab/etl_strong_app/releases)

- Bryan
---

### Community

---

## Development Environment setup <!-- DOC finish fleshing out this section -->
[Return To Top](#table-of-contents)

### pre-commit hooks
<++>

-
See [CODE OF CONDUCT](CODE_OF_CONDUCT.md)

### poetry
---

-
## Credits

### makefile
---

## Deployment Details
[Return To Top](#table-of-contents)

- Environmental variables that need to be passed to the container should be placed in the portainer docker-compose stack interface and fed to the container
See [AUTHORS](AUTHORS.md)

---

## License

---

## Roadmap
[Return To Top](#table-of-contents)

- P1 Need to get OAuth 2.0 setup for security on these API's
See [LICENSE](LICENSE)
Loading

0 comments on commit ad706e5

Please sign in to comment.