Advertisement
lllumineux

PTC documentation

Dec 2nd, 2020
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. ENV local:
  2. GITLAB_ACCESS_TOKEN - gitlab user private token (jeZ22xF_za2huW8ZfYha)
  3.  
  4.  
  5. Structure:
  6. "content" folder - folder with files, that will be in student's repo (filled with examples)
  7. "python_executor" - folder with files to create docker image from
  8. "root *.py files" - useful scripts to manage repo and test processes
  9.  
  10.  
  11. Getting started:
  12. 1. Clone repo with using "git clone https://gitlab.com/python_tasks_checker_demo/python_tasks_checker.git"
  13. 2. Add all the env variables locally
  14. a) GITLAB_ACCESS_TOKEN
  15.  
  16. Gitlab group creation:
  17. 1. Create group on gitlab (make sure it's public)
  18. 2. Add all the env variables on group variable (should be masked, not protected)
  19. a) ACCESS_TOKEN - your gitlab user's access token (can get it in settings)
  20. b) ACCESS_TOKEN_USERNAME - your gitlab username
  21. c) IS_DIAGNOSTIC - set to true if you want to get students ability to see the right answer in logs (false by default)
  22. d) PROJECT_IMAGE - docker image name (e.g. *nickname*/ptc)
  23. e) TEST_DATA_REPOSITORY - name of the repository with tests (e.g. *groupname*/tests)
  24.  
  25.  
  26. Docker image creation (to run tests with using it):
  27. 1. run "docker build -t *nickname*/ptc python_executor"
  28. 2. run "docker push *nickname*/ptc"
  29.  
  30.  
  31. Adding new test data:
  32. 1. Open repository with your test data (or create if you don't have it)
  33. 2. Add folder with the name of the testing branch (e.g. a_0001_basics)
  34. 3. In that folder add folder with the name of the task (e.g. hello_world)
  35. 4. Add .in & .out files there (should be in 0001.in, 0001.out, ..., 9999.in, 9999.out format)
  36. NOTE THAT: you should add empty folders for lessons with no tests in case to avoid pipeline errors
  37.  
  38.  
  39. Adding specified commit to all existing repositories:
  40. 1. *here are notes about running repository_updater.py*
  41.  
  42.  
  43. Auto .out files creation:
  44. 1. Add "custom_test_cases" folder to the root of the repo
  45. 2. Add
  46.  
  47.  
  48. Adding students to the group and creating their repos:
  49. 1. Send link to your group and wait til students will request access
  50. 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)
  51. 3. Run "python repository_creator.py", it will:
  52. a) Create repos named "*group_name* - *student_nickname* for every student, who requested an access"
  53. b) Add files from "content" folder to each repo
  54. c) Add all students to their newly created repo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement