Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ENV local:
- GITLAB_ACCESS_TOKEN - gitlab user private token (jeZ22xF_za2huW8ZfYha)
- Structure:
- "content" folder - folder with files, that will be in student's repo (filled with examples)
- "python_executor" - folder with files to create docker image from
- "root *.py files" - useful scripts to manage repo and test processes
- Getting started:
- 1. Clone repo with using "git clone https://gitlab.com/python_tasks_checker_demo/python_tasks_checker.git"
- 2. Add all the env variables locally
- a) GITLAB_ACCESS_TOKEN
- Gitlab group creation:
- 1. Create group on gitlab (make sure it's public)
- 2. Add all the env variables on group variable (should be masked, not protected)
- a) ACCESS_TOKEN - your gitlab user's access token (can get it in settings)
- b) ACCESS_TOKEN_USERNAME - your gitlab username
- c) IS_DIAGNOSTIC - set to true if you want to get students ability to see the right answer in logs (false by default)
- d) PROJECT_IMAGE - docker image name (e.g. *nickname*/ptc)
- e) TEST_DATA_REPOSITORY - name of the repository with tests (e.g. *groupname*/tests)
- Docker image creation (to run tests with using it):
- 1. run "docker build -t *nickname*/ptc python_executor"
- 2. run "docker push *nickname*/ptc"
- Adding new test data:
- 1. Open repository with your test data (or create if you don't have it)
- 2. Add folder with the name of the testing branch (e.g. a_0001_basics)
- 3. In that folder add folder with the name of the task (e.g. hello_world)
- 4. Add .in & .out files there (should be in 0001.in, 0001.out, ..., 9999.in, 9999.out format)
- NOTE THAT: you should add empty folders for lessons with no tests in case to avoid pipeline errors
- Adding specified commit to all existing repositories:
- 1. *here are notes about running repository_updater.py*
- Auto .out files creation:
- 1. Add "custom_test_cases" folder to the root of the repo
- 2. Add
- Adding students to the group and creating their repos:
- 1. Send link to your group and wait til students will request access
- 2. Add all the date, that you want to be located at repos (instructions, .gitignore etc) to "content" folder. (DO NOT TOUCH .gitlab-ci.yml)
- 3. Run "python repository_creator.py", it will:
- a) Create repos named "*group_name* - *student_nickname* for every student, who requested an access"
- b) Add files from "content" folder to each repo
- c) Add all students to their newly created repo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement