Upgrade to Pro — share decks privately, control downloads, hide ads and more …

EuroPython 2019 LT / Let's Explore PEPs with NetworkX!

EuroPython 2019 LT / Let's Explore PEPs with NetworkX!

komo_fr

July 11, 2019
Tweet

More Decks by komo_fr

Other Decks in Programming

Transcript

  1. Tomoko Furuki
    @komo_fr
    @komo-fr
    Let’s explore PEPs
    with NetworkX!

    View full-size slide

  2. #BTFM
    +BQBO
    !"

    14
    hours
    I’m from Japan

    View full-size slide

  3. Let’s explore PEPs
    with NetworkX!
    Tomoko Furuki
    @komo_fr
    @komo-fr

    View full-size slide

  4. Motivation
    There are so many PEPs! (490~)
    • Beginners don’t know

    which one to read.
    • Important PEP?
    • What topics?
    I wanted a map to read PEPs.
    $
    %
    %

    View full-size slide

  5. Idea& citation relationship
    •Important papers are often cited 

    from other papers.
    •There are also citation relationships

    among PEPs.


    View full-size slide

  6. Idea& citation relationship
    PEP
    8
    Style Guide
    for Python
    PEP
    20
    The Zen of
    Python

    View full-size slide

  7. Idea& citation relationship
    PEP
    8
    Style Guide
    for Python
    PEP
    20
    The Zen of
    Python
    PEP
    257
    Docstring
    Conventions

    View full-size slide

  8. Idea& citation relationship
    Network Analysis
    PEP
    8
    Style Guide
    for Python
    PEP
    20
    The Zen of
    Python
    PEP
    257
    Docstring
    Conventions

    View full-size slide

  9. Method & Package
    Network Analysis
    •a method to analyze

    relationships among elements
    •e.g. citation relation, friend relation
    NetworkX
    •Python package for complex networks.

    View full-size slide

  10. PEP citation network
    color: status of PEP (e.g. Accepted, Rejected …)
    size: number of other PEPs citing that PEP

    View full-size slide

  11. PEP citation network
    color: status of PEP (e.g. Accepted, Rejected …)
    size: number of other PEPs citing that PEP
    the PEP most cited
    from other PEPs
    (

    View full-size slide

  12. PEP citation network
    color: status of PEP (e.g. Accepted, Rejected …)
    size: number of other PEPs citing that PEP
    Quiz

    View full-size slide

  13. Which PEP is most cited
    from other PEPs?
    A. PEP 1: PEP Purpose and Guidelines
    B. PEP 8: Style Guide for Python Code
    C. PEP 302: New Import Hooks

    View full-size slide

  14. Which PEP is most cited
    from other PEPs?
    A. PEP 1: PEP Purpose and Guidelines
    B. PEP 8: Style Guide for Python Code
    C. PEP 302: New Import Hooks
    )Please rise your hand!
    *

    View full-size slide

  15. A. PEP 1: PEP Purpose and Guidelines
    B. PEP 8: Style Guide for Python Code
    C. PEP 302: New Import Hooks
    )Please rise your hand!
    *
    Which PEP is most cited
    from other PEPs?

    View full-size slide

  16. A. PEP 1: PEP Purpose and Guidelines
    B. PEP 8: Style Guide for Python Code
    C. PEP 302: New Import Hooks
    )Please rise your hand!
    *
    Which PEP is most cited
    from other PEPs?

    View full-size slide

  17. A. PEP 1: PEP Purpose and Guidelines
    B. PEP 8: Style Guide for Python Code
    C. PEP 302: New Import Hooks
    )Please rise your hand!
    *
    Which PEP is most cited
    from other PEPs?

    View full-size slide

  18. Answer
    (PEP ???

    View full-size slide

  19. Answer
    (
    21 PEPs refer to PEP8
    PEP 8
    Style Guide for Python Code
    + PEP 302: New Import Hooks (15 PEPs)
    + PEP 484: Type Hints (15 PEPs)
    , PEP 426: Metadata for Python Software 

    Packages 2.0 (13 PEPs)
    Jupyter Notebook: https://github.com/komo-fr/EuroPython2019_LT
    BTPG+VOF

    View full-size slide

  20. PEP citation network
    color: status of PEP (e.g. Accepted, Rejected …)
    size: number of other PEPs citing that PEP
    -

    View full-size slide

  21. Rejected Switch Statement


    PEP 225: Elementwise/Objectwise Operators
    PEP 3103: A Switch/Case Statement
    -

    View full-size slide

  22. The 8000-series PEPs









    1&1
    1ZUIPO-BOHVBHF
    (PWFSOBODF


    View full-size slide

  23. The 8000-series PEPs








    1&1
    1&1

    1&1
    1ZUIPO-BOHVBHF
    (PWFSOBODF


    View full-size slide

  24. This is maybe a group about
    “New Python language governance”…?

    View full-size slide

  25. Community Detection
    (Clustering)
    .
    • Louvain algorithm
    • Vincent D. Blondel, et al. "Fast unfolding of communities in large networks" J.
    Stat. Mech: theory and experiment 2008.10 (2008): P10008.
    • python-louvain package
    • https://pypi.org/project/python-louvain/

    View full-size slide

  26. Result
    and others…

    View full-size slide

  27. Group A-03: Packaging?
    • PEP 241 / 314 / 345 / 426 / 566: 

    Metadata for Python Software
    Packages / v1.1 / 1.2 / 2.0 / 2.1
    • PEP 427 / 491:

    The Wheel Binary Package 

    Format 1.0 / 1.9
    • PEP 440:

    Version Identification and
    Dependency Specification
    • PEP 381:

    Mirroring infrastructure for PyPI


    and more …
    37 PEPs

    View full-size slide

  28. Group A-10: Process and Documents?
    • PEP 8000-series
    • PEP 1:

    PEP Purpose Guidelines
    • PEP 12:

    Sample reStructuredText
    PEP Template
    • PEP 257:

    Docstring Conventions


    and more …
    26 PEPs

    View full-size slide

  29. Interactive Visualization (alpha)
    https://github.com/komo-fr/pep_map_site

    View full-size slide

  30. • Slide:

    https://speakerdeck.com/
    komofr/lets-explore-peps-
    with-networkx
    • Web Page:

    https://github.com/komo-fr/
    pep_map_site
    • Jupyter Notebook: 

    https://github.com/komo-fr/
    EuroPython2019_LT
    Thank you for listening!
    @komo_fr @komo-fr "
    Conference:
    Sep.16(Mon) - 17(Tue)
    5JDLFU
    IUUQTQZDPOKQDPOOQBTTDPN
    FWFOU
    8FC
    IUUQTQZDPOKQ
    Venue: Tokyo, Japan "
    ɹ* will upload until this weekend! /

    View full-size slide