Passion/Job PythonFOSDEM CPython contributor #fellow member of Python Software Foundation Community Service Award EuroPython organizer former core dev of Odoo (Open Source ERP) blah blah Python blah 2 / 69
2018) few dependencies are deprecated or no maintainers (incompatible with django 1.11) SQLite no tests (+- 30k lines of code) no documentation, some comments are in Italian, French, ... 9 / 69
2018) few dependencies are deprecated or no maintainers (incompatible with django 1.11) SQLite no tests (+- 30k lines of code) no documentation, some comments are in Italian, French, ... duplicated/dead code 10 / 69
2018) few dependencies are deprecated or no maintainers (incompatible with django 1.11) SQLite no tests (+- 30k lines of code) no documentation, some comments are in Italian, French, ... duplicated/dead code no async for jobs 11 / 69
2018) few dependencies are deprecated or no maintainers (incompatible with django 1.11) SQLite no tests (+- 30k lines of code) no documentation, some comments are in Italian, French, ... duplicated/dead code no async for jobs no Continuous Integration / Continuous Delivery 12 / 69
2018) few dependencies are deprecated or no maintainers (incompatible with django 1.11) SQLite no tests (+- 30k lines of code) no documentation, some comments are in Italian, French, ... duplicated/dead code no async for jobs no Continuous Integration / Continuous Delivery no API for external tools need to export data (mobile app, ticket search app, etc...) 13 / 69
2018) few dependencies are deprecated or no maintainers (incompatible with django 1.11) SQLite no tests (+- 30k lines of code) no documentation, some comments are in Italian, French, ... duplicated/dead code no async for jobs no Continuous Integration / Continuous Delivery no API for external tools need to export data (mobile app, ticket search app, etc...) no syslog, just send error with exception to the mailing list. 14 / 69
2018) few dependencies are deprecated or no maintainers (incompatible with django 1.11) SQLite no tests (+- 30k lines of code) no documentation, some comments are in Italian, French, ... duplicated/dead code no async for jobs no Continuous Integration / Continuous Delivery no API for external tools need to export data (mobile app, ticket search app, etc...) no syslog, just send error with exception to the mailing list. settings were hardcoded, no environment variables 15 / 69
- pip install -r requirements-dev.txt script: "python manage.py compilemessages && python manage.py test" Gitlab CI is also open source and you can use. Your laptop can become a slave for your CI 29 / 69
Create a screenshot Given Go on PyCon Ireland Website And Click on "Full Schedule" Then Take a screenshot @given("Go on PyCon Ireland Website") def step(context): driver.get('https://pyconie17.python.ie') @given('Click on "{link_text}"') def step(context, link_text): driver.find_element_by_link_text(link_text).click() @then('Take a screenshot') def step(context): driver.save_screenshot() 36 / 69
with Django, in fact, a scenario will be executed in a transaction and you can interact with your database. @when(u'I visit "{url}"') def visit(context, url): context.browser.visit(context.base_url + url) 37 / 69
with Django, in fact, a scenario will be executed in a transaction and you can interact with your database. @when(u'I visit "{url}"') def visit(context, url): context.browser.visit(context.base_url + url) @given(u'user "{username}" exists') def create_user(context, username): # This won't be here for the next scenario User.objects.create_user(username=username, password='SeCr4T') 38 / 69
screenshots for your documentation pip install sphinx-selenium-screenshots Change the configuration of your sphinx project screenshots_server_path = 'http://localhost:8080' 40 / 69
screenshots for your documentation pip install sphinx-selenium-screenshots Change the configuration of your sphinx project screenshots_server_path = 'http://localhost:8080' ..screenshot:: schedule.png :server_path: /schedule Your developers and users will be happy with an updated documentation, you can provide a PDF or a real book with a print provider 41 / 69
tests, you can start to rewrite the bad code django-extensions pip install django-extensions Show the urls Generate a graph of your models Integration of a web interface for the debugger more features... 45 / 69
tests, you can start to rewrite the bad code mypy with mypy-django gnrbag.py:84: error: Incompatible types in assignment (expression has type "classmethod", va gnrbag.py:317: error: Name 'json' already defined gnrbag.py:2874: error: Need type annotation for variable gnrbag.py:3083: error: Dict entry 3 has incompatible type "int": "str" ` 47 / 69
12:26:50] "GET /favicon.ico HTTP/1.1" 302 0 [11/Jul/2017 12:26:50] "GET /en/favicon.ico HTTP/1.1" 301 0 [sql] (3ms) 1 queries with 0 duplicates [profile] Total time to render was 0.03s [profile] Timer unit: 1e-06 s Total time: 0.009523 s File: $VIRTUALENV/XXX/lib/python2.7/site-packages/cms/views.py Function: details at line 23 Line # Hits Time Per Hit % Time Line Contents ============================================================== 23 def details(request, slug): 24 """ 25 The main view of the Django-C 26 page. 27 """ 50 / 69
======================== slowest 2 test durations ========================================== 0.47s setup tests/test_reset_password.py::ResetPasswordTestCase::test_reset_password 0.36s call tests/test_stripe.py::StripeViewTestCase::test_add_stripe_on_order_test if you are a purist, maybe you will prefer cProfile 51 / 69
| Vim Atom Visual Code Sublime Text ed but maybe you could give a try to PyCharm (Community or Pro) Auto-Completion Code Coverage (Remote) Debugging Profiling Virtual env Integration with the documentation Integration with Type Hinting Integration with Docker ... they offer pro licenses if you work on a open source project or discount 68 / 69