summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-15 06:48:42 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-15 06:48:42 +0000
commit9e69c4680933623d5d3314ebe6b60c370a1cc64e (patch)
treef638afc5d1efc31fa39b1719c2548ed53f8d177a
parente6399622842a08cefdddbeb39432f9e9d778bae4 (diff)
automatic import of python-qiwugrader
-rw-r--r--.gitignore1
-rw-r--r--python-qiwugrader.spec424
-rw-r--r--sources1
3 files changed, 426 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..8a0460d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/QiwuGrader-1.9.8.tar.gz
diff --git a/python-qiwugrader.spec b/python-qiwugrader.spec
new file mode 100644
index 0000000..204ff9c
--- /dev/null
+++ b/python-qiwugrader.spec
@@ -0,0 +1,424 @@
+%global _empty_manifest_terminate_build 0
+Name: python-QiwuGrader
+Version: 1.9.8
+Release: 1
+Summary: Qiwu auto test tool, supports accuracy/pressure tests for knowledge base, QA API and server backend
+License: GNU General Public License v3 (GPLv3)
+URL: https://github.com/noahzark/QiwuGrader
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/ac/21/c4a534108eb76a7d5e538ce556bfedac785eb49c231caea5889801e992ea/QiwuGrader-1.9.8.tar.gz
+BuildArch: noarch
+
+Requires: python3-requests
+Requires: python3-pyyaml
+Requires: python3-enum34
+Requires: python3-xlrd
+Requires: python3-gevent
+Requires: python3-pyqt5
+Requires: python3-srt
+
+%description
+# QiwuGrader
+
+Qiwu auto test tool, supports `accuracy / pressure` tests for `knowledge base, QA API and server backend`
+
+[Chinese version](https://github.com/noahzark/QiwuGrader/blob/master/README_ZH.md)
+
+[TOC]
+
+## 1. Author
+
+Feliciano Long
+
+Zhiyu.Zhou
+
+[Statics](https://github.com/noahzark/QiwuGrader/graphs/contributors)
+
+## 2. Supports
+
+Python2 > 2.7 and Python3 (preferred)
+
+## 3. Installation
+
+### Install from PYPI
+
+`pip install QiwuGrader`
+
+### Download source code
+
+1. For Windows users please download (Mac users could skip this step)
+
+https://www.python.org/ftp/python/2.7.15/python-2.7.15.msi
+
+2. (Optional) If Environment Variables is not set correctly, add python executable and pip script to system Path. [How to](https://www.pythoncentral.io/add-python-to-path-python-is-not-recognized-as-an-internal-or-external-command/)
+
+3. Install requirements
+
+``` bash
+pip install -r requirements.txt
+```
+
+### ~~Download release~~
+
+Deprecated, please install using pip
+
+[~~Release executable~~](https://github.com/noahzark/QiwuGrader/releases)
+
+## 4. Run
+
+last two parameters are ignorable
+
+### Run from module
+
+```bash
+qiwugrader [testcase] [session number] [test duration]
+```
+
+or
+
+```bash
+python -m qiwugrader.app [testcase] [session number] [test duration]
+```
+
+### Run from source
+
+```bash
+python qiwugrader/app.py [testcase] [session number] [test duration]
+```
+
+## 5. Usage
+
+### single session test
+
+test one case:
+
+``` bash
+qiwugrader ./testcases/test1.yml
+```
+
+test multiple cases:
+
+``` bash
+qiwugrader ./testcases/test1.yml ./testcases/test2.yml
+```
+
+### multiple session test (multi threading)
+
+Use multiple threads to test, in this mode only one CPU is used.
+
+start 10 sessions in 5 seconds
+
+``` bash
+qiwugrader ./testcases/test3.yml 10 5
+```
+
+`print_conversation` switch is suggested to turn off in multiple session test to make report more readable
+
+### multiple session test (multi processing)
+
+Use multiple processes to test, in this mode the program will start **logical CPU number** processes (each assigned `session number DIV CPU number` tasks)
+
+Similar to multi threading test, this mode will be enabled when **session count larget than 1000** and **start interval less than 0.1s**
+
+start 1200 sessions in 60 seconds
+
+``` bash
+qiwugrader ./testcases/test4.yml 1200 60
+```
+
+## 6. Configuration
+
+Examples are under `/testcases` folder
+
+Check `test1` (full explanation) and `test2` (minimum test case) for knowledge tests, `test3` (json request / QA dialogue) and `test4` (form request / knowledge backend) for api test
+
+
+
+
+%package -n python3-QiwuGrader
+Summary: Qiwu auto test tool, supports accuracy/pressure tests for knowledge base, QA API and server backend
+Provides: python-QiwuGrader
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-QiwuGrader
+# QiwuGrader
+
+Qiwu auto test tool, supports `accuracy / pressure` tests for `knowledge base, QA API and server backend`
+
+[Chinese version](https://github.com/noahzark/QiwuGrader/blob/master/README_ZH.md)
+
+[TOC]
+
+## 1. Author
+
+Feliciano Long
+
+Zhiyu.Zhou
+
+[Statics](https://github.com/noahzark/QiwuGrader/graphs/contributors)
+
+## 2. Supports
+
+Python2 > 2.7 and Python3 (preferred)
+
+## 3. Installation
+
+### Install from PYPI
+
+`pip install QiwuGrader`
+
+### Download source code
+
+1. For Windows users please download (Mac users could skip this step)
+
+https://www.python.org/ftp/python/2.7.15/python-2.7.15.msi
+
+2. (Optional) If Environment Variables is not set correctly, add python executable and pip script to system Path. [How to](https://www.pythoncentral.io/add-python-to-path-python-is-not-recognized-as-an-internal-or-external-command/)
+
+3. Install requirements
+
+``` bash
+pip install -r requirements.txt
+```
+
+### ~~Download release~~
+
+Deprecated, please install using pip
+
+[~~Release executable~~](https://github.com/noahzark/QiwuGrader/releases)
+
+## 4. Run
+
+last two parameters are ignorable
+
+### Run from module
+
+```bash
+qiwugrader [testcase] [session number] [test duration]
+```
+
+or
+
+```bash
+python -m qiwugrader.app [testcase] [session number] [test duration]
+```
+
+### Run from source
+
+```bash
+python qiwugrader/app.py [testcase] [session number] [test duration]
+```
+
+## 5. Usage
+
+### single session test
+
+test one case:
+
+``` bash
+qiwugrader ./testcases/test1.yml
+```
+
+test multiple cases:
+
+``` bash
+qiwugrader ./testcases/test1.yml ./testcases/test2.yml
+```
+
+### multiple session test (multi threading)
+
+Use multiple threads to test, in this mode only one CPU is used.
+
+start 10 sessions in 5 seconds
+
+``` bash
+qiwugrader ./testcases/test3.yml 10 5
+```
+
+`print_conversation` switch is suggested to turn off in multiple session test to make report more readable
+
+### multiple session test (multi processing)
+
+Use multiple processes to test, in this mode the program will start **logical CPU number** processes (each assigned `session number DIV CPU number` tasks)
+
+Similar to multi threading test, this mode will be enabled when **session count larget than 1000** and **start interval less than 0.1s**
+
+start 1200 sessions in 60 seconds
+
+``` bash
+qiwugrader ./testcases/test4.yml 1200 60
+```
+
+## 6. Configuration
+
+Examples are under `/testcases` folder
+
+Check `test1` (full explanation) and `test2` (minimum test case) for knowledge tests, `test3` (json request / QA dialogue) and `test4` (form request / knowledge backend) for api test
+
+
+
+
+%package help
+Summary: Development documents and examples for QiwuGrader
+Provides: python3-QiwuGrader-doc
+%description help
+# QiwuGrader
+
+Qiwu auto test tool, supports `accuracy / pressure` tests for `knowledge base, QA API and server backend`
+
+[Chinese version](https://github.com/noahzark/QiwuGrader/blob/master/README_ZH.md)
+
+[TOC]
+
+## 1. Author
+
+Feliciano Long
+
+Zhiyu.Zhou
+
+[Statics](https://github.com/noahzark/QiwuGrader/graphs/contributors)
+
+## 2. Supports
+
+Python2 > 2.7 and Python3 (preferred)
+
+## 3. Installation
+
+### Install from PYPI
+
+`pip install QiwuGrader`
+
+### Download source code
+
+1. For Windows users please download (Mac users could skip this step)
+
+https://www.python.org/ftp/python/2.7.15/python-2.7.15.msi
+
+2. (Optional) If Environment Variables is not set correctly, add python executable and pip script to system Path. [How to](https://www.pythoncentral.io/add-python-to-path-python-is-not-recognized-as-an-internal-or-external-command/)
+
+3. Install requirements
+
+``` bash
+pip install -r requirements.txt
+```
+
+### ~~Download release~~
+
+Deprecated, please install using pip
+
+[~~Release executable~~](https://github.com/noahzark/QiwuGrader/releases)
+
+## 4. Run
+
+last two parameters are ignorable
+
+### Run from module
+
+```bash
+qiwugrader [testcase] [session number] [test duration]
+```
+
+or
+
+```bash
+python -m qiwugrader.app [testcase] [session number] [test duration]
+```
+
+### Run from source
+
+```bash
+python qiwugrader/app.py [testcase] [session number] [test duration]
+```
+
+## 5. Usage
+
+### single session test
+
+test one case:
+
+``` bash
+qiwugrader ./testcases/test1.yml
+```
+
+test multiple cases:
+
+``` bash
+qiwugrader ./testcases/test1.yml ./testcases/test2.yml
+```
+
+### multiple session test (multi threading)
+
+Use multiple threads to test, in this mode only one CPU is used.
+
+start 10 sessions in 5 seconds
+
+``` bash
+qiwugrader ./testcases/test3.yml 10 5
+```
+
+`print_conversation` switch is suggested to turn off in multiple session test to make report more readable
+
+### multiple session test (multi processing)
+
+Use multiple processes to test, in this mode the program will start **logical CPU number** processes (each assigned `session number DIV CPU number` tasks)
+
+Similar to multi threading test, this mode will be enabled when **session count larget than 1000** and **start interval less than 0.1s**
+
+start 1200 sessions in 60 seconds
+
+``` bash
+qiwugrader ./testcases/test4.yml 1200 60
+```
+
+## 6. Configuration
+
+Examples are under `/testcases` folder
+
+Check `test1` (full explanation) and `test2` (minimum test case) for knowledge tests, `test3` (json request / QA dialogue) and `test4` (form request / knowledge backend) for api test
+
+
+
+
+%prep
+%autosetup -n QiwuGrader-1.9.8
+
+%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-QiwuGrader -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon May 15 2023 Python_Bot <Python_Bot@openeuler.org> - 1.9.8-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..2d51a78
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+e11756b4e6b548ee20b0251c88a5101f QiwuGrader-1.9.8.tar.gz