diff --git a/.github/workflows/run-pytest.yml b/.github/workflows/run-pytest.yml index 216adf26..2d1c4916 100644 --- a/.github/workflows/run-pytest.yml +++ b/.github/workflows/run-pytest.yml @@ -2,15 +2,15 @@ name: Run pytests on: push: - branches: [master, dev] + branches: [master] pull_request: - branches: [master, dev] + branches: [master] jobs: pytest: strategy: matrix: - python-version: [3.6, 3.7, 3.8, 3.9] + python-version: [3.6, 3.9] os: [ubuntu-latest] # can't use macOS when using service containers or container jobs runs-on: ${{ matrix.os }} services: @@ -47,4 +47,4 @@ jobs: uses: codecov/codecov-action@v1 with: file: ./coverage.xml - name: py-${{ matrix.python-version }}-${{ matrix.os }} \ No newline at end of file + name: py-${{ matrix.python-version }}-${{ matrix.os }} diff --git a/.gitignore b/.gitignore index fcf0f3c8..b07a8870 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ __pycache__ *.py[cod] *$py.class __pycache__/ +.vscode/ # C extensions *.so diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 16cccb97..05d4cd4b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,21 +1,21 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.4.0 + rev: v4.0.1 hooks: - id: trailing-whitespace - id: check-yaml - - id: check-json - id: end-of-file-fixer - - id: name-tests-test - id: requirements-txt-fixer - id: trailing-whitespace - - - repo: https://github.com/psf/black - rev: 20.8b1 - hooks: - - id: black + - id: check-ast - repo: https://github.com/PyCQA/isort - rev: 5.7.0 + rev: 5.9.1 hooks: - id: isort + args: ["--profile", "black"] + + - repo: https://github.com/psf/black + rev: 21.6b0 + hooks: + - id: black diff --git a/MANIFEST.in b/MANIFEST.in index 19044bd6..be6e936b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,3 @@ include requirements/* include README.md -include pipestat/schemas/* \ No newline at end of file +include pipestat/schemas/* diff --git a/README.md b/README.md index ea931792..4f8c41f7 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,9 @@ export PIPESTAT_RESULTS_FILE=results_file.yaml export PIPESTAT_NAMESPACE=my_namespace ``` -## Report a result +## Pipeline results reporting and retrieval + +### Report a result From command line: @@ -46,8 +48,8 @@ import pipestat psm = pipestat.PipestatManager() psm.report(values={"result_name": 1.1}) ``` - -## Retrieve a result + +### Retrieve a result From command line: @@ -63,5 +65,39 @@ import pipestat psm = pipestat.PipestatManager() psm.retrieve(result_identifier="result_name") ``` - +## Pipeline status management + +## Set status + +From command line: + +```console +pipestat status set running +``` + +From Python: + +```python +import pipestat + +psm = pipestat.PipestatManager() +psm.set_status(status_identifier="running") +``` + +## Get status + +From command line: + +```console +pipestat status get +``` + +From Python: + +```python +import pipestat + +psm = pipestat.PipestatManager() +psm.get_status() +``` diff --git a/codecov.yml b/codecov.yml index bc5f12fb..be72bc25 100644 --- a/codecov.yml +++ b/codecov.yml @@ -2,4 +2,4 @@ ignore: - "*/argparser.py" - "*/cli.py" - "*/__main__.py" - - "setup.py" \ No newline at end of file + - "setup.py" diff --git a/docs/README.md b/docs/README.md index ea931792..4f8c41f7 100644 --- a/docs/README.md +++ b/docs/README.md @@ -30,7 +30,9 @@ export PIPESTAT_RESULTS_FILE=results_file.yaml export PIPESTAT_NAMESPACE=my_namespace ``` -## Report a result +## Pipeline results reporting and retrieval + +### Report a result From command line: @@ -46,8 +48,8 @@ import pipestat psm = pipestat.PipestatManager() psm.report(values={"result_name": 1.1}) ``` - -## Retrieve a result + +### Retrieve a result From command line: @@ -63,5 +65,39 @@ import pipestat psm = pipestat.PipestatManager() psm.retrieve(result_identifier="result_name") ``` - +## Pipeline status management + +## Set status + +From command line: + +```console +pipestat status set running +``` + +From Python: + +```python +import pipestat + +psm = pipestat.PipestatManager() +psm.set_status(status_identifier="running") +``` + +## Get status + +From command line: + +```console +pipestat status get +``` + +From Python: + +```python +import pipestat + +psm = pipestat.PipestatManager() +psm.get_status() +``` diff --git a/docs/api_docs.md b/docs/api_docs.md index 21f94abe..8c52ebe9 100644 --- a/docs/api_docs.md +++ b/docs/api_docs.md @@ -8,7 +8,7 @@ document.addEventListener('DOMContentLoaded', (event) => {