Giter Site home page Giter Site logo

soen-6441's Introduction

soen-6441

tests coverage pylint

Setup:

git clone https://github.com/urvil38/soen-6441.git
cd soen-6441
  • Setup virtual enviroment (venv)
# install virtualenv using pip
pip install virtualenv

# this will create a venv directory in root of the repository
python3 -m venv venv

# activate the virtual env

# for Unix based systems
source ./venv/bin/activate

# for Windows
.\venv\Scripts\activate.bat //In CMD
.\venv\Scripts\activate.ps1 //In Powershel
  • Install the dependencies
pip install -r requirements.txt

Run:

Execute the Cheers project (without using standard library functions)

  • Running the program in interactive mode:
python3 src/incarnation_one.py

# print output in XML format
python3 src/incarnation_one.py xml

# print output in CSV format
python3 src/incarnation_one.py csv

This will start the program in interactive mode, prompting the user for input and displaying the results.

  • Generating a CSV file:
python3 src/incarnation_one.py generate csv > output.csv

This will generate a CSV file with the results and save it to output.csv.

  • Generating an XML file:
python3 src/incarnation_one.py generate xml > output.xml

This will generate an XML file with the results and save it to output.xml.

  • Execute the Cheers project (with using standard library functions)
python3 ./src/incarnation_two.py

Tests:

  • Run the following command from the root of the repository to execute all the tests:
pytest --cov -v
  • List out all the available tests(this will not execute any tests):
pytest --co -q
  • If you want to run individual test, provide test function name in the -k argument of the pytest command as following:
# only run test_generate_xml_response test

pytest -v -k test_generate_xml_response

Run Pylint:

# invoke the pylint linter on all the .py files as following
pylint src/*.py

How to deactivate virtualenv?

Just execute following command to deactivate the virtualenv:

deactivate

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.