Welcome to the RNCP Validator project! This tool helps you identify commits made outside of school hours by comparing them with a provided calendar.
You can download the calendar by clicking on the "Télécharger le calendrier" button in the "Calendrier" section at CFA 42. The calendar must be a .xlsx file.
-
Install the Project
You can install the project directly from the main branch of the GitHub repository using the following command:
pip install git+https://github.com/kazourak/rncp-validator.git
To install a specific tagged version, use:
pip install git+https://github.com/kazourak/rncp-validator.git@<tag_version>
-
Run the Validator
Use the following command to analyze your calendar and Git repositories:
rncp_validator <calendar.xlsx or dir> <list of .git paths>
-
Example:
rncp_validator path/to/calendar.xlsx path/to/.git -
Directory of Calendars: If you provide a directory, the program will analyze each
.xlsxfile within it. -
Multiple Git Paths: You can provide multiple Git paths to analyze them all at once.
-
-
Set Up the Environment
Create a virtual environment and install the requirements:
make create_env source .venv/bin/activate make req -
Lint and Format the Code
Ensure your code adheres to style guidelines:
make lint make format
-
Run the Validator
You can run the validator with additional options:
python rncp_validator/checker.py <calendar.xlsx or dir> <list of .git paths> --branch <branch_name> --not_recursive
--branch <branch_name>: Specify the branch to check.--not_recursive: Do not explore the directory recursively.
usage: checker.py [-h] [--branch BRANCH] [--not_recursive] calendar_path git_paths [git_paths ...]
Process calendar and git parse arguments.
positional arguments:
calendar_path Path to the calendar file or directory
git_paths Git paths arguments
options:
-h, --help show this help message and exit
--branch BRANCH Branch to check
--not_recursive Do not explore the directory recursively.We would like to express our gratitude to the following developers who have contributed to the RNCP Validator project:
make install: Install the project.make create_env: Create a virtual environment.make req: Install requirements.make lint: Lint the code usingflake8andblack.make format: Format the code usingblack.