contributing to the odoo community association...

20
Contributing to the Odoo Community Association (OCA) © Gary Larson

Upload: leduong

Post on 06-Feb-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Contributing to the Odoo Community Association (OCA)docs.huihoo.com/odoo/training/reference-material/contributing-to... · / 3/ What is the OCA ? A not for profit organization Serves

Contributing to

the Odoo Community Association (OCA)

© Gary Larson

Page 2: Contributing to the Odoo Community Association (OCA)docs.huihoo.com/odoo/training/reference-material/contributing-to... · / 3/ What is the OCA ? A not for profit organization Serves

2/www.camptocamp.com /

Come and talk with us at the OCA Booth

© Gary Larson

Page 3: Contributing to the Odoo Community Association (OCA)docs.huihoo.com/odoo/training/reference-material/contributing-to... · / 3/ What is the OCA ? A not for profit organization Serves

3/www.camptocamp.com /

What is the OCA ?

■A not for profit organization

■http://odoo-community.org/

■Serves as umbrella for 105 github projects

○https://github.com/OCA/

○Each hosting several Odoo addons

○Development shared across 67 teams

Page 4: Contributing to the Odoo Community Association (OCA)docs.huihoo.com/odoo/training/reference-material/contributing-to... · / 3/ What is the OCA ? A not for profit organization Serves

4/www.camptocamp.com /

How can you get involved?

■Follow us

■Test and review and use our modules

■Submit code and documentation

■Become a member

Page 5: Contributing to the Odoo Community Association (OCA)docs.huihoo.com/odoo/training/reference-material/contributing-to... · / 3/ What is the OCA ? A not for profit organization Serves

5/www.camptocamp.com /

Follow us

■The web site

■The blog

https://odoo-community.org/blog/news-1

■Twitter @OdooCommunity

■The contributors mailing list

■https://odoo-community.org/groups/15

Page 6: Contributing to the Odoo Community Association (OCA)docs.huihoo.com/odoo/training/reference-material/contributing-to... · / 3/ What is the OCA ? A not for profit organization Serves

6/www.camptocamp.com /

Participate

■Test the modules

○You can use http://runbot.odoo-community.org/

■Create a github account, and use it to report issues

■Test and review pull requests

○The runbot makes this easy

Page 7: Contributing to the Odoo Community Association (OCA)docs.huihoo.com/odoo/training/reference-material/contributing-to... · / 3/ What is the OCA ? A not for profit organization Serves

7/www.camptocamp.com /

Propose documentation and code

■You'll need to sign the Contributor License Agreement

(CLA)

■Make Pull Requests on the projects

○Watch for the output of the CI tools

○Wait for reviews, and discuss with the reviewers, improve your code

■Try to keep a good submitted PR / reviewed PR ratio

○Just submitting code and never doing reviews is abusing the ecosystem

Page 8: Contributing to the Odoo Community Association (OCA)docs.huihoo.com/odoo/training/reference-material/contributing-to... · / 3/ What is the OCA ? A not for profit organization Serves

8/www.camptocamp.com /

The CLA

■Gives some rights to the association over your

contributions

■The OCA is committed to open source by its by-laws

○The association is allowed to relicense your contributions, but only to an OSI approved license

■We have some CLA forms on the OCA booth

Page 9: Contributing to the Odoo Community Association (OCA)docs.huihoo.com/odoo/training/reference-material/contributing-to... · / 3/ What is the OCA ? A not for profit organization Serves

9/www.camptocamp.com /

Coding conventions

■Our coding conventions are documented in

OCA/maintainer-tools

○In the CONTRIBUTING.md file

○There's a direct link from the OCA web site

■Built on Odoo's official recommendations

○With some added requirements

○With some relaxed requirements

Page 10: Contributing to the Odoo Community Association (OCA)docs.huihoo.com/odoo/training/reference-material/contributing-to... · / 3/ What is the OCA ? A not for profit organization Serves

10/www.camptocamp.com /

Github cheat sheet: making a PR

$ git clone [email protected]/OCA/hr

$ cd hr

$ git remote add work [email protected]/account/hr

$ git checkout -b 8.0-fix-stuff origin/8.0

