%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 [![pytest](https://github.com/gsy0911/kabutobashi/workflows/pytest/badge.svg)](https://github.com/gsy0911/kabutobashi/actions?query=workflow%3Apytest) [![codecov](https://codecov.io/gh/gsy0911/kabutobashi/branch/main/graph/badge.svg)](https://codecov.io/gh/gsy0911/kabutobashi) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/) [![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/) [![PythonVersion](https://img.shields.io/pypi/pyversions/kabutobashi.svg)](https://pypi.org/project/kabutobashi/) [![PiPY](https://img.shields.io/pypi/v/kabutobashi.svg)](https://pypi.org/project/kabutobashi/) [![Documentation Status](https://readthedocs.org/projects/kabutobashi/badge/?version=latest)](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 [![pytest](https://github.com/gsy0911/kabutobashi/workflows/pytest/badge.svg)](https://github.com/gsy0911/kabutobashi/actions?query=workflow%3Apytest) [![codecov](https://codecov.io/gh/gsy0911/kabutobashi/branch/main/graph/badge.svg)](https://codecov.io/gh/gsy0911/kabutobashi) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/) [![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/) [![PythonVersion](https://img.shields.io/pypi/pyversions/kabutobashi.svg)](https://pypi.org/project/kabutobashi/) [![PiPY](https://img.shields.io/pypi/v/kabutobashi.svg)](https://pypi.org/project/kabutobashi/) [![Documentation Status](https://readthedocs.org/projects/kabutobashi/badge/?version=latest)](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 [![pytest](https://github.com/gsy0911/kabutobashi/workflows/pytest/badge.svg)](https://github.com/gsy0911/kabutobashi/actions?query=workflow%3Apytest) [![codecov](https://codecov.io/gh/gsy0911/kabutobashi/branch/main/graph/badge.svg)](https://codecov.io/gh/gsy0911/kabutobashi) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/) [![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/) [![PythonVersion](https://img.shields.io/pypi/pyversions/kabutobashi.svg)](https://pypi.org/project/kabutobashi/) [![PiPY](https://img.shields.io/pypi/v/kabutobashi.svg)](https://pypi.org/project/kabutobashi/) [![Documentation Status](https://readthedocs.org/projects/kabutobashi/badge/?version=latest)](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 - 0.6.5-1 - Package Spec generated