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

Commit 9587a42

Browse files
authored
df: Real DataFlows and HTTP MultiComm
Fixes: #213 Fixes: #211 Fixes: #209 Fixes: #204 Fixes: #199 Fixes: #193 Fixes: #186 Fixes: #90 Signed-off-by: John Andersen <[email protected]>
1 parent 013877a commit 9587a42

File tree

138 files changed

+8241
-1643
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+8241
-1643
lines changed

.ci/run.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ function run_plugin() {
2020
./scripts/docs.sh
2121
# Try running create for real
2222
cd $(mktemp -d)
23+
# TODO Bash array
2324
# Create model
2425
dffml service dev create model travis-test-model
2526
cd travis-test-model
@@ -44,6 +45,12 @@ function run_plugin() {
4445
python setup.py install
4546
python setup.py test
4647
cd ..
48+
# Create config
49+
dffml service dev create config travis-test-config
50+
cd travis-test-config
51+
python setup.py install
52+
python setup.py test
53+
cd ..
4754
fi
4855
}
4956

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ htmlcov/
2020
html/
2121
pages/
2222
examples/shouldi/response.json
23-
docs/plugins/service/http
23+
docs/plugins/service/http
24+
*pip-wheel-metadata/

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [Unreleased]
7+
## [0.3.0] - 2019-10-26
88
### Added
9+
- Real DataFlows, see operations tutorial and usage examples
910
- Async helper concurrently nocancel optional keyword argument which, if set is
1011
a set of tasks not to cancel when the concurrently execution loop completes.
1112
- FileSourceTest has a `test_label` method which checks that a FileSource knows

config/yaml/.coveragerc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[run]
2+
source =
3+
dffml_config_yaml
4+
tests
5+
branch = True
6+
7+
[report]
8+
exclude_lines =
9+
no cov
10+
no qa
11+
noqa
12+
pragma: no cover
13+
if __name__ == .__main__.:

config/yaml/.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
*.log
2+
*.pyc
3+
.cache/
4+
.coverage
5+
.idea/
6+
.vscode/
7+
*.egg-info/
8+
build/
9+
dist/
10+
docs/build/
11+
venv/
12+
wheelhouse/
13+
*.egss
14+
.mypy_cache/
15+
*.swp
16+
.venv/
17+
.eggs/
18+
*.modeldir
19+
*.db
20+
htmlcov/

config/yaml/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Copyright (c) 2019 Intel Corporation
2+
3+
MIT License
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

config/yaml/MANIFEST.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
include README.md
2+
include LICENSE
3+
include setup_common.py

config/yaml/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# DFFML Config For YAML Format
2+
3+
## About
4+
5+
Allows for reading and writing of ``yaml`` files.
6+
7+
## License
8+
9+
model_name Models are distributed under the terms of the
10+
[MIT License](LICENSE).

config/yaml/dffml_config_yaml/__init__.py

Whitespace-only changes.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
"""
2+
Description of what this config does
3+
"""
4+
import yaml
5+
from typing import Dict, Any
6+
7+
from dffml.util.entrypoint import entry_point
8+
from dffml.util.cli.arg import Arg
9+
from dffml.base import BaseConfig
10+
from dffml.config.config import BaseConfigLoaderContext, BaseConfigLoader
11+
12+
13+
class YamlConfigLoaderContext(BaseConfigLoaderContext):
14+
async def loadb(self, resource: bytes) -> Dict:
15+
return yaml.safe_load(resource.decode())
16+
17+
async def dumpb(self, resource: Dict) -> bytes:
18+
return yaml.dump(resource, default_flow_style=False).encode()
19+
20+
21+
@entry_point("yaml")
22+
class YamlConfigLoader(BaseConfigLoader):
23+
CONTEXT = YamlConfigLoaderContext
24+
25+
@classmethod
26+
def args(cls, args, *above) -> Dict[str, Arg]:
27+
return args
28+
29+
@classmethod
30+
def config(cls, config, *above) -> BaseConfig:
31+
return BaseConfig()

0 commit comments

Comments
 (0)