Modern scientific Python tooling

  • Challenges of academic code
  • Goals and principles in this talk
  • Code levels
  • Integrated development environments
    • Index
    • Installing VS Code
    • Install extensions
    • How are settings managed
    • Setting up VS Code
      • Appearance
      • Telemetry and user experiments
      • Spell checking
      • Python environment
    • Additional extensions
    • Keyboard shortcuts
  • Code formatting
    • Index
    • Level 1: Formatting defaults for all your projects
    • Level 2: Formatting project by project
    • Additional formatting/linting
    • Source code regions
  • Typing and modularizing code
    • Index
    • Root-finding solver based on Brent’s method
    • First step: making a Python script
    • Second step: script to module
    • Third step: breaking the code into functions
    • Fourth step: breaking the data into dicts
    • Fifth step: dataclasses
    • Fifth step without comments
    • Tricky parts of type annotations
  • Testing
  • Documenting published code
    • Index
    • Level 1: documenting the code using a paper + Jupyter notebooks
    • Level 2 (or 3?): documenting the code using Sphinx
    • Additions
  • Specifying dependencies and publishing code
    • Index
    • Python versions
    • Level 1: requirements.txt, “clone the repo” deployment
    • Level 2: Use Poetry and Python virtual environments
    • Python modules
    • Level 3: Manage compatibility guarantees
    • Tricky parts
  • References
Theme by the Executable Book Project

Index

A | B | C | D | F | I | L | M | S | V | X | Y

A

  • a (root4.BrentState attribute)
    • (root5.BrentState attribute)

B

  • b (root4.BrentState attribute)
    • (root5.BrentState attribute)
  • BrentState (class in root4)
    • (class in root5)

C

  • c (root4.BrentState attribute)
    • (root5.BrentState attribute)
  • converged() (root5.Settings method)

D

  • d (root4.BrentState attribute)
    • (root5.BrentState attribute)
  • default_verbose() (root5.Settings static method)

F

  • fa (root4.BrentState attribute)
    • (root5.BrentState attribute)
  • fb (root4.BrentState attribute)
    • (root5.BrentState attribute)
  • fc (root4.BrentState attribute)
    • (root5.BrentState attribute)

I

  • inverse_quadratic_interpolation_step() (in module root3)
  • iter (root4.BrentState attribute)
    • (root5.BrentState attribute)

L

  • last_step (root4.BrentState attribute)
    • (root5.BrentState attribute)

M

  • make() (root5.BrentState static method)

S

  • Settings (class in root4)
    • (class in root5)

V

  • verbose (root4.Settings attribute)
    • (root5.Settings attribute)

X

  • x_abs_tol (root4.Settings attribute)
    • (root5.Settings attribute)
  • x_rel_tol (root4.Settings attribute)
    • (root5.Settings attribute)

Y

  • y_tol (root4.Settings attribute)
    • (root5.Settings attribute)

By Denis Rosset
© Copyright 2022, Denis Rosset.