summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-15 06:44:56 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-15 06:44:56 +0000
commit02635b749e15d23b92776dff08e9ae6d434fe63a (patch)
treeed5bd141a6d5cc934b349b5bfdea0de470edf6f8
parentb08bf4938242683b5ac485b0577da9a045b67903 (diff)
automatic import of python-pipen-args
-rw-r--r--.gitignore1
-rw-r--r--python-pipen-args.spec289
-rw-r--r--sources1
3 files changed, 291 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..71fdfcd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/pipen_args-0.9.7.tar.gz
diff --git a/python-pipen-args.spec b/python-pipen-args.spec
new file mode 100644
index 0000000..3e4aa6b
--- /dev/null
+++ b/python-pipen-args.spec
@@ -0,0 +1,289 @@
+%global _empty_manifest_terminate_build 0
+Name: python-pipen-args
+Version: 0.9.7
+Release: 1
+Summary: Command-line argument parser for pipen.
+License: MIT
+URL: https://github.com/pwwang/pipen-args
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/9e/3e/99d4195b9492afd5dac55cdb4063f5b97c360ae250d83ab5a9731473479e/pipen_args-0.9.7.tar.gz
+BuildArch: noarch
+
+Requires: python3-pipen-annotate
+
+%description
+# pipen-args
+
+Command line argument parser for [pipen][1]
+
+## Usage
+
+```python
+from pipen import Proc, Pipen
+
+
+class Process(Proc):
+ """My process
+
+ Input:
+ a: Input data
+ """
+ input = 'a'
+ input_data = range(10)
+ script = 'echo {{in.a}}'
+
+Pipen().set_start(Process).run()
+```
+
+```shell
+$ python example.py --help
+Usage: test.py [-h | -h+] [options]
+
+Undescribed process.
+Use `@configfile` to load default values for the options.
+
+Pipeline Options:
+ --name NAME The name for the pipeline, will affect the default workdir and
+ outdir. [default: pipen-0]
+ --profile PROFILE The default profile from the configuration to run the pipeline.
+ This profile will be used unless a profile is specified in the
+ process or in the .run method of pipen. You can check the
+ available profiles by running `pipen profile`
+ --outdir OUTDIR The output directory of the pipeline [default: ./<name>-output]
+ --forks FORKS How many jobs to run simultaneously by the scheduler
+ --scheduler SCHEDULER
+ The scheduler to run the jobs
+
+Namespace <in>:
+ --in.a A [A ...] Input data
+
+Optional Arguments:
+ -h, --help, -h+, --help+
+ show help message (with + to show more options) and exit
+```
+
+See more examples in `tests/pipelines/` folder.
+
+## Metadata for Proc envs items
+
+The metadata in the docstring of env items determines how the arguments are defined.
+
+```python
+class Process(Proc):
+ """My process
+
+ # other docstring sections
+
+ Envs:
+ a (<metadata>): ...
+ """
+```
+
+The metadata could be key-value pairs separated by `;`. The separator `:` or `=` is used to
+separate the key and value. The value is optional. If the value is not specified, it
+will be set to `True`. The keys are valid arguments of `argx.ArgumentParser.add_argument`, except that `hidden` will be interpreted as `show=False` in `argx.ArgumentParser.add_argument`. If the value of `choices` is not specified, the subkeys of the env item will be used as the choices.
+
+[1]: https://github.com/pwwang/pipen
+
+
+%package -n python3-pipen-args
+Summary: Command-line argument parser for pipen.
+Provides: python-pipen-args
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-pipen-args
+# pipen-args
+
+Command line argument parser for [pipen][1]
+
+## Usage
+
+```python
+from pipen import Proc, Pipen
+
+
+class Process(Proc):
+ """My process
+
+ Input:
+ a: Input data
+ """
+ input = 'a'
+ input_data = range(10)
+ script = 'echo {{in.a}}'
+
+Pipen().set_start(Process).run()
+```
+
+```shell
+$ python example.py --help
+Usage: test.py [-h | -h+] [options]
+
+Undescribed process.
+Use `@configfile` to load default values for the options.
+
+Pipeline Options:
+ --name NAME The name for the pipeline, will affect the default workdir and
+ outdir. [default: pipen-0]
+ --profile PROFILE The default profile from the configuration to run the pipeline.
+ This profile will be used unless a profile is specified in the
+ process or in the .run method of pipen. You can check the
+ available profiles by running `pipen profile`
+ --outdir OUTDIR The output directory of the pipeline [default: ./<name>-output]
+ --forks FORKS How many jobs to run simultaneously by the scheduler
+ --scheduler SCHEDULER
+ The scheduler to run the jobs
+
+Namespace <in>:
+ --in.a A [A ...] Input data
+
+Optional Arguments:
+ -h, --help, -h+, --help+
+ show help message (with + to show more options) and exit
+```
+
+See more examples in `tests/pipelines/` folder.
+
+## Metadata for Proc envs items
+
+The metadata in the docstring of env items determines how the arguments are defined.
+
+```python
+class Process(Proc):
+ """My process
+
+ # other docstring sections
+
+ Envs:
+ a (<metadata>): ...
+ """
+```
+
+The metadata could be key-value pairs separated by `;`. The separator `:` or `=` is used to
+separate the key and value. The value is optional. If the value is not specified, it
+will be set to `True`. The keys are valid arguments of `argx.ArgumentParser.add_argument`, except that `hidden` will be interpreted as `show=False` in `argx.ArgumentParser.add_argument`. If the value of `choices` is not specified, the subkeys of the env item will be used as the choices.
+
+[1]: https://github.com/pwwang/pipen
+
+
+%package help
+Summary: Development documents and examples for pipen-args
+Provides: python3-pipen-args-doc
+%description help
+# pipen-args
+
+Command line argument parser for [pipen][1]
+
+## Usage
+
+```python
+from pipen import Proc, Pipen
+
+
+class Process(Proc):
+ """My process
+
+ Input:
+ a: Input data
+ """
+ input = 'a'
+ input_data = range(10)
+ script = 'echo {{in.a}}'
+
+Pipen().set_start(Process).run()
+```
+
+```shell
+$ python example.py --help
+Usage: test.py [-h | -h+] [options]
+
+Undescribed process.
+Use `@configfile` to load default values for the options.
+
+Pipeline Options:
+ --name NAME The name for the pipeline, will affect the default workdir and
+ outdir. [default: pipen-0]
+ --profile PROFILE The default profile from the configuration to run the pipeline.
+ This profile will be used unless a profile is specified in the
+ process or in the .run method of pipen. You can check the
+ available profiles by running `pipen profile`
+ --outdir OUTDIR The output directory of the pipeline [default: ./<name>-output]
+ --forks FORKS How many jobs to run simultaneously by the scheduler
+ --scheduler SCHEDULER
+ The scheduler to run the jobs
+
+Namespace <in>:
+ --in.a A [A ...] Input data
+
+Optional Arguments:
+ -h, --help, -h+, --help+
+ show help message (with + to show more options) and exit
+```
+
+See more examples in `tests/pipelines/` folder.
+
+## Metadata for Proc envs items
+
+The metadata in the docstring of env items determines how the arguments are defined.
+
+```python
+class Process(Proc):
+ """My process
+
+ # other docstring sections
+
+ Envs:
+ a (<metadata>): ...
+ """
+```
+
+The metadata could be key-value pairs separated by `;`. The separator `:` or `=` is used to
+separate the key and value. The value is optional. If the value is not specified, it
+will be set to `True`. The keys are valid arguments of `argx.ArgumentParser.add_argument`, except that `hidden` will be interpreted as `show=False` in `argx.ArgumentParser.add_argument`. If the value of `choices` is not specified, the subkeys of the env item will be used as the choices.
+
+[1]: https://github.com/pwwang/pipen
+
+
+%prep
+%autosetup -n pipen-args-0.9.7
+
+%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-pipen-args -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon May 15 2023 Python_Bot <Python_Bot@openeuler.org> - 0.9.7-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..22ac26c
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+441c542e70ff711c2f2406c357c78f07 pipen_args-0.9.7.tar.gz