This pull request introduces significant updates to the TOPSIS analysis functionality in order to provide better configurability for users. The primary objective is to allow users to configure TOPSIS analysis using environment variables, making it easier to parameterize the analysis according to specific project requirements.
New Configuration Options
Introduces new environment variables for configuring TOPSIS analysis, such as TOPSIS_CRITERIA, TOPSIS_WEIGHTS, and TOPSIS_ALTERNATIVES.
CriterionParser and AlternativesParser
Added two new utility classes, CriterionParser and AlternativesParser, to facilitate parsing criteria and alternatives with their respective weights and names.
CriterionParser now raises appropriate exceptions (e.g., InvalidCriterionError, MissingWeightError, and NoCriteriaProvidedError) to handle different validation scenarios when parsing criteria.
Improved TOPSIS Command
Modified the topsis command to utilize the new CriterionParser and AlternativesParser for parsing criteria and alternatives.
The topsis command now also has a more detailed docstring explaining its purpose, input parameters, and possible
exceptions.
Added Unit Tests
Included comprehensive unit tests for the new functionality, ensuring proper parsing of criteria and alternatives, and handling various validation scenarios.
All changes have been thoroughly tested locally to ensure their correctness and maintain functionality with existing code. Unit tests have been included to validate the new parsing classes and verify the expected behavior of the TOPSIS analysis.
[How to Use the New Configuration Options]
With the new environment variables introduced, users can now easily configure the criteria and alternatives for TOPSIS analysis by setting the appropriate environment variables. Detailed documentation on how to use these environment variables has been added to the project's .env-example file.
Please review the proposed changes and provide feedback. These enhancements aim to make TOPSIS analysis more user-friendly and configurable, empowering users to fine-tune the analysis based on their specific project needs.
This pull request introduces significant updates to the TOPSIS analysis functionality in order to provide better configurability for users. The primary objective is to allow users to configure TOPSIS analysis using environment variables, making it easier to parameterize the analysis according to specific project requirements.
TOPSIS_CRITERIA
,TOPSIS_WEIGHTS
, andTOPSIS_ALTERNATIVES
.CriterionParser
andAlternativesParser
, to facilitate parsing criteria and alternatives with their respective weights and names.InvalidCriterionError
,MissingWeightError
, andNoCriteriaProvidedError
) to handle different validation scenarios when parsing criteria.topsis
command to utilize the newCriterionParser
andAlternativesParser
for parsing criteria and alternatives.topsis
command now also has a more detailed docstring explaining its purpose, input parameters, and possible exceptions.All changes have been thoroughly tested locally to ensure their correctness and maintain functionality with existing code. Unit tests have been included to validate the new parsing classes and verify the expected behavior of the TOPSIS analysis.
[How to Use the New Configuration Options] With the new environment variables introduced, users can now easily configure the criteria and alternatives for TOPSIS analysis by setting the appropriate environment variables. Detailed documentation on how to use these environment variables has been added to the project's .env-example file.
Please review the proposed changes and provide feedback. These enhancements aim to make TOPSIS analysis more user-friendly and configurable, empowering users to fine-tune the analysis based on their specific project needs.