Slide 1

Slide 1 text

Developing for edX Platform Carson Gee @carsongee 1 / 14

Slide 2

Slide 2 text

Agenda Application Architecture Dev Stack Overview Folder Structure Managing Settings Managing Branches Working on a Feature Running Tests Submitting a PR Additional Documentation 2 / 14

Slide 3

Slide 3 text

edX Application Architecture 3 / 14

Slide 4

Slide 4 text

Major Technologies Python Django (1.4) Mako Templates CoffeeScript (deprecated) SASS Bok Choy (Acceptance tests) Jasmine (JS Testing) backbone.js XBlock 4 / 14

Slide 5

Slide 5 text

"Dev Stack" Vagrant & Ansible Core platform development (or forums, xqueue, xblocks, and analytics) Testing environment setup Use your own tools Development server and debug tools ready 5 / 14

Slide 6

Slide 6 text

Dev Stack Install Vagrant Install VirtualBox Visit http://localhost:8000 for LMS Visit http://localhost:8001 for Studio m k d i r d e v s t a c k c d d e v s t a c k c u r l - L h t t p s : / / r a w . g i t h u b u s e r c o n t e n t . c o m / e d x / c o n f i g u r a t i o n / m a s t e r / v a g r a n t / r e l e a s e v a g r a n t p l u g i n i n s t a l l v a g r a n t - v b g u e s t v a g r a n t u p v a g r a n t s s h s u d o s u e d x a p p p a v e r r u n _ a l l _ s e r v e r s 6 / 14

Slide 7

Slide 7 text

Folder structure 7 / 14

Slide 8

Slide 8 text

Managing Settings / e d x / a p p / e d x a p p / ( l m s | c m s ) . e n v . j s o n and / e d x / a p p / e d x a p p / ( l m s | c m s ) . a u t h . j s o n . . . " E M A I L _ B A C K E N D " : " d j a n g o . c o r e . m a i l . b a c k e n d s . s m t p . E m a i l B a c k e n d " , " F E A T U R E S " : { " A L L O W _ A L L _ A D V A N C E D _ C O M P O N E N T S " : t r u e , . . . " U S E _ C U S T O M _ T H E M E " : t r u e } , " F E E D B A C K _ S U B M I S S I O N _ E M A I L " : " " , " G I T H U B _ R E P O _ R O O T " : " / e d x / v a r / e d x a p p / d a t a " , . . . / e d x / a p p / e d x _ a n s i b l e / s e r v e r - v a r s . y m l / e d x / a p p / e d x a p p / e d x - p l a t f o r m / ( l m s | c m s ) / p r i v a t e . p y 8 / 14

Slide 9

Slide 9 text

Managing Branches Switch to using your fork: c d ~ / d e v s t a c k g i t r e m o t e s e t - u r l o r i g i n g i t @ g i t h u b . c o m : < y o u r f o r k > / e d x - p l a t f o r m g i t r e m o t e a d d e d x h t t p s : / / g i t h u b . c o m / e d x / e d x - p l a t f o r m g i t f e t c h Update to new branch, or after rebase: s u d o / e d x / b i n / u p d a t e e d x - p l a t f o r m < b r a n c h _ n a m e > Rebase: g i t f e t c h e d x & & g i t r e b a s e e d x / m a s t e r g i t p u s h - f o r i g i n < b r a n c h _ n a m e > v a g r a n t s s h s u d o / e d x / b i n / u p d a t e e d x - p l a t f o r m < b r a n c h _ n a m e > 9 / 14

Slide 10

Slide 10 text

Running Tests Huge test suite, probably don't want to run it all (let Jenkins do that on PR) Paver helps automate running tests: p a v e r h e l p for all options 10 / 14

Slide 11

Slide 11 text

Python Tests p a v e r t e s t _ s y s t e m - s l m s , p a v e r t e s t _ s y s t e m - s c m s - - f a s t t e s t More importantly: p a v e r t e s t _ s y s t e m - s l m s - t l m s / d j a n g o a p p s / c c x / t e s t s / t e s t _ c c x _ m o d u l e s t o r e . p y p a v e r c o v e r a g e , p a v e r r u n _ q u a l i t y , p a v e r r u n _ q u a l i t y - - p e r c e n t a g e = 1 0 0 11 / 14

Slide 12

Slide 12 text

JavaScript and Acceptance p a v e r t e s t _ j s , p a v e r t e s t _ j s _ r u n - s l m s p a v e r r u n _ j s h i n t In your own browser: p a v e r t e s t _ j s _ d e v - s l m s Acceptance tests: p a v e r t e s t _ b o k c h o y - supports -t option 12 / 14

Slide 13

Slide 13 text

Submitting a PR Official Process General Rules: If big, architecture and code list posting before code. Make sure no quality violations, full coverage, documentation and your tests pass. If user facing, or larger, you'll need a11y, i18n, and analytics. Respond quickly to comments. Be nice, win friends, and influence people (HipChat helps a lot here). 13 / 14

Slide 14

Slide 14 text

Extra Resources Configuration Dev Stack Wiki Platform Dev Stack Wiki Test Engineering FAQ Writing and Running Tests Development Guide Extending the Platform 14 / 14