Setup instructions for Program Analysis Project!
Program Analysis aims to build a system that can do more program analysis instead of a simple grading system. Currently, there are a lot of platforms for grading systems but none of them provide features like memory issue checking, error message suggestions and so on features. Also, we plan to impelement an easier way for user to custom their own test cases.
Our current team is made up of backend, frontend and testing subteams. Frontend is in charge of the UI design for submission and login pages. Backend is responsible for the establishment of database and grading. Testing team is responsible for using pytest to test the design. Our semester goal to make a fully functional grading system. Our next step is to try to implement those features to analyze programs.
Check and make sure you do all the thing!
- Be added to program analysis slack channel
- Contact your subteam leader and be added to discord server
- Finish the set up in Getting Started Section
- Check in every week with your team/alone to report your progress/plan/issue
- Attend your subteam meeting
- Access to the repository
- Send team leader your github name
- Wait to be added to the github
- For group member
- Set up an ssh key pair on your own computer and the ECE Grid.
- Run
ssh-keygen
in Powershell on Windows, or any terminal on a Unix based system. - Type
cat ~/.ssh/id_rsa.pub
, then copy the entire output (everything includingssh-rsa
and***@hostname
) to your
clipboard and email to the system administrator. - Once the administrator adds your account, try loging in with
[email protected]
- Once logged in, if you have not been prompted to update your password, run
passwd
and set your password.
- Run
- Set up an ssh key pair on your own computer and the ECE Grid.
- For server manger
- Adding a new user to Precipice.
- run
sudo useradd -m [username]
- Ask new user to provide their public key to you
- From the servadmin folder in this repository, run:
sudo ./addKey.sh [username] "<paste user key here>"
echo "[username]" | sudo ./resetPasswd.sh
- Inform user that they may now log in to the system with instructions above.
- run
- Giving sudo privileges to a user.(Only if this user is leader or server manger)
sudo usermod -aG sudo [username]
- Check current root user
cat /etc/group | grep sudo
- Command to change privilege
- Change to root(set password first if you do not have one)
sudo -s
You should see you become root because $ will change to # - To get out of root do
CTRL + D
orcommand + D
- Change to root(set password first if you do not have one)
- Adding a new user to Precipice.
- Use Visual Studio Code to assess the sever(Recommended)
- Click the Extension icon(or
Ctrl + Shift + X
) on the left bar of your visual studio code. - Serach 'ssh' on the serach box
- Click the first extension (Remote - SSH) and hit install
- After installation, you should see a new icon pops above Extension called Remote Explorer
- Hit that icon and find the + icon under ssh target (Add new)
- On the pop prompt enter
ssh [email protected]
where username is your name sent to the server manager (purdue login by default) - Press enter and it will save automatically in your config file
- Now you should see a computer icon pops under your ssh target with name
precipice.ecn.purdue.edu
- Move your cursor around that computer icon and hit the icon on the right called 'Open on SSH Host in New window'
- Now you are all set! In the new window, you can click on Open Folder in the file explorer to open the folder you needed.
- Click the Extension icon(or
- Directly access through your terminal
- Type the following command in your terminal(powershell for windows) where username is your name sent to the server manager (purdue login by default)
ssh [email protected]
- If you log in successfully, you should be able to see the left of your terminal becomes
username@precipice:~$
Now you are all set!
- Type the following command in your terminal(powershell for windows) where username is your name sent to the server manager (purdue login by default)
- If you are in frontend team
- Please Read Instrction on:
https://github.com/PurdueCAM2Project/pas_frontend/blob/main/README.md - Read the dijango document:
https://docs.djangoproject.com/en/3.2/
- Please Read Instrction on:
- If you are in backend team
- Please Read Instrction on:
https://github.com/PurdueCAM2Project/pas_backend/blob/main/README.md - Have good knowledge of regular expression
- Have good knowledge of python class
- Please Read Instrction on:
- If you are in Testing team
- Please read the ReadMe of team you are responsible for testing
-
Clone + Add + Commit + Push
git clone + HTTPS link on repository
: clone the repository to the local (Only need once)git add [filename]
: command use to add files to commitgit commit -m "message here"
: command to commit the added filegit push
: Push the file been committedgit pull
: To get the update in remote repo
-
Regarding Branches
git checkout -b [branchname]
: Create a branch and switch to that branchgit branch
: Check the branches, you should see a * before the branch you are currently at- Do
git add
andgit commit
as before - Use
git push origin [branchname]
to create a branch in the repo and push the changes to the branches in the remote repo - Create pull request: Go to github webpage, you should see something like
Compare and merge branches
instantly after you push. Write down more comments and wait for others to merge the branches. - Delete the branches once it has been merged
-
Tips
- Merge at least once per two weeks. Otherwise your branch is lag far behind main branch and may cause conflict when you try to merge it thousands years later.
- NOT be afraid that you will ruin the repository, git and branches exists because we can always get former version and prevent merge if it is dangerous 🙂
- Do NOT push so many large file unnecessary(like large library - you can write the library required in requirements.txt and people can download it by themselves on their own computer)
- Continue 3. Use .gitignore to ignore some kind of file to be push (for example, you don't have to push BubbleSort.o which is the executable file generated by BubbleSort.c)
- Be short and concise
- Demo/Illustration are better than words
- State the issue clearly rather than simply say "It does not work"
- Leaders should pay attention to this and ask that member why it does not work
- Leaders should also monior all the members' task, make sure they are not misunderstand and wasting time doing useless stuff
- Shan Huang (Spring 2021, Summer 2021 Leader) - [email protected]
- Jonathan Doorn (Spring 2021 Co-Leader) - [email protected]