# write code and tests, run tests until green

$ git add -p

$ git commit

$ git push work

Then browse to https://github.com/OCA/hr and click on

the submit PR button

Page 11: Contributing to the Odoo Community Association (OCA)docs.huihoo.com/odoo/training/reference-material/contributing-to... · / 3/ What is the OCA ? A not for profit organization Serves

11/www.camptocamp.com /

Our Continuous Integration tools

© Gary Larson

Page 12: Contributing to the Odoo Community Association (OCA)docs.huihoo.com/odoo/training/reference-material/contributing-to... · / 3/ What is the OCA ? A not for profit organization Serves

12/www.camptocamp.com /

Our Continuous Integration tools

■Each PR is processed by TravisCI

○Syntactatic / formatting checks with flake8 and pylint

○Install the addons

○Run tests using the odoo server facilities

■For most repositories, PRs are also processed by the

OCA runbot

○This can be used to test the addons interactively

■Demo: https://github.com/OCA/partner-

contact/pull/126

Page 13: Contributing to the Odoo Community Association (OCA)docs.huihoo.com/odoo/training/reference-material/contributing-to... · / 3/ What is the OCA ? A not for profit organization Serves

13/www.camptocamp.com /

Code Reviews

© Gary Larson

Page 14: Contributing to the Odoo Community Association (OCA)docs.huihoo.com/odoo/training/reference-material/contributing-to... · / 3/ What is the OCA ? A not for profit organization Serves

14/www.camptocamp.com /

Reviewing a PR (1/3)

■Check travis status

○If red, figure out why (failure unrelated to the PR, flake8 issue, broken test…)

■Read the information available to understand what the

PR does

○Commit message, README file…

○If not clear ask the submitter for more information

Page 15: Contributing to the Odoo Community Association (OCA)docs.huihoo.com/odoo/training/reference-material/contributing-to... · / 3/ What is the OCA ? A not for profit organization Serves

15/www.camptocamp.com /

Reviewing a PR (2/3)

■Connect on runbot and try to use the module

○Comment on usability issues on the PR

○Include screen shots (easy to do on github)

○Check for corner cases you can think of

■If you are able to do this, check the code

○Watch for untested places in the code

○Think of other modules you know, and how this one will interact with them

Page 16: Contributing to the Odoo Community Association (OCA)docs.huihoo.com/odoo/training/reference-material/contributing-to... · / 3/ What is the OCA ? A not for profit organization Serves

16/www.camptocamp.com /

Reviewing a PR (3/3)

■Check the OCA coding conventions

■Watch for issues for which we have no checks for now

○Programming errors, bad API usage

○Obscure code

○Missing translations

○…

■When happy, say :+1:

Page 17: Contributing to the Odoo Community Association (OCA)docs.huihoo.com/odoo/training/reference-material/contributing-to... · / 3/ What is the OCA ? A not for profit organization Serves

17/www.camptocamp.com /

Proposing a new project

■You feel something is missing in the OCA landscape

○Did you really check everywhere?

○Ask on the contributors mailing list

○Ask on Odoo community mailing list too

○Gather people wanting to work on the topic

○https://odoo-community.org/page/suggest-a-project

Page 18: Contributing to the Odoo Community Association (OCA)docs.huihoo.com/odoo/training/reference-material/contributing-to... · / 3/ What is the OCA ? A not for profit organization Serves

18/www.camptocamp.com /

Becoming a member

© Gary Larson

Page 19: Contributing to the Odoo Community Association (OCA)docs.huihoo.com/odoo/training/reference-material/contributing-to... · / 3/ What is the OCA ? A not for profit organization Serves

19/www.camptocamp.com /

Becoming a member

■It is not required to be a member of the association to

be a contributor

■Still, it is nice to support the association

○Membership is for individuals only (no for-profit companies)

○Your membership fees help cover for the runbot server costs, code sprint organisation costs…

○https://odoo-community.org/shop

Page 20: Contributing to the Odoo Community Association (OCA)docs.huihoo.com/odoo/training/reference-material/contributing-to... · / 3/ What is the OCA ? A not for profit organization Serves