-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generated OpenAPI code for evidence, workers and statistics (#1339)
* Generated OpenAPI code and fixed formatter issue * Moved statistics dictionary conversion to commands
- Loading branch information
Showing
47 changed files
with
4,815 additions
and
2,600 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
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,37 @@ | ||
# NOTE: This file is auto generated by OpenAPI Generator. | ||
# URL: https://openapi-generator.tech | ||
# | ||
# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | ||
|
||
name: turbinia_api_lib Python package | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 pytest | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Test with pytest | ||
run: | | ||
pytest |
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 |
---|---|---|
|
@@ -64,4 +64,3 @@ target/ | |
|
||
#Ipython Notebook | ||
.ipynb_checkpoints | ||
|
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 |
---|---|---|
@@ -1,24 +1,25 @@ | ||
# NOTE: This file is auto generated by OpenAPI Generator. | ||
# URL: https://openapi-generator.tech | ||
# | ||
# ref: https://docs.gitlab.com/ee/ci/README.html | ||
# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml | ||
|
||
stages: | ||
- test | ||
|
||
.tests: | ||
.pytest: | ||
stage: test | ||
script: | ||
- pip install -r requirements.txt | ||
- pip install -r test-requirements.txt | ||
- pytest --cov=turbinia_api_lib | ||
|
||
test-3.6: | ||
extends: .tests | ||
image: python:3.6-alpine | ||
test-3.7: | ||
extends: .tests | ||
pytest-3.7: | ||
extends: .pytest | ||
image: python:3.7-alpine | ||
test-3.8: | ||
extends: .tests | ||
pytest-3.8: | ||
extends: .pytest | ||
image: python:3.8-alpine | ||
test-3.9: | ||
extends: .tests | ||
image: python:3.9-alpine | ||
pytest-3.9: | ||
extends: .pytest | ||
image: python:3.9-alpine |
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
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,35 @@ | ||
# CompleteTurbiniaStats | ||
|
||
Statistics for different groups of tasks. | ||
|
||
## Properties | ||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**all_tasks** | **object** | | | ||
**failed_tasks** | **object** | | | ||
**requests** | **object** | | | ||
**successful_tasks** | **object** | | | ||
**tasks_per_type** | **object** | | | ||
**tasks_per_user** | **object** | | | ||
**tasks_per_worker** | **object** | | | ||
|
||
## Example | ||
|
||
```python | ||
from turbinia_api_lib.models.complete_turbinia_stats import CompleteTurbiniaStats | ||
|
||
# TODO update the JSON string below | ||
json = "{}" | ||
# create an instance of CompleteTurbiniaStats from a JSON string | ||
complete_turbinia_stats_instance = CompleteTurbiniaStats.from_json(json) | ||
# print the JSON string representation of the object | ||
print CompleteTurbiniaStats.to_json() | ||
|
||
# convert the object into a dict | ||
complete_turbinia_stats_dict = complete_turbinia_stats_instance.to_dict() | ||
# create an instance of CompleteTurbiniaStats from a dict | ||
complete_turbinia_stats_form_dict = complete_turbinia_stats.from_dict(complete_turbinia_stats_dict) | ||
``` | ||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) | ||
|
||
|
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.