Code Monkey home page Code Monkey logo

4a_ilc_projet_ci_cd's Introduction

4A_ILC_PROJET_CI_CD

forthebadge made-with-python

Auteurs : Baptiste Andres et Tom Roth

Spécialité : ILC

Langage : Python

Sujet guidé

Consiédrant notre peu d'expérience et les diffiultés que nous avons rencontré en TD, nous avons choisi le sujet guidé en utilisant le langage Python.

Concernant la modélisation des données, nous avons choisi de créer deux classes Personne et Transaction. Chaque classe possède des attributs permettant d'identifier facilement les instances de ces classes. Elles comprennent également deux méthodes toString() et toJSON() permmettant respectivement de retourner un String et un JSONObject.

Exemple de commande à reponse JSON

E0 - Afficher toutes les personnes :

url -X GET http://localhost:5000/E0

E1 - Enregistrer une transaction :

curl -X GET http://localhost:5000/E1/{id1}/{id2}/{date}/{somme}

E2 - Afficher une liste de toutes les transactions dans l’ordre chronologique :

curl -X GET http://localhost:5000/E2

E3 - Afficher une liste des transactions dans l’ordre chronologique liées à une personne :

curl -X GET http://localhost:5000/E3/{id}

E4 - Afficher le solde du compte de la personne :

curl -X GET http://localhost:5000/E4/{id}

E5 - Importer des données depuis un fichier csv :

curl -X POST -F 'personnes=@{file.csv}' http://localhost:5000/E5/personnes
curl -X POST -F 'transactions=@{file.csv}' http://localhost:5000/E5/transactions

E6 - Vérifier l’intégrité des transactions :

curl -X GET http://localhost:5000/E6

Choix de l'algorithme de Hachage

Nous avons choisi le hachage SHA-256 car il est l'un des algorithmes de hachage les plus répandus et très performants, en plus d'être considéré comme sécurisé encore aujourd'hui.

Statuts actions

Create Docker image Build application Docker push GCR

4a_ilc_projet_ci_cd's People

Contributors

lebourguignon avatar tom-rh avatar

Watchers

 avatar

4a_ilc_projet_ci_cd's Issues

[ BUILD APP ACTION ] Manque une étape

Dans https://github.com/tom-rh/4A_ILC_PROJET_CI_CD/blob/main/.github/workflows/build_application.yml
Il vous manque une étape pour que cette action soit pertinente.

      # Install Flask
      - name: Install flask
        run: pip install flask

Ici vous ne testez que le fait que flask puisse s'installer dans le runner GitHub. Pour tester la syntaxe du code, il vous faut une étape supplémentaire qui exécute le fichier api.py sans lancer le serveur, comme nous l'avions fait dans le TD3 et le TD4 dont la correction est sur le dépôt module_ci-cd :

if __name__ == '__main__':
	if len(sys.argv) > 1:
		if sys.argv[1] == "check_syntax":
			print("Build [ OK ]")
			exit(0)
		else:
			print("Passed argument not supported ! Supported argument : check_syntax")
			exit(1)
	app.run(debug=True)

Ainsi vous auriez pu ainsi tester la syntax de votre fichier api.py en ajoutant l'étape suivante dans votre Github Action :

jobs:
    ...
    steps:
    ...
    - name: [ API ] Check syntax 
      run: |
        python api.py check_syntax

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.