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

soen-6441's People

Contributors

urvil38 avatar aaa530 avatar iamdarshpatel avatar

Watchers

 avatar  avatar

soen-6441's Issues

XML incarnation 2

T must provide a sample output, say, for different values of R. The output of P must be
expressed in XML. This output must be valid with respect to some XML DTD

Fix failing pylint workflow

Pylint job is currently failing. To fix the issue we have to make following changes suggested by the linter.

************* Module main
src/main.py:1:0: C0114: Missing module docstring (missing-module-docstring)
src/main.py:6:0: C0116: Missing function or method docstring (missing-function-docstring)
src/main.py:1[8](https://github.com/urvil38/soen-6441/actions/runs/4238924912/jobs/7366491452#step:5:9):0: C0116: Missing function or method docstring (missing-function-docstring)
src/main.py:26:0: C0116: Missing function or method docstring (missing-function-docstring)
src/main.py:34:0: C0116: Missing function or method docstring (missing-function-docstring)
src/main.py:40:0: C0116: Missing function or method docstring (missing-function-docstring)
src/main.py:43:0: C0116: Missing function or method docstring (missing-function-docstring)
src/main.py:50:0: C0116: Missing function or method docstring (missing-function-docstring)
************* Module plot
src/plot.py:1:0: C0114: Missing module docstring (missing-module-docstring)
************* Module app_with_lib
src/app_with_lib.py:1:0: C0114: Missing module docstring (missing-module-docstring)
src/app_with_lib.py:3:0: C0116: Missing function or method docstring (missing-function-docstring)
src/app_with_lib.py:6:0: C0116: Missing function or method docstring (missing-function-docstring)
src/app_with_lib.py:[9](https://github.com/urvil38/soen-6441/actions/runs/4238924912/jobs/7366491452#step:5:10):0: C0116: Missing function or method docstring (missing-function-docstring)

-----------------------------------
Your code has been rated at 8.27/[10](https://github.com/urvil38/soen-6441/actions/runs/4238924912/jobs/7366491452#step:5:11)

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.