summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--python-valohai-yaml.spec269
-rw-r--r--sources1
3 files changed, 271 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..99f9efc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/valohai_yaml-0.28.0.tar.gz
diff --git a/python-valohai-yaml.spec b/python-valohai-yaml.spec
new file mode 100644
index 0000000..e7d72af
--- /dev/null
+++ b/python-valohai-yaml.spec
@@ -0,0 +1,269 @@
+%global _empty_manifest_terminate_build 0
+Name: python-valohai-yaml
+Version: 0.28.0
+Release: 1
+Summary: Valohai.yaml validation and parsing
+License: MIT License
+URL: https://github.com/valohai/valohai-yaml
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/9e/8b/5c0a22d749c4d4fa42074bf774db0042be05c97a02934fe75815ccb3e519/valohai_yaml-0.28.0.tar.gz
+BuildArch: noarch
+
+Requires: python3-jsonschema
+Requires: python3-pyyaml
+
+%description
+# valohai-yaml
+
+[![Build Status](https://github.com/valohai/valohai-yaml/actions/workflows/ci.yml/badge.svg)](https://github.com/valohai/valohai-yaml/actions/workflows/ci.yml)
+[![Codecov](https://codecov.io/gh/valohai/valohai-yaml/branch/master/graph/badge.svg)](https://codecov.io/gh/valohai/valohai-yaml)
+[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
+
+Parses and validates `valohai.yaml` files.
+
+Valohai YAML files are used to define how your machine learning project workloads and pipelines are ran on the [Valohai](https://valohai.com/) ecosystem. Refer to [Valohai Documentation](https://docs.valohai.com/) to learn how to write the actual YAML files and for more in-depth usage examples.
+
+## Installation
+
+```bash
+pip install valohai-yaml
+```
+
+## Usage
+
+### Validation
+
+Programmatic usage:
+
+```python
+from valohai_yaml import validate, ValidationErrors
+
+try:
+ with open('path/to/valohai.yaml') as f:
+ validate(f)
+except ValidationErrors as errors:
+ print('oh no!')
+ for err in errors:
+ print(err)
+```
+
+Command-line usage:
+
+```bash
+valohai-yaml my_yaml.yaml
+echo $? # 1 if errors, 0 if ok
+```
+
+### Parsing
+
+```python
+from valohai_yaml import parse
+
+with open('path/to/valohai.yaml') as f:
+ config = parse(f)
+
+print(config.steps['cool step'].command)
+```
+
+# Development
+
+```bash
+# setup development dependencies
+pip install -e . -r requirements-test.txt pre-commit
+pre-commit install
+
+# run linting and type checks
+pre-commit run --all-files
+
+# run tests
+pytest
+```
+
+
+%package -n python3-valohai-yaml
+Summary: Valohai.yaml validation and parsing
+Provides: python-valohai-yaml
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-valohai-yaml
+# valohai-yaml
+
+[![Build Status](https://github.com/valohai/valohai-yaml/actions/workflows/ci.yml/badge.svg)](https://github.com/valohai/valohai-yaml/actions/workflows/ci.yml)
+[![Codecov](https://codecov.io/gh/valohai/valohai-yaml/branch/master/graph/badge.svg)](https://codecov.io/gh/valohai/valohai-yaml)
+[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
+
+Parses and validates `valohai.yaml` files.
+
+Valohai YAML files are used to define how your machine learning project workloads and pipelines are ran on the [Valohai](https://valohai.com/) ecosystem. Refer to [Valohai Documentation](https://docs.valohai.com/) to learn how to write the actual YAML files and for more in-depth usage examples.
+
+## Installation
+
+```bash
+pip install valohai-yaml
+```
+
+## Usage
+
+### Validation
+
+Programmatic usage:
+
+```python
+from valohai_yaml import validate, ValidationErrors
+
+try:
+ with open('path/to/valohai.yaml') as f:
+ validate(f)
+except ValidationErrors as errors:
+ print('oh no!')
+ for err in errors:
+ print(err)
+```
+
+Command-line usage:
+
+```bash
+valohai-yaml my_yaml.yaml
+echo $? # 1 if errors, 0 if ok
+```
+
+### Parsing
+
+```python
+from valohai_yaml import parse
+
+with open('path/to/valohai.yaml') as f:
+ config = parse(f)
+
+print(config.steps['cool step'].command)
+```
+
+# Development
+
+```bash
+# setup development dependencies
+pip install -e . -r requirements-test.txt pre-commit
+pre-commit install
+
+# run linting and type checks
+pre-commit run --all-files
+
+# run tests
+pytest
+```
+
+
+%package help
+Summary: Development documents and examples for valohai-yaml
+Provides: python3-valohai-yaml-doc
+%description help
+# valohai-yaml
+
+[![Build Status](https://github.com/valohai/valohai-yaml/actions/workflows/ci.yml/badge.svg)](https://github.com/valohai/valohai-yaml/actions/workflows/ci.yml)
+[![Codecov](https://codecov.io/gh/valohai/valohai-yaml/branch/master/graph/badge.svg)](https://codecov.io/gh/valohai/valohai-yaml)
+[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
+
+Parses and validates `valohai.yaml` files.
+
+Valohai YAML files are used to define how your machine learning project workloads and pipelines are ran on the [Valohai](https://valohai.com/) ecosystem. Refer to [Valohai Documentation](https://docs.valohai.com/) to learn how to write the actual YAML files and for more in-depth usage examples.
+
+## Installation
+
+```bash
+pip install valohai-yaml
+```
+
+## Usage
+
+### Validation
+
+Programmatic usage:
+
+```python
+from valohai_yaml import validate, ValidationErrors
+
+try:
+ with open('path/to/valohai.yaml') as f:
+ validate(f)
+except ValidationErrors as errors:
+ print('oh no!')
+ for err in errors:
+ print(err)
+```
+
+Command-line usage:
+
+```bash
+valohai-yaml my_yaml.yaml
+echo $? # 1 if errors, 0 if ok
+```
+
+### Parsing
+
+```python
+from valohai_yaml import parse
+
+with open('path/to/valohai.yaml') as f:
+ config = parse(f)
+
+print(config.steps['cool step'].command)
+```
+
+# Development
+
+```bash
+# setup development dependencies
+pip install -e . -r requirements-test.txt pre-commit
+pre-commit install
+
+# run linting and type checks
+pre-commit run --all-files
+
+# run tests
+pytest
+```
+
+
+%prep
+%autosetup -n valohai-yaml-0.28.0
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-valohai-yaml -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Tue Apr 11 2023 Python_Bot <Python_Bot@openeuler.org> - 0.28.0-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..3b9651b
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+1abf439fc8eaf8ed4d78f4fd62ee037a valohai_yaml-0.28.0.tar.gz