Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
Python 㧠Django ã使ãæã®ãã¹ãã³ã¼ãã®æ¸ãæ¹ãã¾ã¨ãã¾ãããç®çãã¼ã«ã«ç°å¢ã§ãã¹ãã³ã¼ãã«ãããã¹ããå®è¡ãããã«ãã¬ãã¸ã確èªããããããã¯ãã¹ãé§åéçºã«ç§»è¡ãããç°å¢Python 3.5.1Django 1.10.5caverage 4.3.4django-nose 1.4.4åææ¡ä»¶Python , Django ã®ç°å¢ã¯ãã§ã«æ§ç¯æ¸ã¿ãã°ã¤ã³ç»é¢ããã°ã¤ã³å¾ã®ç»é¢ã®å®è£ ã¯å®äºãã¦ããæé coverage 㨠django-nose ã®ã¤ã³ã¹ãã¼ã«pip ã使ã£ã¦coverage 㨠django-nose ãã¤ã³ã¹ãã¼ã«ãã¾ãã$ pip install coverage$ pip install django-nosesettings.py è¨å®è¿½å ... django-noseã¨django-caverageãå©ç¨ãã¦ããæã®åé¡ç¹Django 1.10
coverage.pyã®ã¤ã³ã¹ãã¼ã« coverage.pyã®å®è¡æ¹æ³ coverage.pyã®è¨å® coverage.pyã®ãã©ã°ã¤ã³ ã¾ã¨ã A Complete Beginner's Guide to Djangoã®ãã¥ã¼ããªã¢ã«ãåèã«ä½æãã¦ããæ²ç¤ºæ¿ã¢ããªã®ãã¹ãã³ã¼ãã®ã«ãã¬ãã¸ãè¨æ¸¬ãã¦ã¿ãã coverage.pyã®ã¤ã³ã¹ãã¼ã« ãã¥ã¼ããªã¢ã«ã§ã¯æ§ã ãªãã¹ãã³ã¼ããæ¸ãã¦ãããã«ãã¬ãã¸ï¼ç¶²ç¾ çï¼ãã©ã®ç¨åº¦ãªã®ãè¨æ¸¬ãã¦ã¿ãã ããã¥ã¡ã³ãã«ã¯coverage.pyã®èª¬æãããã®ã§coverage.pyã試ãã¦ã¿ãã coverage.pyã¯pipã³ãã³ãã§ã¤ã³ã¹ãã¼ã«å¯è½ã $ pip install coverage ä»åã¯Pipenvã§ç°å¢ãæ§ç¯ãã¦ããã®ã§ä¸è¨ã³ãã³ãã§ã¤ã³ã¹ãã¼ã«ã $ pipenv install coverage ã¤ã³ã¹ãã¼ã«ã§ãã¦ããã確
pytestã§coverageã測ããããããããã°ãè²ã ã¹ãã¼ãã¢ããããäºæãããã ã¨ããããããã£ã¦ã¿ã話ã venvç°å¢ãä½ã pytestã§ãã¹ãã§ããããã«ãã pytest-covã使ã ã«ãã¬ãã¸ä¸ãã¦ã¿ã djangoã§pytestã§ã«ãã¬ãã¸ãå³ã djangoã®æºå pytestã§djangoããã¹ã pytest + django + coverage çµãã venvç°å¢ãä½ã $ python3.6 -m venv coverage $ . coverage/bin/activate (coverage) $ python -V Python 3.6.5 pytestã§ãã¹ãã§ããããã«ãã ã¨ãããããpytestã§ãã¹ãã§ããããã«ãã¨ãã (coverage) $ pip install pytest (coverage) $ pip freeze |
manage.py help test usage: manage.py test [-h] [--version] [-v {0,1,2,3}] [--settings SETTINGS] [--pythonpath PYTHONPATH] [--traceback] [--no-color] [--noinput] [--failfast] [--testrunner TESTRUNNER] [-t TOP_LEVEL] [-p PATTERN] [-k] [-r] [--debug-mode] [-d] [--parallel [N]] [--tag TAGS] [--exclude-tag EXCLUDE_TAGS] [test_label [test_label ...]] ã³ãã³ãã®ãªãã·ã§ã³ -v {0,1,2,3} --verbosity {0,1,2,3} å®è¡ãã°ã®è©³ç´°
Djangoã®ãã¹ãã«ã¤ãã¦èãã¦ããã¨ããã以ä¸ã®è¨äºã«åºä¼ãã¾ããã Djangoã®ãã¹ãã®æ¸ãæ¹ã«ã¤ãã¦åå¼·ããã®ã§ã¾ã¨ãã - c-bata web Django Best Practice ã¸ã®é #2 å¾è ã®è¨äºã«ãããéããpytestã§ã¯ãã¹ãã®å¤±æå 容ãç´°ããåºãããã§ããã ãã®ãããDjangoåãã®pytestã©ã¤ãã©ãªpytest-djangoã使ã£ã¦ãã¹ãã³ã¼ããæ¸ãã¦ã¿ã¾ããã ç®æ¬¡ ç°å¢ 試ãããã©åãããªãã£ãã㨠試ãã¦ãªãã㨠ãã¹ã対象ã®ã¢ã㪠ã»ããã¢ããã¨ã¢ããªä½æ pytest.iniã®ä½æ Modelã®ãã¹ã URL解決ã®ãã¹ã Viewã®ãã¹ã Clientã使ãå ´å RequestFactoryã使ãå ´å Formã®ãã¹ã å ¨ä½ã®æµãã®ãã¹ã æ£å¸¸ç³» ãªãã¤ã¬ã¯ãã®ç¢ºèª ãã³ãã¬ã¼ãã«æ¸¡ãcontextã®å¤ã®ç¢ºèª Viewã®ç¢ºèª ãã¼ã¿ã
ä¸å¹´ããããã£ãã®ã§å度ã¾ã¨ãã åæ Mac OS X 10.11.6 homebrew Go 1.8.3 zsh neovim v0.2.0 Goèªä½ã®ç®¡ç Go 1.8ããããã©ã«ãã® GOPATH 㯠$HOME/go ã«è¨å®ããã¦ããã cmd/go: assume GOPATH=$HOME/go if not set ä»ããå ¥ããªãããã§ãè¯ãããªã¨æããã©ãèªåã¯ã¾ã Goã®ãã¼ã¸ã§ã³ããã¹ã«å«ãã¦éçºããã¹ã¿ã¤ã«ã§ãã£ã¦ãã£ã¦ãããGoã¯å¾æ¹äºæããã¡ããã¡ã大äºã«ãã¦ãããã®ã§Goã®ãã¼ã¸ã§ã³å¤ãã¦æ¥ã«æåããºã¬ãäºã¯ãããªã«ç¡ãã¨ã¯æããã ãã©ãä¸åº¦ãã¼ã¸ã§ã³ãä¸ãã¦ã³ã³ãã¤ã«ãããã¤ããªãæ«ãæ¤è¨¼ç°å¢ã§èµ°ãããããã©ã¼ãã³ã¹ãã¹ãããçã®ä½æ¥ã主ã«ä»äºã§çºçãã¦ãè¤æ°ãã¼ã¸ã§ã³ãã¼ã«ã«ã«æã£ã¦ããããã±ã¼ã¹ãããã®ã§ä»¥ä¸ã®ãããªã¹ã¿ã¤ã«ã«ãªã£ã¦ãã homebrewã§ã¤
ã¯ããã« aleã使ã£ã¦ãã¾ãããã¨ã©ã¼æãåºåãã¦ããALEGetStatusLineãdeprecatedã«ãªã£ã¦ãã ã¹ãã¼ã¿ã¹ã表示ããæ©è½èªä½ããªããªãã£ã½ãã§ã ã§ãale#statusline#Countãå¼ã³åºãã¦ligthlineã«æ¸¡ãå¿ è¦ãããã¾ãããããé¢åãããããã£ã¦ãããlightline-aleã¨ãããã©ã°ã¤ã³ãããã®ã§ããã使ãã¾ã lightline-aleã®è¨å®æ¹æ³ deinã§ã®è¨å®æ¹æ³ [[plugins]] repo = 'itchyny/lightline.vim' hook_add = ''' let g:lightline = { \ 'colorscheme': 'wombat', \ 'active': { \ 'left': [ [ 'mode', 'paste' ], \ [ 'readonly', 'filename', 'modif
4æ¥æã« Vue.js #1 ã¢ããã³ã ã«ã¬ã³ãã¼ãè¦ãã3æ¥ã®ã¶ãã空ãã¦ããã®ã§æ¥é½æ¸ãã¾ããã ç§ã¯ .vue ãã¡ã¤ã«ãéçæ¤è¨¼ããããã® ESLint Plugin ãéçºãã¦ãã¾ãã eslint-plugin-vue ( ESLint ã«ã¤ãã¦ã¯ãã¡ã: ESLint æåã®ä¸æ© ) ãã®ãã©ã°ã¤ã³ã使ãã¨ã.vueãã¡ã¤ã«ã®ãã³ãã¬ã¼ãé¨åã«ã¤ãã¦ããªã¢ã«ã¿ã¤ã ã§æ§æã¨ã©ã¼ãæ¤åºããããv-bind çã®ãã£ã¬ã¯ãã£ãã®ä½¿ãæ¹ãééã£ã¦ããã¨ãã«ææãã¦ãããããã¾ããã¾ããå ¬å¼ã® Vue.js ã¹ã¿ã¤ã«ã¬ã¤ã ã«æ²¿ãããã«èªåæå½¢ãããã¨ãã§ãã¾ãã ð 試ãã¦ã¿ã eslint-plugin-vue ãç°¡åã«è©¦ãã¦ã¿ãããã«ããªã³ã©ã¤ã³ ãã¢ãããã¾ã (1度ã¢ã¯ã»ã¹ããã°ã以å¾ã¯ãªãã©ã¤ã³ã§ã使ãã¾ã)ãããã§ã³ã¼ããå ¥åãã¦ãã©ã®ãããªã¨ã©ã¼ãåºãã®ããã©ã®ãã
ãã¼ã« [Editor] Atom (Awesome Atom) [Git] gibo (.gitignore èªåçæãã¼ã«) [Git] tig (CLIã¯ã©ã¤ã¢ã³ã) [Git] hub (CLIã¯ã©ã¤ã¢ã³ã) [Git] GitHub Desktop (GUIã¯ã©ã¤ã¢ã³ã) [éç解æ(SQL)] SQLint (Ruby製) [éç解æ(ã·ã§ã«ã¹ã¯ãªãã)] ShellCheck (Haskell製) [éç解æ(ããã¹ãæ ¡æ£)] RedPen [éç解æ(ããã¹ãæ ¡æ£)] textlint Online REPL (Read-eval-print loop) Online-REPs-and-REPLs repl.it - Online REPL, Compiler & IDE Vagrant (Discover Vagrant Boxes, awesome-vagrant) [
1. ã³ã¼ãã£ã³ã°ã¹ã¿ã¤ã«ãç¥ã PEP8 â Style Guide for Python Code PEP257 â Docstring Conventions Pythonã³ãã¥ããã£ãæ¨å¥¨ããã¹ã¿ã¤ã«ãåå¨ãã PEP 8 -- Style Guide for Python Code via http://legacy.python.org/dev/peps/pep-0008/ ã¤ã³ãã³ãã¯ã¹ãã¼ã¹4 è¡ã®é·ãæ大79æå importåã®é åº å½åã¹ã¿ã¤ã« etc .. PEP 257 -- Docstring Conventions via http://legacy.python.org/dev/peps/pep-0257/ ãã¼ã«ã§ãã§ã㯠pep8 ⦠pepe8ã®ãã§ã㯠pep257 ⦠pep257ã®ãã§ã㯠pyflakes ⦠ææ³ã¨ã©ã¼ãªã©ããã§ã㯠flak
Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article? ã¯ããã« GitLab CI/CDã¨CircleCIã®éããæ¯è¼ããè¨äºã§ãã GitLab CI/CDã£ã¦ä½ï¼ GitLab has integrated CI/CD pipelines to build, test, deploy, and monitor your code Rated #1 in the Forrester CI Wave⢠Forresterã«èªããããNo.1 CIãµã¼ãã¹ã GitLab supports development teams with a well-documented installati
ãã¹ãã³ã»ã¬ããã½ãã¯ã¹ã®çãããä¸çä¸ããã§ã¨ããããã¾ãï¼*1 éçã£ã¦ã»ãã¨é¢ç½ãã§ãããããã°ãã¯éçã¨ã³ã¸ãã¢ã§ã.*2 ãã®ã¨ã³ããªã¼ã§ã¯æ¥½ããéçæè¡ãVue.jsã¨Djangoï¼Django REST Frameworkã以ä¸DRFã¨ç¥ãï¼ã®è©±ããµã¯ãã¨æ¸ãããã¨æãã¾ã. ãªãããã®ã¨ã³ããªã¼ã¯å æ¥éå¬ãããPyLadies Tokyo - 4å¨å¹´è¨å¿µãã¼ãã£ã®LTã§ãã£ããã¨ã®èªåã¡ã¢ãããã°ã«ãããã®ã§ã.*3 å ãã¿ PyLadies Tokyo - 4å¨å¹´è¨å¿µãã¼ãã£ã®LTã§è©±ããå 容ããã¼ã¹ã§ã. speakerdeck.com Djangoã¨Vue.jsããã¦Ohtani-San - Pythonã§äºåæµããã #PyLadiesTokyo 4å¨å¹´ TL;DR è¤æ°ã«ãã´ãªã®ãã¼ã¿ãSPA + REST APIã§æ±ããªããæåããHATEOASï¼Hyperme
ãã®ã¨ã³ããªã¼ã¯ãVue.js #3 Advent Calendar 2018ã¢ããã³ãã«ã¬ã³ãã¼åæ¥ã®è¨äºã§ã. éå¹ææãã¤ã¨ãã¾ãã@shinyorkeã¨ç³ãã¾ã. ãã®è¨äºã§ã¯ãããã¼ã¿ãµã¤ã¨ã³ã¹ããããã©èªåã§å¯è¦åããã·ã¥ãã¼ãä½ãã¨é¢ç½ããï¼ãã£ã¦ãããã¼ãã§ã nuxt-core-ui vue-chartjs ã§å®éä½ã£ãæã®åã©ããããã¦ãã¦ãç´¹ä»ãã¾ã. TL;DR ãã¼ã¿ãµã¤ã¨ã³ã¹ã«å¿ è¦ãªããã·ã¥ãã¼ããä½ããããªã£ããnuxt-core-uiã使ãããï¼ nuxt-core-uiã®ã°ã©ãã®åçæ´æ°ã¯vue-chartjsã®mixins.reactivePropã§ãAPIï¼ãã¼ã¿ï¼ã®å¼ã³åºãã¯æ®éã«axiosã§ããã ãªã¬ãªã¬åæåºç¤ã¯ä½ãã¨æ¥½ãã å®æã¤ã¡ã¼ã¸ ãã¼ã¿ï¼DBã¨ããä½ã§ãããï¼ãã°ã©ãã§å¯è¦åãããRedashï¼ã®ç°¡æçï¼ã£ã½ãããã·ã¥ãã¼ãã®éå½¢ãn
tl;dr; Pythonã®Linterã§ããflake8ã¯pep8ã«å¾ã£ã¦ããããã¨æãã¦ããã¾ããã ããã¥ã¢ã«ã§è¡ãã¨ãªããªãã«é¢åãªä¿®æ£æ¡ãæ示ãã¾ãã è¿é Golangã®èªåãã©ã¼ããã¿ã«æ £ãã¦ãã¾ã£ãèªåã¨ãã¦ã¯ã ããåæã«ãã£ã¦ããããã¨ã¡ããã¡ããæã£ã¦ã¾ããã éåæã«Linterãå®è¡ããVimãã©ã°ã¤ã³ã¨ãã¦æåãªALEã«ã¯ã ã¨ã©ã¼ç®æãèªåã§ä¿®æ£ããALEFixã³ãã³ãããããåã ãããã£ã¦ã¿ããããªã¨æã£ã¦ããã®ã§ã ãã®æ©ä¼ã«ALEã§Pythonã³ã¼ãã®Lintã¨èªåæ´å½¢ããããã¦ã¿ããã¨æãã¾ãã åæ ç§ã¯ç´ ã®Vimã§ã¯ãªãNeoVim使ããªã®ã§ãã£ã¡ã使ã£ãæ¹æ³ã«ãªãã¾ãã ç´ ã®Vimã¨ã¯Pythonã®ãã¹è§£æ±ºã®ä»æ¹ãç°ãªãã®ã§ã注æãã ããã NVIM v0.3.1 ãã¨ALEã使ãã®ã§ALEã®ã¤ã³ã¹ãã¼ã«ã¯ãã¡ããå¿ è¦ã§ããå ¬å¼ã¯ä¸å¯§ã«æ¸ãã¦ããã®
è¤æ°ã® Python ãã¼ã¸ã§ã³ã§ãã¹ããå®è¡ãããã¼ã«ã« tox ãããã¾ãã tox 㨠pytest 㧠Python 2/3 両対å¿ã®ãã¹ããå®è¡ãã - forest book tox ãã¼ã«ãã®ãã®ãã¨ã¦ã便å©ãªã®ã§ããããã® tox ãã¹ãã並åå®è¡ãã¦ããããã¼ã«ããªãªã¼ã¹ããã¾ããã detox: Python Package Index æ¢ã« tox ã使ã£ã¦ããç°å¢ã§ããã°ãdetox ãã¤ã³ã¹ãã¼ã«ããã ãã§è¯ãã§ãã $ pip install detox 使ãæ¹ã¯ tox ã¨å ¨ãåãã§ç¹å¥ãªè¨å®ã¯ä¸è¦ã§ããtox ã³ãã³ããå®è¡ãã代ããã« detox ã³ãã³ããå®è¡ãã¾ãã試ãã«å®è¡ãã¦ã¿ã¾ãããã (test)$ detox py26 create: /Users/t2y/work/repo/littlehttpserver/.tox/py26 GLOB s
libuvã®Pythonå®è£ ã§ããpyuvã®Python3対å¿ãã¦ããã¨ãã«ãPython2.6/2.7/3.0/3.1/3.2ã§åå¥ã«ãã¹ãããå¿ è¦ãããã¾ããã åãã¼ã¸ã§ã³ã®Pythonãå ¥ããã®ãå²ã¨å¤§å¤ã ããåãã¼ã¸ã§ã³ãã¨ã«ç¢ºèªããã®ãé常ã«æéã§ãã lazyãªç§ã«ã¯ãããªã®ãã£ã¦ããã¾ãããããã¼ãããã©ããã¼ã ã¨ããããã§ãããããã¹ããã¼ã«ãããããæ¢ãã¦ãããã79.py㧠@aodag ããã«toxãæãã¦ããã ãã¾ããã æ©é使ã£ã¦ã¿ãã®ã§ã軽ãã¡ã¢ãæ®ãã¦ããã¾ãã ããã¥ã¡ã³ã âãèªãã°å¤§ä½ãããã¯ãã Welcome to the tox automation project â tox 1.4.2-1 documentation ãã£ãã説æãã㨠Pythonã©ã¤ãã©ãªãè¤æ°ãã¼ã¸ã§ã³ã§ãã¹ããããã¼ã«ã§ãã CI(Jenkinsãªã©)ã§ä½¿ããã¨ãæ³
" è¡æ° set number set noswapfile " mapping inoremap <silent> <C-j> <ESC> nnoremap <silent> <Space>w :w<CR> filetype indent on set tabstop=4 set shiftwidth=4 set expandtab " ãã©ã°ã¤ã³ãã¤ã³ã¹ãã¼ã«ããããã£ã¬ã¯ã㪠let s:dein_dir = expand('~/.cache/dein') " dein.vim æ¬ä½ let s:dein_repo_dir = s:dein_dir . '/repos/github.com/Shougo/dein.vim' " dein.vim ããªããã° github ããè½ã¨ãã¦ãã if &runtimepath !~# '/dein.vim' if !isdirectory(
çµç·¯ 転è·ãã¦Pythonã¡ã¤ã³ã®ä¼ç¤¾ã§åãã¦ã¾ã ã¨ãã£ã¿ãã©ã¹ã¡ã³ãã¯ãªããªã£ã¦Vim使ã£ã¦ãããä¼ç¤¾ã§ã Vimã§Pythonãã´ãªã´ãªãããç°å¢ãä½ãã è¿½è¨ ä»¥åãã®è¨äºãæ¸ãã¦ããããããçµã¡ã¾ããã ãã¾ã ã«ããã¾ã«ã¤ã¤ãã¨ããé£ãã§ãã¦ããããããæ°æã¡ã¨ã¨ãã«ã è¨äºä½æå½æã¨ã¯ã ãã¶vimrcã代ãããå 容ãå¤ãã¾ã¾ã§ç³ã訳ãªããªã¨æã追è¨ãããã¦é ãã¾ããã åãã©ã°ã¤ã³ã®è¨å®ãè¨è¼ããã®ã§åèã«ãã¦ããã ããã°å¹¸ãã§ãã ãªãä¸éãè¨å®ããã¨ãããªãã¾ãã å¿ é ä¼ç¤¾ã«å ¥ã£ã¦ããvimã®è¨å®ããã¹ã¦neovimç¨ã«æ¸ãç´ãã¾ããã ä»ç°å¢æ§ç¯ãããªããµã¯ãµã¯åãneovimã§ãã£ã¦ããã¾ãããã vim8ã®ãã©ã°ã¤ã³å¯¾å¿ç¶æ³ãå¤ãããdeoplete以å¤ã§ããã°vim8ã§åãã¾ãã ãããç§ã¯deopleteã使ãããã®ã§neovimã§ãã neovim 0.2.0
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}