Skip to main content

A production-grade TOPSIS implementation (CLI + Python package).

Project description

TOPSIS — Harshpreet (102317160)

This package implements TOPSIS (Technique for Order Preference by Similarity to Ideal Solution) as required by the assignment:

  • CLI program
  • Input validation
  • CSV output with Topsis Score and Rank
  • Packaged for PyPI

Installation (from source)

pip install -U pip
pip install .

CLI Usage (Assignment Part-I)

python topsis.py <InputDataFile> <Weights> <Impacts> <OutputResultFileName>

Example:

python topsis.py data.csv "1,1,1,2,1" "+,+,-,+,+" output-result.csv

CLI Usage (after installing as a package)

topsis-harshpreet-102317160 <InputDataFile> <Weights> <Impacts> <OutputResultFileName>

Input Rules

  • CSV must contain 3 or more columns
  • 1st column: alternatives/labels (can be non-numeric)
  • 2nd to last columns: numeric criteria values
  • Weights and Impacts must be comma-separated lists, same length as number of criteria
  • Impacts must be + (benefit) or - (cost)

Output

Adds:

  • Topsis Score
  • Rank (1 = best)

Build & Upload to PyPI (Part-II)

  1. Update authors.email in pyproject.toml
  2. Build:
python -m pip install build twine
python -m build
  1. Upload:
python -m twine upload dist/*

Quick Test

pip install dist/Topsis_Harshpreet_102317160-1.0.0-py3-none-any.whl
topsis-harshpreet-102317160 data.csv "1,1,1,2,1" "+,+,-,+,+" out.csv

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

topsis_harshpreet_102317160-1.0.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

topsis_harshpreet_102317160-1.0.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file topsis_harshpreet_102317160-1.0.0.tar.gz.

File metadata

File hashes

Hashes for topsis_harshpreet_102317160-1.0.0.tar.gz
Algorithm Hash digest
SHA256 838a2ff52af1ab78da6c821fd2a198c10dcb01d1aef373b2857e199474642cf1
MD5 bc99d51141c6f363e21204ba98b15eee
BLAKE2b-256 ef2a85342a2bc18cbb74ecc47a21cc8dd7a7c599526ba4c6bb7dcc62986a276b

See more details on using hashes here.

File details

Details for the file topsis_harshpreet_102317160-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for topsis_harshpreet_102317160-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5dcd8b2a6a644851ae6fdecfd76d7542dba9367aa9d3ed6b480e5d2cefffc8cb
MD5 42d38f00c371075cd14ed00e4e17bb31
BLAKE2b-256 8a012b76c89ef580eb6f532a36b1629daed0cc5ea1491e517f6f1c24dcd10807

See more details on using hashes here.

Supported by

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