-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/makeoverviewdynamic
- Loading branch information
Showing
240 changed files
with
5,261 additions
and
1,579 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Force all files to use LF line endings | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,55 +2,58 @@ | |
|
||
<img src="./docs/splash.png"/> | ||
|
||
## Documentation | ||
## Introduction | ||
|
||
- **[Technical Documentation](./docs/technical/README.md)** | ||
- [Work Methodology](./docs/work-methodology.md) | ||
- [Useful Commands](./docs/useful-commands.md) | ||
- [Technologies used on Samf4 🤖](./docs/technical/Samf4Tech.md) | ||
- [Project Specific Commands](./docs/docker-project-specific-commands.md) | ||
- [Useful Docker aliases](./docs/docker-project-specific-commands.md) | ||
- [🌐 API documentation](./docs/api-docs.md) | ||
Samfundet4 is the latest and greatest iteration of samfundet.no. It's built using Django and React. | ||
|
||
|
||
## Documentation Overview | ||
|
||
> [!TIP] | ||
> If you're new, start by going through the [Introduction to Samfundet4](./docs/introduction.md) guide. | ||
## Installation | ||
### Frontend | ||
|
||
We have a script that handles all installation for you. To run the script, a Github Personal Access Token (PAT) is required. | ||
You can make one here https://github.com/settings/tokens/new. Tick scopes `repo`, `read:org` and `admin:public_key`), | ||
then store the token somewhere safe (Github will never show it again). | ||
- [Creating react components (conventions)](./docs/technical/frontend/components.md) | ||
- [Forms and schemas](./docs/technical/frontend/forms.md) | ||
- [*Deprecated: SamfForm*](./docs/technical/frontend/samfform.md) | ||
- [Cypress Setup Documentation](./docs/technical/frontend/cypress.md) | ||
- [Data fetching and State management](./docs/technical/frontend/data-fetching.md) | ||
|
||
Copy these commands (press button on the right-hand side of the block) | ||
and run from the directory you would clone the project. | ||
### Backend | ||
|
||
```sh | ||
# Interactive | ||
read -s -p "Github PAT token: " TOKEN ; X_INTERACTIVE=y /bin/bash -c "$(curl -fsSL https://$TOKEN@raw.githubusercontent.com/Samfundet/Samfundet4/master/{bash_utils.sh,install.sh})" && . ~/.bash_profile && cd Samfundet4; unset TOKEN; unset X_INTERACTIVE; | ||
``` | ||
- [🌐 API documentation](./docs/api-docs.md) | ||
- [Billig (payment system)](./docs/technical/backend/billig.md) | ||
- [Seed scripts](./docs/technical/backend/seed.md) | ||
- [Role system](./docs/technical/backend/rolesystem.md) | ||
|
||
### Other | ||
|
||
- [Automatic Interview Scheduling](./docs/intervew-scheduling.md) | ||
|
||
### Workflow | ||
|
||
<details> | ||
<summary>Non-interactive (show/hide)</summary> | ||
- [Work Methodology](./docs/work-methodology.md) | ||
- How to contribute to the project | ||
- [Useful Commands](./docs/useful-commands.md) | ||
- [Useful Docker aliases](./docs/docker-project-specific-commands.md) | ||
- [Common error messages](./docs/common-errors.md) | ||
|
||
```sh | ||
# Non-interactive | ||
read -s -p "Github PAT token: " TOKEN ; X_INTERACTIVE=n /bin/bash -c "$(curl -fsSL https://$TOKEN@raw.githubusercontent.com/Samfundet/Samfundet4/master/{bash_utils.sh,install.sh})" && . ~/.bash_profile && cd Samfundet4; unset TOKEN; unset X_INTERACTIVE; | ||
``` | ||
### Pipelines & Deployment | ||
|
||
<!-- | ||
cd ~/my-projects/test; rm -rf Samfundet4; read -s -p "Github PAT token: " TOKEN ; X_INTERACTIVE=y /bin/bash -c "$(curl -fsSL https://[email protected]/Samfundet/Samfundet4/master/{bash_utils.sh,install.sh})" && . ~/.bash_profile && cd Samfundet4; unset TOKEN; unset X_INTERACTIVE; | ||
--> | ||
</details> | ||
- [Pipeline (mypy, Biome, tsc, ...)](./docs/technical/pipeline.md) | ||
|
||
<details> | ||
<summary>Flags explained (show/hide)</summary> | ||
### Install | ||
|
||
> - X_INTERACTIVE (y/n): determines how many prompts you receive before performing an action. | ||
> curl: | ||
> - -f: fail fast | ||
> - -s: silent, no progress-meter | ||
> - -S: show error on fail | ||
> - -L: follow redirect | ||
- Linux: [Docker](./docs/install/linux-docker.md) – [Native](./docs/install/linux-native.md) | ||
- MacOS: [Docker](./docs/install/mac-docker.md) – [Native](./docs/install/mac-native.md) | ||
- Windows: [Docker](./docs/install/windows-docker.md) – [WSL](./docs/install/windows-wsl.md) | ||
- [Install script](./docs/install/install-script.md) | ||
- [Post-install instructions](./docs/install/post-install.md) | ||
|
||
</details> | ||
### Editor configuration | ||
|
||
<br> | ||
<br> | ||
<br> | ||
* [JetBrains (WebStorm, PyCharm, etc...)](./docs/editors/jetbrains.md) | ||
* [VS Code](./docs/editors/vscode.md) | ||
* [Vim/Neovim](./docs/editors/vim.md) | ||
* [Emacs](./docs/editors/emacs.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
backend/root/management/commands/seed_scripts/recruitment_sharedinterviewgroups.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from __future__ import annotations | ||
|
||
import random | ||
|
||
from root.utils.samfundet_random import words | ||
|
||
from samfundet.models.recruitment import Recruitment, RecruitmentPosition, RecruitmentPositionSharedInterviewGroup | ||
|
||
|
||
def seed(): | ||
yield 0, 'recruitment_positions_shared_interview' | ||
RecruitmentPositionSharedInterviewGroup.objects.all().delete() | ||
yield 0, 'Deleted old recruitmentpositionsharedgroup' | ||
|
||
recruitments = Recruitment.objects.all() | ||
created_count = 0 | ||
for recruitment in recruitments: | ||
for i in range(3): | ||
RecruitmentPositionSharedInterviewGroup.objects.create(recruitment=recruitment, name_nb=f'{words(2)} {i}', name_en=f'{words(2)} {i}') | ||
created_count += 1 | ||
shared_groups = list(RecruitmentPositionSharedInterviewGroup.objects.filter(recruitment=recruitment)) | ||
positions = random.sample(list(RecruitmentPosition.objects.filter(recruitment=recruitment)), 6) | ||
for pos in positions: | ||
pos.shared_interview_group = random.choice(shared_groups) | ||
pos.save() | ||
|
||
yield 100, f'Created {created_count} recruitment_position_shared_groups' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
backend/samfundet/migrations/0008_event_entrance_en_event_entrance_nb.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Generated by Django 5.1.1 on 2024-10-25 12:46 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('samfundet', '0007_alter_infobox_color_alter_infobox_image_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='event', | ||
name='entrance_en', | ||
field=models.CharField(blank=True, max_length=140, null=True), | ||
), | ||
migrations.AddField( | ||
model_name='event', | ||
name='entrance_nb', | ||
field=models.CharField(blank=True, max_length=140, null=True), | ||
), | ||
] |
32 changes: 32 additions & 0 deletions
32
...end/samfundet/migrations/0009_recruitmentpositionsharedinterviewgroup_name_en_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Generated by Django 5.1.1 on 2024-10-29 17:39 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("samfundet", "0008_event_entrance_en_event_entrance_nb"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="recruitmentpositionsharedinterviewgroup", | ||
name="name_en", | ||
field=models.CharField( | ||
default="hi", | ||
help_text="Name of the recruitmentgroup (EN)", | ||
max_length=100, | ||
), | ||
preserve_default=False, | ||
), | ||
migrations.AddField( | ||
model_name="recruitmentpositionsharedinterviewgroup", | ||
name="name_nb", | ||
field=models.CharField( | ||
default="hi", | ||
help_text="Name of the recruitmentgroup (NB)", | ||
max_length=100, | ||
), | ||
preserve_default=False, | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
backend/samfundet/migrations/0010_recruitment_promo_media.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 5.1.1 on 2024-10-31 19:56 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('samfundet', '0009_recruitmentpositionsharedinterviewgroup_name_en_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='recruitment', | ||
name='promo_media', | ||
field=models.CharField(blank=True, default=None, help_text='Youtube video id', max_length=11, null=True), | ||
), | ||
] |
33 changes: 33 additions & 0 deletions
33
backend/samfundet/migrations/0011_recruitmentposition_file_description_en_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Generated by Django 5.1.1 on 2024-12-07 12:20 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("samfundet", "0010_recruitment_promo_media"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="recruitmentposition", | ||
name="file_description_en", | ||
field=models.TextField( | ||
blank=True, help_text="Description of file needed (EN)", null=True | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="recruitmentposition", | ||
name="file_description_nb", | ||
field=models.TextField( | ||
blank=True, help_text="Description of file needed (NB)", null=True | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="recruitmentposition", | ||
name="has_file_upload", | ||
field=models.BooleanField( | ||
default=False, help_text="Does position have file upload" | ||
), | ||
), | ||
] |
Oops, something went wrong.