1<!-- Copyright 2015 The Chromium Authors. All rights reserved. 2 Use of this source code is governed by a BSD-style license that can be 3 found in the LICENSE file. 4--> 5# Code of Conduct 6 7We follow the [Chromium code of conduct]( 8https://chromium.googlesource.com/chromium/src/+/master/CODE_OF_CONDUCT.md) in 9our our repos and organizations, mailing lists, and other communications. 10 11# Workflow 12 13Install [depot_tools] 14(https://www.chromium.org/developers/how-tos/install-depot-tools). 15 16Then checkout the catapult repo. 17 18`git clone https://github.com/catapult-project/catapult.git` 19 20You can then create a local branch, make and commit your change. 21 22``` 23cd catapult 24git checkout -t -b foo origin/master 25... edit files ... 26git commit -a -m "New files" 27``` 28 29Once you're ready for a review do: 30 31`git cl upload` 32 33Once uploaded you can view the CL in Rietveld and request a review by clicking 34the 'publish & mail' link. You can also click the "CQ Dry Run" link to run all 35the tests on your change. 36 37If you get review feedback, edit and commit locally and then do another upload 38with the new files. Before you commit you'll want to sync to the tip-of-tree. 39You can either merge or rebase, it's up to you. 40 41Then, submit your changes through the commit queue by checking the "Commit" box. 42 43Once everything is landed, you can cleanup your branch. 44 45``` 46git checkout master 47git branch -D foo 48``` 49 50# Becoming a committer 51 52If you're new to the chromium-family of projects, you will also need to sign the 53chrome contributors license agreement. You can sign the 54[Contributor License Agreement] 55(https://cla.developers.google.com/about/google-individual?csw=1), which you can 56do online. 57It only takes a minute. If you are contributing on behalf of a corporation, you 58must fill out the [Corporate Contributor License Agreement] 59(https://cla.developers.google.com/about/google-corporate?csw=1) and send it to 60us as described on that page. 61 62If you've never submitted code before, you must add your (or your 63organization's) name and contact info to the Chromium AUTHORS file. 64 65Next, ask an admin to add you (see 66[adding committers](/docs/adding-committers.md)) 67 68# Contributing from a Chromium checkout 69 70If you already have catapult checked out as part of a Chromium checkout and want 71to edit it in place (instead of having a separate clone of the repository), you 72will probably want to disconnect it from gclient at this point so that it 73doesn't do strange things on updating. This is done by editing the .gclient file 74for your Chromium checkout and adding the following lines: 75 76``` 77'custom_deps': { 78 'src/third_party/catapult': None, 79}, 80``` 81 82In order to be able to land patches, you will most likely need to update the 83`origin` remote in your catapult checkout to point directly to this GitHub 84repository. You can do this by executing the following command inside the 85catapult folder (third_party/catapult): 86 87`git remote set-url origin git@github.com:catapult-project/catapult` 88 89# Code style 90 91See the [style guide](/docs/style-guide.md). 92 93# Individual project documentation 94 95Look to individual project documentation for more info on getting started: 96 * [perf dashboard](/dashboard/README.md) 97 * [systrace](/systrace/README.md) 98 * [telemetry](/telemetry/README.md) 99 * [trace-viewer](/tracing/README.md) 100 101# Tests 102 103Check individual project documentation for instructions on how to run tests. 104You can also check the current status of our tests on the 105[waterfall](http://build.chromium.org/p/client.catapult/waterfall). 106Use the "commit" checkbox in rietveld to commit through the commit queue, which 107automatically runs all tests. Run the tests before committing with the 108"CQ dry run" link. 109 110# Updating Chromium's about:tracing (rolling DEPS) 111 112Chromium's DEPS file needs to be rolled to the catapult revision containing your 113change in order for it to appear in Chrome's about:tracing or other 114third_party/catapult files. Follow the [directions for rolling DEPS] 115(/docs/rolling-deps.md) to do this. 116 117# Adding a new project 118 119Please read the [directory structure guide](/docs/directory-structure.md) 120to learn the conventions for new directories. 121