Topsis-Anahat-102313058 1.0.2__tar.gz → 1.0.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Topsis-Anahat-102313058
3
- Version: 1.0.2
3
+ Version: 1.0.3
4
4
  Summary: TOPSIS implementation using Python
5
5
  Author: Anahat
6
6
  Requires-Dist: pandas
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Topsis-Anahat-102313058
3
- Version: 1.0.2
3
+ Version: 1.0.3
4
4
  Summary: TOPSIS implementation using Python
5
5
  Author: Anahat
6
6
  Requires-Dist: pandas
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ topsis = topsis_anahat_102313058.topsis:cli
@@ -2,14 +2,14 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="Topsis-Anahat-102313058",
5
- version="1.0.2",
5
+ version="1.0.3",
6
6
  author="Anahat",
7
7
  description="TOPSIS implementation using Python",
8
8
  packages=find_packages(),
9
9
  install_requires=["pandas", "numpy"],
10
10
  entry_points={
11
- 'console_scripts': [
12
- 'topsis=topsis_anahat_102313058.topsis:topsis'
13
- ]
14
- }
11
+ "console_scripts": [
12
+ "topsis=topsis_anahat_102313058.topsis:cli"
13
+ ]
14
+ }
15
15
  )
@@ -6,7 +6,7 @@ def error(msg):
6
6
  print(f"Error: {msg}")
7
7
  sys.exit(1)
8
8
 
9
- # THIS FUNCTION IS REQUIRED FOR PyPI CLI
9
+ # ---------------- CORE LOGIC ----------------
10
10
  def topsis(input_file, weights, impacts, output_file):
11
11
 
12
12
  try:
@@ -64,12 +64,16 @@ def topsis(input_file, weights, impacts, output_file):
64
64
  data.to_csv(output_file, index=False)
65
65
  print(f"TOPSIS result saved to {output_file}")
66
66
 
67
- # THIS MAINTAINS CLI USAGE (python topsis.py ...)
68
- def main():
67
+ # ---------------- CLI WRAPPER ----------------
68
+ def cli():
69
69
  if len(sys.argv) != 5:
70
- error("Incorrect number of parameters.\nUsage: python topsis.py <InputFile> <Weights> <Impacts> <OutputFile>")
70
+ error(
71
+ "Incorrect number of parameters.\n"
72
+ "Usage: topsis <InputFile> <Weights> <Impacts> <OutputFile>"
73
+ )
71
74
 
72
75
  topsis(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4])
73
76
 
77
+ # ---------------- ENTRY ----------------
74
78
  if __name__ == "__main__":
75
- main()
79
+ cli()
@@ -1,2 +0,0 @@
1
- [console_scripts]
2
- topsis = topsis_anahat_102313058.topsis:topsis