Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Side by Side Diff: README.md

Issue 725843004: DOC: added appengine.rst (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Rebased and fixed case Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « README ('k') | doc/source/appengine.rst » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 Contributing to the Chrome infra codebase
2 =========================================
3
4 This document explains how to contribute to the Chrome infrastructure codebase.
5 If you want to contribute to the Chromium browser, you're in the wrong place.
6 See
7 [http://dev.chromium.org/getting-involved](http://dev.chromium.org/getting-invol ved)
8 instead. You can find more information on the Chrome infrastructure
9 [here](http://dev.chromium.org/infra).
10
11 Checking out the code
12 ---------------------
13 If you're reading this file, you're probably involved in the Chromium project
14 already. If this is not the case, you might want to read
15 [this page](http://dev.chromium.org/developers/how-tos/get-the-code)
16 to get some background information. In particular, depot_tools needs to be
17 installed by following instructions
18 [here](http://dev.chromium.org/developers/how-tos/install-depot-tools).
19
20 The proper way to check out this repository is (assuming you have depot_tools
21 somewhere in your path) to run:
22
23 mkdir chrome_infra # or whatever name you please
24 cd chrome_infra
25 fetch infra
26
27 This will check out the base repository (infra/) and its dependencies.
28
29
30 Bootstrapping Dependencies
31 --------------------------
32 (See `bootstrap/README.md` for more details).
33
34 Manually create a bootstrap virtualenv environment by running:
35
36 `./bootstrap/bootstrap.py --deps_file bootstrap/deps.pyl`
37
38 This is done for you automatically by `gclient sync` (or `gclient runhooks`).
39
40
41 Invoking tools
42 --------------
43
44 Mixing modules and scripts in the same hierarchy can sometimes be a pain in
45 Python, because it usually requires updating the Python path. The goal for
46 infra/ is to be able to check out the repository and be able to run code right
47 away, without setting up anything. The adopted solution is to use __main__.py
48 files everywhere.
49
50 Example: `python -m infra.services.lkgr_finder` will run the lkgr_finder script.
51
52 To make things easier, a convenience script is located at root level. This will
53 do the same thing: `run.py infra.services.lkgr_finder`. It also provides some
54 additional goodness, like listing all available tools (when invoked without any
55 arguments), and allowing for autocompletion.
56
57 If you want run.py to auto-complete, just run:
58
59 # BEGIN = ZSH ONLY
60 autoload -Uz bashcompinit
61 bashcompinit
62 # END = ZSH ONLY
63
64 eval "$(/path/to/infra/ENV/bin/register-python-argcomplete run.py)"
65 eval "$(/path/to/infra/ENV/bin/register-python-argcomplete test.py)"
66
67 And that's it. You may want to put that in your .bashrc somewhere.
68
69 When debugging, one may prefer to invoke scripts directly without going through
70 a wrapper layer. Doing this from the bash prompt:
71
72 $ source /path/to/infra/misc/testenv.bashrc
73
74 ... will modify the shell environment to match what test.py does. After that,
75 scripts can be invoked directly from the shell:
76
77 $ /path/to/infra/appengine_module/test_results/test/datastorefile_test.py
78
79 AppEngine
80 ---------
81 Infra.git hosts several google appengine projects. In order to support
82 ease of testing and pylint all of the python code for these projects
83 is stored in one shared python package "appengine_module".
84
85 In order to interface well with dev_appserver.py and appcfg.py individual
86 directories exist for the appengine projects under "appengine_apps". Symlinks
87 exist from those directories back into appengine_module to expose the necessary
88 parts of the appengine_module package to run the app in question.
89
90 The 'appengine' directory holds the as-of-yet fully converted Appengine apps.
91 All of those should be split into appengine_apps and appengine_module pieces
92 and appengine_module should be renamed to 'appengine'. See crbug.com/407734.
OLDNEW
« no previous file with comments | « README ('k') | doc/source/appengine.rst » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698