Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposed Changes for TOPSIS Configuration and Unit Tests #73

Merged
merged 7 commits into from
Sep 11, 2023

Conversation

FredericDymko
Copy link
Collaborator

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.

  1. New Configuration Options
    • Introduces new environment variables for configuring TOPSIS analysis, such as TOPSIS_CRITERIA, TOPSIS_WEIGHTS, and TOPSIS_ALTERNATIVES.
  2. 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.
  3. 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.
  4. 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.

@Creadeyh Creadeyh merged commit 4151feb into devel Sep 11, 2023
1 check passed
@Creadeyh Creadeyh deleted the feat/topsis_config branch September 12, 2023 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants