SOFA Paton-Simpson & Associates Ltd Auckland, New Zealand SOFA Statistics Developing, packaging, & promoting a Python open...
SOFA Paton-Simpson & Associates Ltd Auckland, New Zealand Overview <ul><li>Introducing the SOFA project
wxPython
Launchpad, Freshmeat and Sourceforge
Making debian packages
Making a Windows installer </li></ul>
SOFA Paton-Simpson & Associates Ltd Auckland, New Zealand The SOFA Project <ul><li>Statistics Open For All </li><ul><li>St...
Open source (AGPL3) – no  restrictions on commercial use etc
Cross-platform </li></ul><li>Video (please interrupt with questions)
Website </li><ul><li>Appearances matter
Quick taste of what SOFA is and  why they might want it
Easy to download </li></ul></ul>
SOFA Architecture SQLite MySQL MS Access ... SOFA Linking  not importing Scripts ready to glue together etc HTML  (spreads...
HTML Output <ul><li>Tree-based for each dimension
Created an artificial limit of 5000 cells
Scales linearly and Python not the bottleneck </li></ul>
<ul><li>Import from Excel and SPSS etc
Looking at Statlib for basic statistical tests
Want to choose a library for charting
Want to add own interactive visualisations for explaining  t-tests etc
Not trying to compete with R (or RK Ward)
Focus on making the most common needs easy to satisfy
Plugin extensions for rest </li></ul>SOFA Paton-Simpson & Associates Ltd Auckland, New Zealand Next Steps
Upcoming SlideShare
Loading in...5
×

SOFA Statistics - Developing, packaging, & promoting a Python open source project

13,021

Published on

Developing, packaging, & promoting
a Python open source project - with SOFA Statistics (http://www.sofastatistics.com) as the focus. Cover wxPython, Sourceforge, Freshmeat, Launchpad, Bazaar including Loggerhead.

Published in: Technology
3 Comments
0 Likes
Statistics
Notes
  • uhm..

    well


    as i have said...


    you can help a lot of viewers by advertising this kind of video?...!!!

    so Fabulous!!

    by the way...im Einalhial also friend of Michael Anthony E. De VEra






    Godbless.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Goodluck...!!! Dianne Morales from section of ac09202)in FEU
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • nice video!!

    very awesome..

    it can help a lot of viewers..




    uhm???i'm Einalhial friend of Dianne Morales (09202)
    Godbless
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

No Downloads
Views
Total Views
13,021
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
35
Comments
3
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "SOFA Statistics - Developing, packaging, & promoting a Python open source project"

  1. 1. SOFA Paton-Simpson & Associates Ltd Auckland, New Zealand SOFA Statistics Developing, packaging, & promoting a Python open source project Grant Paton-Simpson sofastatistics.com
  2. 2. SOFA Paton-Simpson & Associates Ltd Auckland, New Zealand Overview <ul><li>Introducing the SOFA project
  3. 3. wxPython
  4. 4. Launchpad, Freshmeat and Sourceforge
  5. 5. Making debian packages
  6. 6. Making a Windows installer </li></ul>
  7. 7. SOFA Paton-Simpson & Associates Ltd Auckland, New Zealand The SOFA Project <ul><li>Statistics Open For All </li><ul><li>Statistics, analysis & reporting
  8. 8. Open source (AGPL3) – no restrictions on commercial use etc
  9. 9. Cross-platform </li></ul><li>Video (please interrupt with questions)
  10. 10. Website </li><ul><li>Appearances matter
  11. 11. Quick taste of what SOFA is and why they might want it
  12. 12. Easy to download </li></ul></ul>
  13. 13. SOFA Architecture SQLite MySQL MS Access ... SOFA Linking not importing Scripts ready to glue together etc HTML (spreadsheet- friendly)
  14. 14. HTML Output <ul><li>Tree-based for each dimension
  15. 15. Created an artificial limit of 5000 cells
  16. 16. Scales linearly and Python not the bottleneck </li></ul>
  17. 17. <ul><li>Import from Excel and SPSS etc
  18. 18. Looking at Statlib for basic statistical tests
  19. 19. Want to choose a library for charting
  20. 20. Want to add own interactive visualisations for explaining t-tests etc
  21. 21. Not trying to compete with R (or RK Ward)
  22. 22. Focus on making the most common needs easy to satisfy
  23. 23. Plugin extensions for rest </li></ul>SOFA Paton-Simpson & Associates Ltd Auckland, New Zealand Next Steps
  24. 24. <ul><li>50% coding script-based solutions
  25. 25. 50% adding GUI
  26. 26. Another 50% enabling installation
  27. 27. Yet another 50% setting up website, bazaar, Launchpad, Sourceforge, Freshmeat, making screencast for ShowMeDo, writing articles, giving presentations etc
  28. 28. Why? </li><ul><li>Complete control over the tools I rely on as an analyst
  29. 29. Open source is a positive contribution
  30. 30. Nice to have a large, long-term project to keep refining </li></ul></ul>SOFA Paton-Simpson & Associates Ltd Auckland, New Zealand Running a Project
  31. 31. <ul><li>Python-focused
  32. 32. I benefited from the screencast on debian packaging
  33. 33. Great way of coping with bandwidth if your project takes off
  34. 34. Video is like screenshots on steroids – gives people a real taste
  35. 35. Used gtk-recordmydesktop which is very easy </li></ul>SOFA Paton-Simpson & Associates Ltd Auckland, New Zealand ShowMeDo Videos
  36. 36. wxPython GUI Toolkit <ul><li>Cross-platform and native widgets </li></ul>Ubuntu (Dust theme) Windows XP
  37. 37. <ul><li>wxPython in Action – Great book
  38. 38. Mailing list (with Robin Dunn a very regular contributor)
  39. 39. Lots of online documentation (but can be a little bit terse)
  40. 40. There is a GUI for making GUIs but I prefer handcoding </li><ul><li>Clean
  41. 41. Can make GUI plugins e.g. SOFA database configuration </li></ul><li>Lots of sophisticated, configurable widgets </li><ul><li>Was able to make a data entry table work like I thought it should e.g. new row has column label of … , behaviour when tabbing </li></ul><li>Focus on grid control </li></ul>SOFA Paton-Simpson & Associates Ltd Auckland, New Zealand Documentation & Community
  42. 42. <ul><li>When linking to data need to subclass wx.grid.PyGridTableBase
  43. 43. Need to implement methods such as GetNumberCols()
  44. 44. With flexibility and power comes some complexity to handle
  45. 45. The internal documentation is sometimes longer than the code itself
  46. 46. 700 lines to make the data grid you saw in the video (including validation, ability to add new rows and edit values etc)
  47. 47. 1/6 were comments </li></ul>SOFA Paton-Simpson & Associates Ltd Auckland, New Zealand wx.Grid
  48. 48. Example grid code
  49. 49. SOFA Paton-Simpson & Associates Ltd Auckland, New Zealand Custom Controls
  50. 50. <ul><li>When creating a custom control e.g. a composite control, need to subclass wx.PyControl
  51. 51. Getting good documentation takes some resourcefulness – having a good working example the key
  52. 52. The custom control is utilised as part of a custom cell editor
  53. 53. To make a custom cell editor need to subclass wx.grid.PyGridCellEditor
  54. 54. Adequately documented </li></ul>SOFA Paton-Simpson & Associates Ltd Auckland, New Zealand wx.PyControl
  55. 55. <ul><li>Need to be able to cope with enormous tables – as large as MySQL etc can throw at us
  56. 56. GetValue() best with unique key (using ORDER BY and LIMIT does not scale)
  57. 57. Also need caching
  58. 58. Can now scroll large tables with lots of columns e.g. 200,000 records and 20 columns </li></ul>SOFA Paton-Simpson & Associates Ltd Auckland, New Zealand Grid Performance
  59. 59. <ul><li>Option of label display e.g. “Male” not 1
  60. 60. Conditional formatting e.g. all values > 1000 red etc
  61. 61. Choice of toolkit very important - can it support what you want to do or will you hit a wall?
  62. 62. If I wanted to display sparklines or pie charts as cells in a table … could I? </li></ul>SOFA Paton-Simpson & Associates Ltd Auckland, New Zealand Grid Plans
  63. 63. <ul><li>Not either/or – can still have project releases in Sourceforge as well plus a Freshmeat project
  64. 64. Why Launchpad? </li><ul><li>Ubuntu and Canonical good fit for me (my main platform)
  65. 65. Uses modern distributed version control software (Bazaar)
  66. 66. Lots of developer resources and ongoing development
  67. 67. Corporate backing – a safe bet </li></ul></ul>SOFA Paton-Simpson & Associates Ltd Auckland, New Zealand Launchpad
  68. 68. <ul><li>Modern distributed version control
  69. 69. Built in Python
  70. 70. Documentation seemed pitched at my level
  71. 71. Very simple commands </li><ul><li>bzr add importer.py
  72. 72. bzr commit -m “Added ability to import from Excel”
  73. 73. bzr push </li></ul><li>Can grow with the project
  74. 74. Uses modern Ubuntu notifications </li></ul>SOFA Paton-Simpson & Associates Ltd Auckland, New Zealand Bazaar
  75. 75. <ul><li>Putting the open into open source
  76. 76. Also written in Python
  77. 77. A web viewer for bazaar projects </li></ul>Loggerhead
  78. 78. <ul><li>Initially very daunted – could I even do this?
  79. 79. Found ShowMeDo video by Austrian Horst Jens </li><ul><li>His example was a Python project so very similar requirements
  80. 80. Ended up with very detailed step-by-step guidelines for packaging SOFA Statistics </li></ul><li>Have small handful of files with content I reuse for each package e.g. rules
  81. 81. Using AGPL so needed to edit copyright file by hand </li></ul>SOFA Paton-Simpson & Associates Ltd Auckland, New Zealand Making Debian Package (for Ubuntu)
  82. 82. <ul><li>“rules” is mainly for shifting files into destination
  83. 83. NB installing application for all users, not a given user </li><ul><li>Files are put into /usr/share/pyshared/sofa/...
  84. 84. Any files needed by an individual user are transferred during first use of application /home/username/sofa/... </li></ul><li>“control” is for versioning, developer details, and dependencies e.g. Depends: python (>=2.6.2-0ubuntu1), wx-common (>=2.8.9.2-2),
  85. 85. distro-specific so may not be a simple matter of using alien to make rpms </li></ul>SOFA Paton-Simpson & Associates Ltd Auckland, New Zealand Making Debian Package cont ...
  86. 86. <ul><li>Nullsoft Scriptable Install System. Free. Used by Firefox, OpenOffice etc
  87. 87. Weird language – cross between PHP and assembler
  88. 88. Macros can take parameters but functions cannot
  89. 89. No functions inside sections
  90. 90. Plenty of documentation etc but best to start and then extend
  91. 91. One glitch – was including all files in installer, whether or not used by version (solution – different info has to be in different files which are then included)
  92. 92. Issue – file size. Including mysqldb, numpy, wxpython, sqlite, python
  93. 93. Put program in Program Files and user files in Documents and Settingsusernamesofa... </li></ul>SOFA Paton-Simpson & Associates Ltd Auckland, New Zealand NSIS Windows Installer
  94. 94. <ul><li>Running a new project can be exciting
  95. 95. Lots of new learning
  96. 96. Someone has to “take out the trash” (hint – it's you ;-))
  97. 97. Phenomenal resources available in open source world
  98. 98. Python packaging still a work-in-progress but should shake down </li></ul>SOFA Paton-Simpson & Associates Ltd Auckland, New Zealand Final Thoughts
  1. Gostou de algum slide específico?

    Recortar slides é uma maneira fácil de colecionar informações para acessar mais tarde.

×