Documentation et tests en pratique

Principes d'ingénierie logicielle en Python

Adam Spannbauer

Machine Learning Engineer at Eastman

Documenter les projets avec Sphinx

  Exemple de page Sphinx

Principes d'ingénierie logicielle en Python

Documenter les classes

class Document:
    """Analyze text data

    :param text: text to analyze

    :ivar text: text originally passed to the instance on creation
    :ivar tokens: Parsed list of words from text
    :ivar word_counts: Counter containing counts of hashtags used in text
    """
    def __init__(self, text):
        ...
Principes d'ingénierie logicielle en Python

Tests d'intégration continue

    Logo Travis CI

Exemple de sortie Travis – Échec

Principes d'ingénierie logicielle en Python

Tests d'intégration continue

  Exemple de sortie Travis – Réussite

Principes d'ingénierie logicielle en Python

Liens et outils additionnels

  • Sphinx - Générer une documentation soignée
  • Travis CI - Tester votre code en continu
  • GitHub & GitLab - Héberger vos projets avec git
  • Codecov - Repérer où améliorer vos tests
  • Code Climate - Analyser la lisibilité de votre code
Principes d'ingénierie logicielle en Python

Passons à la pratique !

Principes d'ingénierie logicielle en Python

Preparing Video For Download...