A module for parsing and discovery of frigg settings file
Project description
# frigg-settings [![Build status](https://ci.frigg.io/badges/frigg/frigg-settings/)](https://ci.frigg.io/frigg/frigg-settings/last/) [![Coverage status](https://ci.frigg.io/badges/coverage/frigg/frigg-settings/)](https://ci.frigg.io/frigg/frigg-settings/last/)
A python module for parsing and discovery of frigg settings file
## Installation
```
pip install frigg-settings
```
## Usage
The same content as t.py, thus run `python t.py` to se the output.
```python
from frigg_settings.helpers import FileSystemWrapper
from frigg_settings import build_tasks, load_settings_file, build_settings
path = os.getcwd()
runner = FileSystemWrapper()
print('Tasks: {}'.format(build_tasks(path, runner)))
print('Settings-file: {}'.format(load_settings_file('{}/.frigg.yml'.format(path), runner)))
print('Build-settings: {}'.format(build_settings(path, runner)))
```
The script prints the following:
```text
Tasks: ['tox', 'flake8']
Settings-file: {'tasks': ['tox -e py34', 'tox -e flake8', 'tox -e isort', 'coverage report -m && coverage xml'], 'coverage': {'parser': 'python', 'path': 'coverage.xml'}}
Build-settings: {'webhooks': [], 'services': [], 'tasks': ['tox -e py34', 'tox -e flake8', 'tox -e isort', 'coverage report -m && coverage xml'], 'coverage': {'parser': 'python', 'path': 'coverage.xml'}}
```
--------------
MIT © frigg.io
A python module for parsing and discovery of frigg settings file
## Installation
```
pip install frigg-settings
```
## Usage
The same content as t.py, thus run `python t.py` to se the output.
```python
from frigg_settings.helpers import FileSystemWrapper
from frigg_settings import build_tasks, load_settings_file, build_settings
path = os.getcwd()
runner = FileSystemWrapper()
print('Tasks: {}'.format(build_tasks(path, runner)))
print('Settings-file: {}'.format(load_settings_file('{}/.frigg.yml'.format(path), runner)))
print('Build-settings: {}'.format(build_settings(path, runner)))
```
The script prints the following:
```text
Tasks: ['tox', 'flake8']
Settings-file: {'tasks': ['tox -e py34', 'tox -e flake8', 'tox -e isort', 'coverage report -m && coverage xml'], 'coverage': {'parser': 'python', 'path': 'coverage.xml'}}
Build-settings: {'webhooks': [], 'services': [], 'tasks': ['tox -e py34', 'tox -e flake8', 'tox -e isort', 'coverage report -m && coverage xml'], 'coverage': {'parser': 'python', 'path': 'coverage.xml'}}
```
--------------
MIT © frigg.io
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
frigg-settings-3.1.1.tar.gz
(4.9 kB
view details)
Built Distribution
File details
Details for the file frigg-settings-3.1.1.tar.gz
.
File metadata
- Download URL: frigg-settings-3.1.1.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6378eb5923863c6a032f926d45f3cd857a9395d4458f8196b3389a85203771d8 |
|
MD5 | 58c71d4569ca1ec677078ec92a7c8bde |
|
BLAKE2b-256 | 51b0e0a3258fa492bf66b31f47fe15b4df453caaec32b7a470427723a2224140 |
File details
Details for the file frigg_settings-3.1.1-py2.py3-none-any.whl
.
File metadata
- Download URL: frigg_settings-3.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc2c00ce82db9c7c937e8388a30cc252d9be25c60037cb20d73276e6b6bef5b0 |
|
MD5 | 536d86e9ba73761626cc2824549d8571 |
|
BLAKE2b-256 | c0b11778e67149d322fccf3021c5535b00d40d04a2995e779ebe90d9ef99512f |