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 ScoreRank(1 = best)
Build & Upload to PyPI (Part-II)
- Update
authors.emailinpyproject.toml - Build:
python -m pip install build twine
python -m build
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file topsis_harshpreet_102317160-1.0.0.tar.gz.
File metadata
- Download URL: topsis_harshpreet_102317160-1.0.0.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
838a2ff52af1ab78da6c821fd2a198c10dcb01d1aef373b2857e199474642cf1
|
|
| MD5 |
bc99d51141c6f363e21204ba98b15eee
|
|
| BLAKE2b-256 |
ef2a85342a2bc18cbb74ecc47a21cc8dd7a7c599526ba4c6bb7dcc62986a276b
|
File details
Details for the file topsis_harshpreet_102317160-1.0.0-py3-none-any.whl.
File metadata
- Download URL: topsis_harshpreet_102317160-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5dcd8b2a6a644851ae6fdecfd76d7542dba9367aa9d3ed6b480e5d2cefffc8cb
|
|
| MD5 |
42d38f00c371075cd14ed00e4e17bb31
|
|
| BLAKE2b-256 |
8a012b76c89ef580eb6f532a36b1629daed0cc5ea1491e517f6f1c24dcd10807
|