-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from pepkit/dev
v0.1.5
- Loading branch information
Showing
30 changed files
with
1,109 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: requirements-txt-fixer | ||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.7.0 | ||
hooks: | ||
- id: isort | ||
args: ["--profile", "black"] | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 20.8b1 | ||
hooks: | ||
- id: black |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
Final targets: convert_project, get_available_pep_filters, inspect_project, read_schema, validate_config, validate_project, validate_sample | ||
<script> | ||
document.addEventListener('DOMContentLoaded', (event) => { | ||
document.querySelectorAll('h3 code').forEach((block) => { | ||
hljs.highlightBlock(block); | ||
}); | ||
}); | ||
</script> | ||
|
||
<style> | ||
h3 .content { | ||
padding-left: 22px; | ||
text-indent: -15px; | ||
} | ||
h3 .hljs .content { | ||
padding-left: 20px; | ||
margin-left: 0px; | ||
text-indent: -15px; | ||
martin-bottom: 0px; | ||
} | ||
h4 .content, table .content, p .content, li .content { margin-left: 30px; } | ||
h4 .content { | ||
font-style: italic; | ||
font-size: 1em; | ||
margin-bottom: 0px; | ||
} | ||
|
||
</style> | ||
|
||
|
||
# Package `eido` Documentation | ||
|
||
|
||
Project configuration | ||
|
||
```python | ||
def validate_project(project, schema, exclude_case=False) | ||
``` | ||
|
||
Validate a project object against a schema | ||
#### Parameters: | ||
|
||
- `project` (`peppy.Sample`): a project object to validate | ||
- `schema` (`str | dict`): schema dict to validate against or a path to one | ||
- `exclude_case` (`bool`): whether to exclude validated objectsfrom the error. Useful when used ith large projects | ||
|
||
|
||
|
||
|
||
```python | ||
def validate_sample(project, sample_name, schema, exclude_case=False) | ||
``` | ||
|
||
Validate the selected sample object against a schema | ||
#### Parameters: | ||
|
||
- `project` (`peppy.Project`): a project object to validate | ||
- `sample_name` (`str | int`): name or index of the sample to validate | ||
- `schema` (`str | dict`): schema dict to validate against or a path to one | ||
- `exclude_case` (`bool`): whether to exclude validated objectsfrom the error. Useful when used ith large projects | ||
|
||
|
||
|
||
|
||
```python | ||
def validate_config(project, schema, exclude_case=False) | ||
``` | ||
|
||
Validate the config part of the Project object against a schema | ||
#### Parameters: | ||
|
||
- `project` (`peppy.Project`): a project object to validate | ||
- `schema` (`str | dict`): schema dict to validate against or a path to one | ||
- `exclude_case` (`bool`): whether to exclude validated objectsfrom the error. Useful when used ith large projects | ||
|
||
|
||
|
||
|
||
```python | ||
def read_schema(schema) | ||
``` | ||
|
||
Safely read schema from YAML-formatted file. | ||
|
||
If the schema imports any other schemas, they will be read recursively. | ||
#### Parameters: | ||
|
||
- `schema` (`str | Mapping`): path to the schema fileor schema in a dict form | ||
|
||
|
||
#### Returns: | ||
|
||
- `list[dict]`: read schemas | ||
|
||
|
||
#### Raises: | ||
|
||
- `TypeError`: if the schema arg is neither a Mapping nor a file path orif the 'imports' sections in any of the schemas is not a list | ||
|
||
|
||
|
||
|
||
```python | ||
def inspect_project(p, sample_names=None, max_attr=10) | ||
``` | ||
|
||
Print inspection info: Project or, if sample_names argument is provided, matched samples | ||
#### Parameters: | ||
|
||
- `p` (`peppy.Project`): project to inspect | ||
- `sample_names` (`Iterable[str]`): list of samples to inspect | ||
- `max_attr` (`int`): max number of sample attributes to display | ||
|
||
|
||
|
||
|
||
```python | ||
def get_available_pep_filters() | ||
``` | ||
|
||
Get a list of available target formats | ||
#### Returns: | ||
|
||
- `List[str]`: a list of available formats | ||
|
||
|
||
|
||
|
||
```python | ||
def convert_project(prj, target_format, plugin_kwargs=None) | ||
``` | ||
|
||
Convert a `peppy.Project` object to a selected format | ||
#### Parameters: | ||
|
||
- `prj` (`peppy.Project`): a Project object to convert | ||
- `plugin_kwargs` (`dict`): kwargs to pass to the plugin function | ||
- `target_format` (`str`): the format to convert the Project object to | ||
|
||
|
||
#### Raises: | ||
|
||
- `EidoFilterError`: if the requested filter is not defined | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
*Version Information: `eido` v0.1.5-dev, generated by `lucidoc` v0.4.2* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.