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.0.tar.gz
(4.6 kB
view details)
Built Distribution
File details
Details for the file frigg-settings-3.1.0.tar.gz
.
File metadata
- Download URL: frigg-settings-3.1.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e22a3d06b67dac314e711873fe3e629e7895ad7f3bf90cf498ae855f5303c96b |
|
MD5 | 3214b07f0b7923699d7cf3c064051f26 |
|
BLAKE2b-256 | cc5ab9dadf2653296afbadad19c9f0007b2737ed20f55fb4214d45b42f6deb3a |
File details
Details for the file frigg_settings-3.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: frigg_settings-3.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd7d455512793305a7ec76cc19e74b33acaaf0127a0ba9bc90f741f4cddfc6eb |
|
MD5 | f0970e4eac48c3ea0d508eaa54610623 |
|
BLAKE2b-256 | 059908a73df399f2919ee84ef8a55d15b87cf20c32e6b7078b023c39dd82755c |