Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Pythonによるパッケージ開発〜異常検知パッケージをつくってみた

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on.
Avatar for tsurubee tsurubee
October 26, 2017

 Pythonによるパッケージ開発〜異常検知パッケージをつくってみた

Pythonによるパッケージ開発の手法と特異スペクトル変換法を実装した異常検知パッケージの紹介

Avatar for tsurubee

tsurubee

October 26, 2017
Tweet

More Decks by tsurubee

Other Decks in Technology

Transcript

  1. TFUVQQZͷத਎ from setuptools import setup, find_packages setup( name='banpei', version='0.0.1', description='Anomaly

    detection library with Python', author='Tsuruta', packages=find_packages(exclude=('tests', 'docs')), include_package_data=True, test_suite='tests', install_requires=['numpy', 'pandas', 'scipy'] )
  2. $ python setup.py --help-commands Standard commands: build build everything needed

    to install build_py "build" pure Python modules (copy to build directory) build_ext build C/C++ and Cython extensions (compile/link to build directory) build_clib build C/C++ libraries used by Python extensions build_scripts "build" scripts (copy and fixup #! line) clean clean up temporary files from 'build' command install install everything from build directory install_lib install all Python modules (extensions and pure Python) install_headers install C/C++ header files install_scripts install scripts (Python or otherwise) install_data install data files sdist create a source distribution (tarball, zip file, etc.) register register the distribution with the Python package index bdist create a built (binary) distribution ・・ʢҰ෦লུʣ TFUVQQZΛॻ͘ͱɾɾ ύοέʔδؔ࿈ͷૢ࡞ΛίϚϯυϥΠϯ͔Β࣮ߦͰ͖Δ
  3. $ python setup.py --help-commands Standard commands: build build everything needed

    to install build_py "build" pure Python modules (copy to build directory) build_ext build C/C++ and Cython extensions (compile/link to build directory) build_clib build C/C++ libraries used by Python extensions build_scripts "build" scripts (copy and fixup #! line) clean clean up temporary files from 'build' command install install everything from build directory install_lib install all Python modules (extensions and pure Python) install_headers install C/C++ header files install_scripts install scripts (Python or otherwise) install_data install data files sdist create a source distribution (tarball, zip file, etc.) register register the distribution with the Python package index bdist create a built (binary) distribution ・・ʢҰ෦লུʣ TFUVQQZΛॻ͘ͱɾɾ ύοέʔδؔ࿈ͷૢ࡞ΛίϚϯυϥΠϯ͔Β࣮ߦͰ͖Δ
  4. TFUVQQZΛॻ͘ͱɾɾ ίϚϯυͰϢχοτςετ΋Ͱ͖Δ $ python setup.py test running test running egg_info

    writing requirements to banpei.egg-info/requires.txt writing top-level names to banpei.egg-info/top_level.txt writing dependency_links to banpei.egg-info/dependency_links.txt writing banpei.egg-info/PKG-INFO reading manifest file 'banpei.egg-info/SOURCES.txt’ reading manifest template 'MANIFEST.in’ writing manifest file 'banpei.egg-info/SOURCES.txt’ running build_ext test_hotelling (tests.test_hotelling.TestHotelling) ... ok test_sst (tests.test_sst.TestSST) ... ok ---------------------------------------------------------------------- Ran 2 tests in 1.085s OK
  5. #BOQFJʢ൪ฌʣ ɿ1ZUIPO੡ҟৗݕ஌ύοέʔδ ࣌ࠁ ཤྺߦྻ" ςετߦྻ# ओ෦෼ۭؒ ",''', ( ",''', (

    มԽ౓ #BOQFJͷಛ௃ ಛҟεϖΫτϧม׵๏ͷ࣮૷ ʮೖ໳ػցֶशʹΑΔҟৗݕ஌ ʕ3ʹΑΔ࣮ફΨΠυʯͷਤ Λࢀߟʹ࡞੒