Materiale Utile

Pycon 2022: https://www.youtube.com/playlist?list=PL2Uw4_HvXqvYeXy8ab7iRHjA-9HiYhRQl

Pycon 2021: https://www.youtube.com/playlist?list=PL2Uw4_HvXqvYk1Y5P8kryoyd83L_0Uk5K

Pycon 2020: https://www.youtube.com/playlist?list=PL2Uw4_HvXqvbpFquYIE57BEAqkQWk-iFg

Best Python 2020: https://www.youtube.com/watch?v=tqUe0gcfqAU&list=PLCA4Z3rehf5nDNRqo4sLC_8KgU0tymlge&ab_channel=PyConUS

Modern Python Developer’s toolkit: https://www.youtube.com/watch?v=WkUBx3g2QfQ&ab_channel=PyConUS

Modern Python Developer’s toolkit (resources): https://pycon.switowski.com/

Install, Uninstall and manage multiple versions of python on a mac: https://www.ianmaddaus.com/post/manage-multiple-versions-python-mac/

5 Python Tricks da usare: https://towardsdatascience.com/5-python-tricks-you-should-start-using-in-2021-1084af21c2f2

Medium informations and blogs to look at:

Jetbrains Dev Ecosystem 2020: https://www.jetbrains.com/lp/devecosystem-2020/python/

State of 2020 language: https://fwdays.com/en/event/python-fwdays-conference/review/python-2020-the-state-of-the-language

Fase più discorsiva

https://towardsdatascience.com/12-steps-to-production-quality-data-science-code-35ae2f868003

  1. Code quality

    https://realpython.com/python-code-quality/#it-does-not-do-what-it-is-supposed-to-do

  2. Modularizzazione del codice

    • cos’è un module, come si comporta, cos’è un main
  3. Python env

    • Virtual environment
      • Pyenv
  4. Project & Library management

    • Poetry (and requirements.txt) rispetto a come si faceva prima con virtual env
  5. Configurazione IDE (Visual Studio Code)

    • Estensioni
    • Come usare visual studio code per
      • Analisi
      • Sviluppo tradizionale

Come documentare al meglio il proprio codice

https://realpython.com/documenting-python-code/

Tutta la documentazione che scrivete all’interno del progetto cercate di farla in Markdown (https://guides.github.com/features/mastering-markdown/)

Code Refactoring (Best Practise)

https://www.altexsoft.com/blog/engineering/code-refactoring-best-practices-when-and-when-not-to-do-it/

Software Quality (Metrics and how to use)

https://www.altexsoft.com/blog/engineering/what-software-quality-really-is-and-the-metrics-you-can-use-to-measure-it/

Test Driven Data Science Development

https://towardsdatascience.com/tdd-datascience-689c98492fcc

https://www.freecodecamp.org/news/learning-to-test-with-python-997ace2d8abe/

Strumenti in Python per la generazione automatica di documentazione:

Bonus e considerazioni

BONUS: Far vedere anche su mac come funziona poetry + pyenv alla fine

Attenzione: testare pyenv + poetry con windows + subsystem linux + macchina virtuale linux

Quando un progetto nasce classico (utilizzando virtualenv e venv) lasciarlo così…fare la migrazione a Poetry può essere complicato.

Si consiglia di utilizzare python versione 3.8 (3.7 già vecchia e 3.9 ancora troppo nuova).

Integrazione Poetry with Docker

https://stackoverflow.com/questions/53835198/integrating-python-poetry-with-docker

https://pythonspeed.com/articles/pipenv-docker/

Assolutamente da vedere:

https://pythonspeed.com

Python Logging (Log your code and not use print): https://python-docs.readthedocs.io/en/latest/writing/logging.html

Commons Gotcha (concetti generali interessanti): https://python-docs.readthedocs.io/en/latest/writing/gotchas.html

Packaging your code: https://python-docs.readthedocs.io/en/latest/shipping/packaging.html

Freezing your code: https://python-docs.readthedocs.io/en/latest/shipping/freezing.html

Two cool functions to know in python

  • tabulate
  • tqdm

https://towardsdatascience.com/two-cool-functions-to-know-in-python-7c36da49f884

Altri temi

Strutturare il tuo progetto

Come strutturare il tuo progetto

https://python-docs.readthedocs.io/en/latest/writing/structure.html

Semantic release

https://python-semantic-release.readthedocs.io/en/latest/

https://mestrak.com/blog/semantic-release-with-python-poetry-github-actions-20nn

Prettier

https://www.reddit.com/r/vscode/comments/95lsb8/a_better_python_formatter/

https://stackoverflow.com/questions/65410758/problem-formatting-python-when-using-prettier-in-vscode

https://dev.to/eegli/quick-guide-to-python-formatting-in-vs-code-2040

https://www.digitalocean.com/community/tutorials/code-formatting-with-prettier-in-visual-studio-code

https://stackoverflow.com/questions/57907645/prettier-not-formatting-html-files-in-vs-code

#Prettier configuration: .prettierrc
{
  "arrowParens": "avoid",
  "endOfLine": "lf",
  "htmlWhitespaceSensitivity": "css",
  "insertPragma": false,
  "jsxBracketSameLine": false,
  "jsxSingleQuote": false,
  "printWidth": 80,
  "proseWrap": "always",
  "quoteProps": "as-needed",
  "requirePragma": false,
  "semi": false,
  "singleQuote": true,
  "tabWidth": 2,
  "useTabs": false
}