diff options
author | CoprDistGit <infra@openeuler.org> | 2023-06-20 09:09:45 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-06-20 09:09:45 +0000 |
commit | c5f2f1cbb04f064fa9c4a11db5d0305ef1b3ef7d (patch) | |
tree | 99066cd3c36cd981e01c20923f28eca4c269fde9 | |
parent | e47f2dc9563463b1b6816e83d967adb63f94bc60 (diff) |
automatic import of python-kabutobashiopeneuler20.03
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-kabutobashi.spec | 329 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 331 insertions, 0 deletions
@@ -0,0 +1 @@ +/kabutobashi-0.6.5.tar.gz diff --git a/python-kabutobashi.spec b/python-kabutobashi.spec new file mode 100644 index 0000000..704c036 --- /dev/null +++ b/python-kabutobashi.spec @@ -0,0 +1,329 @@ +%global _empty_manifest_terminate_build 0 +Name: python-kabutobashi +Version: 0.6.5 +Release: 1 +Summary: Analyze stock +License: MIT +URL: https://github.com/gsy0911/kabutobashi +Source0: https://mirrors.aliyun.com/pypi/web/packages/cb/2b/6bb6f9db4ba01ca5080f5a45eea19d536ea1ef1d68a62fe41d1c5adc14ca/kabutobashi-0.6.5.tar.gz +BuildArch: noarch + +Requires: python3-pandas +Requires: python3-jpholiday +Requires: python3-lxml +Requires: python3-requests +Requires: python3-beautifulsoup4 +Requires: python3-mplfinance +Requires: python3-matplotlib +Requires: python3-cerberus +Requires: python3-pydantic +Requires: python3-scipy +Requires: python3-xlrd + +%description +# kabutobashi + +[](https://github.com/gsy0911/kabutobashi/actions?query=workflow%3Apytest) +[](https://codecov.io/gh/gsy0911/kabutobashi) +[](https://github.com/psf/black) +[](https://pycqa.github.io/isort/) +[](http://mypy-lang.org/) + +[](https://pypi.org/project/kabutobashi/) +[](https://pypi.org/project/kabutobashi/) +[](https://kabutobashi.readthedocs.io/en/latest/?badge=latest) + +## concept + +class-relationship. + +- `E`: Entity +- `VO`: ValueObject +- `S`: Service +- `A`: Aggregate + +```mermaid +graph TD; + + subgraph Stock + stock[Stock:E] + brand[StockBrand:E] + record[StockRecord:E] + indicator[StockIndicator:E] + + stock --> brand + stock --> record + stock --> indicator + end + + subgraph Stock-to-Analysis + aggregate[StockCodeSingleAggregate:A] + processed[StockDataProcessed:VO] + estimated[StockDataEstimated:VO] + + aggregate --- |Info| stock + aggregate --- |Method| processed + aggregate --- |Analysis| estimated + end + + subgraph Repositories/Storage + repositories[(Storage/Database)] --- | read/write | stock + end + + subgraph Pages + raw_html[RawHtml:VO] + decoder[Decoder:S] + decoded_html[DecodedHtml:VO] + + raw_html --> decoder + decoder --> decoded_html + decoded_html --> repositories + decoded_html --> stock + end + + subgraph Repositories/Web + web[[Web]] --> | crawl | raw_html + end +``` + + +## usage + +```python +import kabutobashi as kb + +df = kb.example() +methods = kb.methods + [kb.basic, kb.pct_change, kb.volatility] +analysis = kb.stock_analysis +agg = kb.StockCodeSingleAggregate.of(entity=df, code="1234").with_processed(methods).with_estimated(stock_analysis=analysis) +print(agg) + +# n日前までの営業日の日付リストを取得する関数 +target_date = "2020-01-01" +date_list = kb.get_past_n_days(target_date, n=40) + +``` + + +%package -n python3-kabutobashi +Summary: Analyze stock +Provides: python-kabutobashi +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-kabutobashi +# kabutobashi + +[](https://github.com/gsy0911/kabutobashi/actions?query=workflow%3Apytest) +[](https://codecov.io/gh/gsy0911/kabutobashi) +[](https://github.com/psf/black) +[](https://pycqa.github.io/isort/) +[](http://mypy-lang.org/) + +[](https://pypi.org/project/kabutobashi/) +[](https://pypi.org/project/kabutobashi/) +[](https://kabutobashi.readthedocs.io/en/latest/?badge=latest) + +## concept + +class-relationship. + +- `E`: Entity +- `VO`: ValueObject +- `S`: Service +- `A`: Aggregate + +```mermaid +graph TD; + + subgraph Stock + stock[Stock:E] + brand[StockBrand:E] + record[StockRecord:E] + indicator[StockIndicator:E] + + stock --> brand + stock --> record + stock --> indicator + end + + subgraph Stock-to-Analysis + aggregate[StockCodeSingleAggregate:A] + processed[StockDataProcessed:VO] + estimated[StockDataEstimated:VO] + + aggregate --- |Info| stock + aggregate --- |Method| processed + aggregate --- |Analysis| estimated + end + + subgraph Repositories/Storage + repositories[(Storage/Database)] --- | read/write | stock + end + + subgraph Pages + raw_html[RawHtml:VO] + decoder[Decoder:S] + decoded_html[DecodedHtml:VO] + + raw_html --> decoder + decoder --> decoded_html + decoded_html --> repositories + decoded_html --> stock + end + + subgraph Repositories/Web + web[[Web]] --> | crawl | raw_html + end +``` + + +## usage + +```python +import kabutobashi as kb + +df = kb.example() +methods = kb.methods + [kb.basic, kb.pct_change, kb.volatility] +analysis = kb.stock_analysis +agg = kb.StockCodeSingleAggregate.of(entity=df, code="1234").with_processed(methods).with_estimated(stock_analysis=analysis) +print(agg) + +# n日前までの営業日の日付リストを取得する関数 +target_date = "2020-01-01" +date_list = kb.get_past_n_days(target_date, n=40) + +``` + + +%package help +Summary: Development documents and examples for kabutobashi +Provides: python3-kabutobashi-doc +%description help +# kabutobashi + +[](https://github.com/gsy0911/kabutobashi/actions?query=workflow%3Apytest) +[](https://codecov.io/gh/gsy0911/kabutobashi) +[](https://github.com/psf/black) +[](https://pycqa.github.io/isort/) +[](http://mypy-lang.org/) + +[](https://pypi.org/project/kabutobashi/) +[](https://pypi.org/project/kabutobashi/) +[](https://kabutobashi.readthedocs.io/en/latest/?badge=latest) + +## concept + +class-relationship. + +- `E`: Entity +- `VO`: ValueObject +- `S`: Service +- `A`: Aggregate + +```mermaid +graph TD; + + subgraph Stock + stock[Stock:E] + brand[StockBrand:E] + record[StockRecord:E] + indicator[StockIndicator:E] + + stock --> brand + stock --> record + stock --> indicator + end + + subgraph Stock-to-Analysis + aggregate[StockCodeSingleAggregate:A] + processed[StockDataProcessed:VO] + estimated[StockDataEstimated:VO] + + aggregate --- |Info| stock + aggregate --- |Method| processed + aggregate --- |Analysis| estimated + end + + subgraph Repositories/Storage + repositories[(Storage/Database)] --- | read/write | stock + end + + subgraph Pages + raw_html[RawHtml:VO] + decoder[Decoder:S] + decoded_html[DecodedHtml:VO] + + raw_html --> decoder + decoder --> decoded_html + decoded_html --> repositories + decoded_html --> stock + end + + subgraph Repositories/Web + web[[Web]] --> | crawl | raw_html + end +``` + + +## usage + +```python +import kabutobashi as kb + +df = kb.example() +methods = kb.methods + [kb.basic, kb.pct_change, kb.volatility] +analysis = kb.stock_analysis +agg = kb.StockCodeSingleAggregate.of(entity=df, code="1234").with_processed(methods).with_estimated(stock_analysis=analysis) +print(agg) + +# n日前までの営業日の日付リストを取得する関数 +target_date = "2020-01-01" +date_list = kb.get_past_n_days(target_date, n=40) + +``` + + +%prep +%autosetup -n kabutobashi-0.6.5 + +%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-kabutobashi -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Jun 20 2023 Python_Bot <Python_Bot@openeuler.org> - 0.6.5-1 +- Package Spec generated @@ -0,0 +1 @@ +0e903fee5df413b05ef03034888a1b89 kabutobashi-0.6.5.tar.gz |