Skip to main content

"Create a diamond from a letter."

Project description

Exam Continuous Integration EPSI DevOps 3A

Authors :

- Thibault Scorielle 
- Antoine Letailleur
- Dimitri Perreaux

package on pypi.org

Purpose :

The objective of this project is to generate a diamond pattern using letters. The script takes a letter as a parameter and displays a diamond, starting with 'A', where the provided letter marks the widest point of the diamond.

Exemple :

diamond('A')

A

diamond('B')

 A
B B
 A

diamond('C')

  A
 B B
C   C
 B B
  A

Want to use this project?

  1. FORK / CLONE

run the project

$ cd diamond_ci_exam
$ py diamond_ci_exam.py '<your_letter>'
#ex : $ py diamond_ci_exam.py 'J'

(default parameter : 'F')

  1. CREATE and ACTIVATE a VIRTUAL ENVIRONMENT to use poetry

Install venv

$ py -m pip install --user virtualenv

Create virtual env

$ py venv env

Activate virtual env

$ .\env\Scripts\activate

Install pipx

$ python -m pip install pipx
$ python -m pipx ensurepath

README.md repo pipx

Install poetry

$ pipx install poetry

POETRY documentation

Install poetry dependencies

$ poetry install

Run Linters locally with poetry

$ poetry run flake8 ./diamond_ci_exam/diamond_ci_exam.py
$ poetry run isort ./diamond_ci_exam/diamond_ci_exam.py
$ poetry run bandit ./diamond_ci_exam/diamond_ci_exam.py

FLAKE8 : check PEP8
ISORT : check imports
BANDIT : find common security issues in Python code

  1. TESTS

Unit Tests locally

  • witout poetry
$ python -m unittest discover -s test 
  • with poetry
$ poetry run python -m unittest discover -s test 

unittest discover arguments

  1. PUBLISH PACKAGE
$ poetry publish --build --username __token__ --password <pypi API token>

poetry publish arguments

/!\ Don't forget to change the version of the package in pyproject.toml when you want to push and to update the package /!\

** Project is written with python 3.11 and tested on 3.9, 3.10, 3.11 **

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

diamond_ci_exam-0.1.8.tar.gz (2.3 kB view hashes)

Uploaded Source

Built Distribution

diamond_ci_exam-0.1.8-py3-none-any.whl (2.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page