You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DocHub is a website, written in django. It's main goal is to provide a space for students (for now form the [ULB](https://ulb.ac.be) university) to collaborate, help each other and distribute old exams and exercices.
5
+
DocHub is a website written in django. Its main goal is to provide a space for students
6
+
(for now form the [ULB](https://ulb.ac.be) university) to collaborate, help each other and distribute old exams and exercises.
6
7
7
8
There is a [live instance of DocHub](https://dochub.be) hosted by [UrLab](https://urlab.be) and the [Cercle Informatique](https://cerkinfo.be).
8
9
@@ -14,11 +15,22 @@ There is a [live instance of DocHub](https://dochub.be) hosted by [UrLab](https:
14
15
15
16
## Tech
16
17
17
-
DocHub currently (Feb 2022) runs with Python 3.10 and Postgresql 14.
18
+
DocHub currently (Feb 2025) runs with Python 3.13 and Postgresql 16.
18
19
19
-
### Dependencies
20
+
### Installation
21
+
22
+
If you install the packages listed above and follow the installation steps exactly, you should have a running version
23
+
of DocHub on your machine. If it's not the case, **you are not the problem**, it means we have a bug.
24
+
25
+
Please open an issue with the output of your console and describe the problem you encountered, we **will** and will fix
If you install the packages listed above and follow the installation steps exactly, you should have a running version
37
-
of DocHub on your machine. If it's not the case, **you are not the problem**, it means we have a bug.
38
-
39
-
Please open an issue with the output of your console and describe the problem you encountered, we **will** and will fix
40
-
it for you and the all the next users :rocket:
41
-
42
-
To create the virtual environment and install the requirements, run the following command:
43
-
```console
44
-
make install
45
-
46
-
# Alternatively, if you prefer to do it by hand
47
-
python3 -m venv ve
48
-
source ve/bin/activate
49
-
pip install -r requirements.txt
50
-
```
51
-
52
-
To create a database and fill it with some dummy data, run the following command. Observe the output, it
53
-
will tell you the credentials you can then use to log in.
45
+
To create a database and fill it with some fake data, run the following command.
46
+
Observe the output, it will tell you the credentials you can then use to log in.
54
47
```console
55
48
make database
56
49
```
@@ -60,45 +53,44 @@ make database
60
53
This will have to be done each time you want to run DocHub.
61
54
62
55
```console
63
-
source ve/bin/activate
64
-
./manage.py runserver
56
+
uv run manage.py runserver
65
57
```
66
58
67
59
Then go http://localhost:8000/
68
60
69
61
There will already be 2 users in the database, both with `test` as a password:
70
62
71
-
- $(USER): your username on your machine
63
+
- $(USER): your username on your machine
72
64
- blabevue
73
65
74
66
### Misc
75
67
76
68
#### Add another user to the db
77
69
78
70
```console
79
-
./manage.py createuser
71
+
uv run manage.py createuser
80
72
```
81
73
82
74
#### Requirements
83
75
84
-
To add a requirement, write it in `requirements.in` file, and generate the requirements.txt file with the following command
76
+
To add a requirement, use:
85
77
86
78
```console
87
-
pip-compile
79
+
uv add <package-name>
88
80
```
89
81
90
82
## Testing
91
83
92
84
Run only fast tests (total time < 2 sec) : not testing actual file conversions
93
85
94
86
```console
95
-
py.test -k "not slow"
87
+
uv run pytest -k "not slow"
96
88
```
97
89
98
90
Run all tests (~20 sec)
99
91
100
92
```console
101
-
py.test
93
+
uv run pytest
102
94
```
103
95
104
96
## Contribute !
@@ -112,13 +104,9 @@ Check the issues tab and look and the issues tagged with the `easy pick` label.
112
104
Assign yourself to an issue and start working on it *in your own branch*. If you have any questions or issue, feel free to ask them in the issue or tag some people you know can help.<br/>
113
105
If your PR is completed, ask for reviews either by mentioning the people you want to review your PR (You can also set them as reviewers on the right) or by asking on our irc channel **#urlab** on libera.chat.
114
106
115
-
### Any question ?
116
-
117
-
Come by #urlab on libera.chat and feel free to ask anything !
118
-
119
107
## License
120
108
121
-
Copyright 2012 - 2022, Cercle Informatique ASBL. All rights reserved.
109
+
Copyright 2012, Cercle Informatique ASBL. All rights reserved.
122
110
123
111
This program is free software: you can redistribute it and/or modify it
124
112
under the terms of the GNU Affero General Public License as published by
0 commit comments