前フリ Pythonにはpydocというモジュールがあって、これを使うと同じようにAPIリストが出力できると思っていた。今までDjangoのコードを書いてみて、いわゆるヘッダーコメントとかドキュメンテーションコメントと言われているものをなんとなくjavadocライクに書いていたが、pydocだとあんまり期待した通りのHTMLを出力してくれないことが分かった。 自分が期待していたのは、 @タグでクラス、関数属性に関する情報を出力 phpDocumentorのように、テンプレートを変更可能 というものだったが、あんまりよろしくなかった。調べてみると、epydocというツールで実現できそうだったが、テンプレートはないらしい。もうちょっと調べてみると、Sphinxというドキュメンテーションツールがあるそうだ。すでに、以前のエントリーでちょっとした使い方について書いたが、インストール方法とかを書いて
いつの間にか pep8 の 79 文字制限のところがゆるくなってたのを教えてもらった。 pep8 そろそろ 120 文字くらいにならんのかな— ねじめちゃん (@drillbits) 2013, 10月 9 @drillbits 変わったよね、この間。— V (@voluntas) 2013, 10月 9 @drillbits 99文字になってるよ— Hajime Nakagami (@hajime_nakagami) 2013, 10月 9 @drillbits "いくつかのチームはより長い行を強く好みます。 あるチームによって、排他的あるいは主導的にメンテナンスされているコードは、 そのチームで合意が取れるのであれば、ウィンドウ幅の制限を80から100に 増やしてもいいでしょう。"— V (@voluntas) 2013, 10月 9 @drillbits https://t.co/P
Note It is very important to install Flake8 on the correct version of Python for your needs. If you want Flake8 to properly parse new language features in Python 3.5 (for example), you need it to be installed on 3.5 for Flake8 to understand those features. In many ways, Flake8 is tied to the version of Python on which it runs.
Meta License: MIT License (Expat License) Author: Steven Myint Tags beautify, code, format, formatter, reformat, style pyformat formats Python code to follow a consistent style. Features Formats code to follow the PEP 8 style guide (using autopep8). Removes unused imports (using autoflake). Formats docstrings to follow PEP 257 (using docformatter). Makes strings all use the same type of quote wher
使い方 インストール $ pip install plop プロファイルする。 $ python -m plop.collector autopep8.py autopep8.py $ ls /tmp/plop.out -rw-rw-r-- 1 hattori hattori 40397 5月 12 22:41 plop.out デフォルトだと /tmp/plop.out にプロファイルデータがダンプされる。 コールグラフ表示してみる。 $ python -m plop.viewer --port=8911 --datadir=/tmp ブラウザから /tmp/plop.out をクリックすると以下のようなコールグラフが表示されます。
エキPy読書会 14 (2011/7/5)¶ 日時: 2011/7/5 19:30 - 22:00 範囲: 第11章(p295~): テスト駆動開発 エキスパートPythonプログラミングの読書会14回目。 テスト駆動開発について。原則とテストの種類、スタブ、モック、ドキュメント駆動開発などについて。 相変わらず本を読まない読書会、どころか、話があちこちに派生したため本とかもうどうで(ry 次回はモックとかのあたりから続きです。 会場の様子¶ 今回は会議室いっぱいに集まりました。 質疑応答(覚えてる範囲)¶ Q: テスト自身のバグとかってどう防止するのー? テストしやすい切り出し方をして人間の目で判断するのー? 複雑な入力と出力のテスト対象だと、勘違いすることもあるのでは? Web だと、モデルのテストはがんばるけど、ビューのテストは適当に流すとか。 domain specific な部分
Flake8 Flake8 is a wrapper around these tools: PyFlakes pycodestyle Ned Batchelder’s McCabe script Flake8 runs all the tools by launching the single flake8 command. It displays the warnings in a per-file, merged output. It also adds a few features: files that contain this line are skipped: # flake8: noqa lines that contain a # noqa comment at the end will not issue warnings. you can ignore specifi
このサイトについて JOCVの平成22年度3次隊で南米某国に派遣中の管理者が書き散らしたWikiサイトです(参考:なぜWikiなのか)。 ↑
Pylint development is now under the umbrella of the Python Code Quality Authority at https://github.com/PyCQA/pylint/ Pylint was hosted on logilab.org from its creation in 2001 until it moved to Bitbucket some time around 2013. The tickets did not get ported to Bitbucket nor GitHub. To help preserve history, they will be kept here for some time. All further development will be done elsewhere. Foll
autopep8 automatically formats Python code to conform to the PEP 8 style guide. It uses the pycodestyle utility to determine what parts of the code needs to be formatted. autopep8 is capable of fixing most of the formatting issues that can be reported by pycodestyle. Installation From pip: $ pip install --upgrade autopep8 Consider using the --user option. Requirements autopep8 requires pycodestyle
はじめに こんにちは、Python界の情弱です。最近は色々とPythonの開発環境も変化してきていて、ようやくPython2.xとPython3.xを行き来しながら開発する体制が整ってきたという印象を受けています。ここしばらくは色々と試していたのですが、ようやく鉄板っぽい方法にたどり着いたのでメモしておきます。 なお、後半はPythonに限らない内容なので、他のLLを使っていても使えそうかなと思っています。この環境を設定すると何ができるのかというと、以下のことすべてが、無料で、自鯖を立てることなく行えます。 開発環境の整理(virtualenv) ローカルでの複数環境のテスト容易化(tox+pytest) CIによるテスト(Travis-CI) ドキュメントの自動ビルドおよびドキュメントの公開(ReadTheDocs) 概要 とりあえず全体像を先に共有しておきます。ちょっとでかいですがご了
趣味プログラマです、こんにちわ。一応生きてます。 さて、Pythonista各位におかれましてはmoratoriumをエンジョイされていますでしょうか。そろそろライブラリも著名なものはPython3に対応してきましたし、そろそろ本格的にPython3、となっているころ合いですね。というか、Python3に対応してないとちょっと恥ずかしくなってきましたね。 とはいえ、Python2は根強く残るでしょう。というわけでPython2とPython3両方で動くコードを書きましょう。テストも書くのは当たり前ですし、せっかくなのでCIもしましょう。 と私も最近思ったので快適に開発を進めるための環境についてメモです。 github : 言わずもがなですね。 travis : githubと連携してCIできるサービス。P言語にも対応していて、最近アツいです。 tox : 複数のPython処理系でvirt
Note This document is being retained solely until the setuptools documentation at https://setuptools.readthedocs.io/en/latest/setuptools.html independently covers all of the relevant information currently included here. The setup script is the centre of all activity in building, distributing, and installing modules using the Distutils. The main purpose of the setup script is to describe your modul
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く