This project is a web-based application for conducting profiling tests using Streamlit. It offers a way to display questions, gather user responses, and visualize the results. Answers are scored across multiple subcategories, categories and dimensions, which are visualized in sunburst charts, one for each dimension. The system is modularized into four main Python files:
questionnaire.py
: The main script for running the Streamlit app, responsible for handling UI interactions and maintaining session state.score.py
: Contains theProfilingTestScoring
class, which calculates the test scores based on user responses.utils.py
: Provides utility functions for loading and merging questions from JSON files, fetching answers, and exporting results.visualize.py
: Functions to visualize the test results using Plotly.
-
Install dependencies into your active virtual environment, e.g.:
pip install -r requirements.txt
-
Clone the repository to your local machine:
git clone <repository_url>
-
Navigate to the project directory:
cd /path/to/univero/prof_testing
-
Run the Streamlit app:
streamlit run questionnaire.py
-
Navigate to the URL provided in the terminal to interact with the application.
...
└── prof_testing
├── questionnaire.py
├── score.py
├── utils.py
└── visualize.py
- Supports different types of questions: single choice, multiple choice, and list matching.
- Navigation between questions.
- Validation of session states.
- Uses a scoring mechanism defined in the
ProfilingTestScoring
class. - Supports different question types.
- Loading and merging questions from various dimensions.
- Exporting test results.
- Uses Plotly to create sunburst charts for visualizing the test scores.
Pass the debug=true
query parameter in the URL to enable the debug mode, which displays additional details and visualizes test results on the fly.
Pass filter
argument to filter questions, e.g. filter=single,multiple to display only questions of single
and multiple
types.
Please refer to the inline comments and docstrings in each Python file for more details about the classes and functions.
To contribute to this project, please follow the usual fork, feature-branch, pull-request workflow.
This project is licensed under the MIT License.
For more information, please contact the repository owner.