Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
teknikattan-scoring-system
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tddd96-grupp1
teknikattan-scoring-system
Commits
58220832
Commit
58220832
authored
3 years ago
by
robban64
Browse files
Options
Downloads
Patches
Plain Diff
update: README.md in server for linux
parent
849e3592
No related branches found
No related tags found
No related merge requests found
Pipeline
#47112
passed
3 years ago
Stage: setup
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
server/README.md
+86
-12
86 additions, 12 deletions
server/README.md
with
86 additions
and
12 deletions
server/README.md
+
86
−
12
View file @
58220832
...
...
@@ -8,10 +8,13 @@ You will need to do the following things to install the server:
1.
Install
[
Visual Studio Code
](
https://code.visualstudio.com/
)
(
VS
Code).
2.
Install
[
Python
](
https://www.python.org/downloads/
)
.
3.
Clone this repository if you haven't done so already.
4.
Open the project folder in VS Code.
5.
Open the integrated terminal by pressing
`ctrl+ö`
.
6.
Type the following commands into your terminal:
3.
Install
[
pip
](
https://pip.pypa.io/en/stable/installing/
)
(
should
already be installed with python)
4.
Clone this repository if you haven't done so already.
5.
Open the project folder in VS Code.
6.
Open the integrated terminal by pressing
`ctrl+ö`
.
7.
Type the following commands into your terminal:
### Windows
```
bash
# Install virtualenv package. You may need to open as administrator if you get
...
...
@@ -25,37 +28,108 @@ cd server
# python or py -3 instead of py.
py
-m
venv
env
# Activate the virtual environment.
# This step is different depending on your operating system.
# Windows
# Prevent unauthorized error when running virtual environment in Windows.
Set-ExecutionPolicy Unrestricted
-Scope
Process
# Activate the virtual environment.
./env/Scripts/activate
# =====
# Linux/Mac
# Install all the required packages into your virtual environment.
pip
install
-r
requirements.txt
```
### Linux(Ubuntu)
```
bash
# Install pip
sudo
apt-get
install
python-pip
# Install virtualenv package.
sudo
apt
install
python3-venv
# Go into the server folder.
cd
server
# Create a python virtual environment. If it can't find python3, try
# python or py -3 instead of python3.
python3
-m
venv
env
# Activate the virtual environment.
source env
/bin/activate
# =====
# Install all the required packages into your virtual environment.
# If pip don't work try pip3 instead
pip
install
-r
requirements.txt
```
## Common problems
### Make sure python 3 is running with the python command
```
py --version
or
python --version
- If the version is < 3 try the following commands
py3 or python3
```
### Make sure pip is running with python 3
```
pip --version
Should return something similar to (these stats work on my system):
-> pip 19.2.3 from PATH (python 3.8)
If it says python < 3, try:
pip3 --version
```
This
[
guide
](
https://pip.pypa.io/en/stable/installing/
)
can help you upgrade pip
### Problem: Failed building wheel for xyz when calling pip
```
pip install wheel
```
This
[
guide
](
https://stackoverflow.com/questions/53204916/what-is-the-meaning-of-failed-building-wheel-for-x-in-pip-install
)
can help you troubleshoot this problem
## Using
After you have done every step described in setup, you are ready to start the server.
To see the tasks described in the following steps, press
`ctrl+shift+b`
.
### Populating database
Populate database by running the
`Populate database`
task. (populate.py)
### Starting
Start the server by running the
`Start server`
task.
Start the server by running the
`Start server`
task.
(main.py)
### Testing
Run the client tests running the
`Test server`
task.
Or run manually with:
```
pytest --cov-report html --cov app tests/
```
After it has finished, you can view a coverage report.
This is done by running the
`Open server coverage`
task.
Or run manually with:
```
start ./htmlcov/index.html
```
### Adding and removing new packages
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment