https://github.com/hyperskill/hyperstyle-analysis-prod
https://github.com/hyperskill/hyperstyle-analysis-prod
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hyperskill/hyperstyle-analysis-prod
- Owner: hyperskill
- License: apache-2.0
- Created: 2022-12-07T10:11:07.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-13T12:06:19.000Z (over 2 years ago)
- Last Synced: 2025-06-11T01:29:51.948Z (about 1 year ago)
- Language: Python
- Size: 3.56 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hyperstyle analysis
This repository contains several tools-helpers to work with data from the Hyperskill and JetBrains Academy platforms:
- [core](./core) module contains some common functions like pandas utilities or some common models
- [templates](./templates/README.md) module contains algorithms for searching code quality issues in the pre-written templates.
- [data collection](./data_collection/README.md) module contains client for Hyperskill. This module use platforms' APIs to extract information about following entities from the educational platforms.
- [preprocessing](./preprocessing/README.md) module contains methods to preprocess and prepare data, collected from Hyperskill educational platform, for further analysis.
### JetBrains Academy/Hyperskill platform
On the JetBrains Academy platform, the educational process is structured as follows: firstly,
the student’s solution is checked for correctness using traditional predefined tests. Then, two
scenarios are possible:
**(1)** if the solution is incorrect (contains compilation errors or does not pass all tests),
then these problems are reported to the student, and they continue to solve the
task;
**(2)** if the solution is correct, the [Hyperstyle](https://github.com/hyperskill/hyperstyle) tool is launched to check the quality of the code.
Therefore, the result of the Hyperstyle tool can only be determined for _correct_ solutions,
that is, solutions that pass all tests. After successfully passing the solution, the student receives
a code quality grade on a four-point scale, and all detected issues (if any) are highlighted in
the code editor. An example of the Hyperstyle user interface:

## Getting started
### Run via poetry
This project uses the [Poetry](https://github.com/python-poetry/poetry) build system. To set up everything you need:
1. [Install](https://python-poetry.org/docs/#installation) poetry.
2. Clone this repository
3. Run `poetry install --with `, where `` is a list of modules what you need to install. Only the [`core`](core) module is not an optional and is always installed.
For example, if you want to install the [`data_collection`](data_collection), [`jba`](jba) and [`preprocessing`](preprocessing) modules, then you should run `poetry install --with data-collection,jba,preporcessing`.
To run any script in the repository just execute:
```bash
poetry run python /path/to/the/script.py [script_arguments]
```
There are also several aliases for main scripts.
You could find them inside the [pyproject.toml](pyproject.toml) file in the `[tool.poetry.scripts]` section.
To run any script using its alias just execute:
```bash
poetry run [script_arguments]
```
### Run via Docker
If you don't want to install poetry, you could use our official Docker image where all necessary environment is installed.
To do this:
1. Pull the image:
```bash
docker pull registry.jetbrains.team/p/code-quality-for-online-learning-platforms/hyperstyle-analysis-prod/hyperstyle-analysis-prod:
```
where `` is the project version you would like to use. You could always find the latest version inside the [pyproject.toml](pyproject.toml) file.
2. Run a container with the command you would like to execute.
```bash
docker run hyperstyle-analysis-prod:
```
For example:
```bash
docker run hyperstyle-analysis-prod: poetry run [script_arguments]
```