Updated Setup Guide and Fixed Requirements - #18
Conversation
CuriousLearner
left a comment
There was a problem hiding this comment.
Hi @thisisayush !
Thanks for you work. I've mentioned my review inline.
Apart from that, please remove requirements.txt change, and all the migrations.
Migrations would be committed in the project at later point of time.
Apart from that, you're not supposed to commit your sqlite database, so please remove that.
Also, in the setup guide, add a create superuser command, with which developer can login to the admin panel.
| **Note:** To deactivate the Virtual Environment, type deactivate in the shell to deactivate. | ||
| #### Clone your forked repo | ||
| ``` | ||
| git clone https://github.com/your_username/Confluence |
There was a problem hiding this comment.
Mention <github_username> instead of your_username
Also, add a note that people have to replace this with their github username
| git clone https://github.com/your_username/Confluence | ||
| ``` | ||
| ##### Change to develop branch | ||
| Code development should happed in 'develop' branch and not in 'master' branch |
There was a problem hiding this comment.
No, Development does not happen on develop branch. It would happen on a feature branch and PRs would be created from feature branch on their fork to the develop branch of this project.
Understand this, as, if many people are working on develop branch in their fork they have to continually rebase to get latest code and place their code on top of it (and solving merge conflicts).
We prefer solving merge conflicts when a single feature is complete (and also would be squashed to a single commit on develop branch)
| ``` | ||
|
|
||
| #### Installing Project Requirements (First Time Only or on Requirement changes) | ||
| Change directory to cloned directory |
There was a problem hiding this comment.
Change to project dir, not cloned dir
| ``` | ||
| Use pip to install missing requirements: (if you don't have pip installed on your system, google how to install) (Windows Users should run this command Adminsitrator Shell or will get error) | ||
| ``` | ||
| pip install -r .\requirements.txt |
There was a problem hiding this comment.
no backward slashes here.
Simply goes by
pip install -r requirements.txt
| pip install -r .\requirements.txt | ||
| ``` | ||
| #### Creating Environment Variables File | ||
| Change directory to src/confluence to create a ".env" file that will contain your enviroment variables. **Note:** This file will not ignored by git and will be available automatically on production environment. |
There was a problem hiding this comment.
.env does not get included in git. That is the whole point of keeping settings as environment variables (because we want to prevent including confidential information on git tree)
| ``` | ||
| Create file ".env" with following data: | ||
| ``` | ||
| EXPLARA_API_KEY=YOUR_EXPLARA_KEY_HERE |
There was a problem hiding this comment.
Change values to snake case with angular brackets like:
EXPLARA_API_KEY=<your_explara_key>
So that it looks different and someone reading the guide could quickly understand.
Also include a note to replace values with actual values.
| ``` | ||
| python manage.py runserver | ||
| ``` | ||
| You will see something like |
There was a problem hiding this comment.
You will something like this is not needed.
Rest of the things are also not needed.
Just add that you can visit the list at localhost:8000.
| Starting development server at http://127.0.0.1:8000/ | ||
| Quit the server with CTRL-BREAK. | ||
| ``` | ||
| On successful setup you will see the second last line i.e. ' Starting Development Server at http://127.0.0.1:8000/ '. Visit this url on your web browser to see if server is started successfully. On failed startup, you will see a 'Refused to connect' error. |
There was a problem hiding this comment.
When would one get Refused to connect error?
There was a problem hiding this comment.
It happens when Server is not started i.e. the runserver command get stucked at some point while starting server due to some error and the developer may think that server is started.
|
Removing requirements.txt change will cause error while starting server because the social media app requires "Pillow" which wasn't available in requirements.txt and hence pip install -r requirements.txt will not install it and will require additional command to install in manually |
Updated Setup Guide in README.md Updated Setup Guide (required changes)
|
Added Superuser Creation detail in README.md |
|
|
||
| ### Creating a Virtual Environment | ||
| Virtual Environment allows us to have requirements installed specifically to our project instead of complete system. To create a virtual environment goto any directory where you will store your code and run the following command on terminal (linux) or Windows PowerShell (Windows)(For windows, run Windows Powershell as Administrator before running below commands) | ||
| ``` |
There was a problem hiding this comment.
Please break lines after like 80-90 characters
There was a problem hiding this comment.
goto -> go to
running below commands -> running following commands
| ``` | ||
| Development does not happen on develop branch. It would happen on a feature branch and PRs would be created from feature branch on their fork to the develop branch of this project. | ||
|
|
||
| Understand this, as, if many people are working on develop branch in their fork they have to continually rebase to get latest code and place their code on top of it (and solving merge conflicts). |
There was a problem hiding this comment.
Please rephrase this to be more readable.
|
Completed @aktech Requested Changes. |
- Created Missing Migrations#1