Skip to content

Commit

Permalink
Merge branch 'main' into feature/remove-template-fields
Browse files Browse the repository at this point in the history
  • Loading branch information
reiterl committed Aug 7, 2023
2 parents 4e46350 + 3496fdf commit 95d52ad
Show file tree
Hide file tree
Showing 45 changed files with 444 additions and 214 deletions.
8 changes: 4 additions & 4 deletions .github/docker-compose/docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
- DATASTORE_READER_PORT=9010
- DATASTORE_WRITER_HOST=datastore-writer
- DATASTORE_WRITER_PORT=9011
- DATASTORE_DATABASE_HOST=postgres
- DATABASE_HOST=postgres
depends_on:
- datastore-writer
- datastore-reader
Expand All @@ -28,7 +28,7 @@ services:
- DATASTORE_READER_PORT=9010
- DATASTORE_WRITER_HOST=datastore-writer
- DATASTORE_WRITER_PORT=9011
- DATASTORE_DATABASE_HOST=postgres
- DATABASE_HOST=postgres
depends_on:
- datastore-writer
- datastore-reader
Expand All @@ -42,7 +42,7 @@ services:
PORT: "9010"
image: openslides-datastore-reader
environment:
- DATASTORE_DATABASE_HOST=postgres
- DATABASE_HOST=postgres
ports:
- "9010:9010"
depends_on:
Expand All @@ -57,7 +57,7 @@ services:
PORT: "9011"
image: openslides-datastore-writer
environment:
- DATASTORE_DATABASE_HOST=postgres
- DATABASE_HOST=postgres
ports:
- "9011:9011"
depends_on:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
working-directory: .github/docker-compose

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Create secrets for datastore
run: mkdir secrets && echo -n "openslides" > secrets/postgres_password
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
name: Build and test development docker image with Docker Compose
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Run tests
run: dev/run-tests.sh
Expand All @@ -55,10 +55,10 @@ jobs:
name: Check coding style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}

Expand Down Expand Up @@ -88,10 +88,10 @@ jobs:
PYTHONPATH: .

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-issue-for-file-updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
if: github.repository_owner == 'OpenSlides'
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/project-automation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Project automation
on:
workflow_call:
inputs:
resource_node_id:
required: true
type: string
status_value:
required: true
type: string
secrets:
AUTOMATION_APP_ID:
required: true
AUTOMATION_APP_INSTALLATION_ID:
required: true
AUTOMATION_APP_PRIVATE_KEY:
required: true

jobs:
workflow_call:
name: Set status
runs-on: ubuntu-latest
steps:
- uses: leonsteinhaeuser/[email protected]
with:
gh_app_ID: ${{ secrets.AUTOMATION_APP_ID }}
gh_app_installation_ID: ${{ secrets.AUTOMATION_APP_INSTALLATION_ID }}
gh_app_secret_key: ${{ secrets.AUTOMATION_APP_PRIVATE_KEY }}
organization: OpenSlides
project_id: 2
resource_node_id: ${{ inputs.resource_node_id }}
status_value: ${{ inputs.status_value }}
14 changes: 14 additions & 0 deletions .github/workflows/project-issue-closed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Project automation
on:
issues:
types:
- closed

jobs:
issue_closed:
name: Issue closed
uses: ./.github/workflows/project-automation.yml
secrets: inherit
with:
resource_node_id: ${{ github.event.issue.node_id }}
status_value: "Done"
15 changes: 15 additions & 0 deletions .github/workflows/project-issue-opened.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Project automation
on:
issues:
types:
- opened
- reopened

jobs:
issue_opened:
name: Issue opened
uses: ./.github/workflows/project-automation.yml
secrets: inherit
with:
resource_node_id: ${{ github.event.issue.node_id }}
status_value: "Backlog"
14 changes: 14 additions & 0 deletions .github/workflows/project-pull-request-closed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Project automation
on:
pull_request_target:
types:
- closed

jobs:
pull_request_closed:
name: Pull request closed
uses: ./.github/workflows/project-automation.yml
secrets: inherit
with:
resource_node_id: ${{ github.event.pull_request.node_id }}
status_value: "Done"
15 changes: 15 additions & 0 deletions .github/workflows/project-pull-request-opened.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Project automation
on:
pull_request_target:
types:
- opened
- reopened

jobs:
pull_request_opened:
name: Pull request opened
uses: ./.github/workflows/project-automation.yml
secrets: inherit
with:
resource_node_id: ${{ github.event.pull_request.node_id }}
status_value: "Work in progress"
14 changes: 14 additions & 0 deletions .github/workflows/project-pull-request-review-requested.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Project automation
on:
pull_request_target:
types:
- review_requested

jobs:
pull_request_review_requested:
name: Pull request review requested
uses: ./.github/workflows/project-automation.yml
secrets: inherit
with:
resource_node_id: ${{ github.event.pull_request.node_id }}
status_value: "Review in progress"
23 changes: 0 additions & 23 deletions .github/workflows/set-project.yml

This file was deleted.

4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ test-unit-integration:
check-all: validate-models-yml check-models check-initial-data-json check-example-data-json check-permissions

validate-models-yml:
python cli/modelsvalidator/validate.py
python cli/validate.py

generate-models:
python cli/generate_models.py $(MODELS_PATH)
Expand All @@ -55,7 +55,7 @@ run-debug:
OPENSLIDES_DEVELOPMENT=1 python -m openslides_backend

pip-check:
pip-check
pip-check -H

coverage:
pytest --cov --cov-report html
Expand Down
1 change: 0 additions & 1 deletion cli/modelsvalidator/requirements.txt

This file was deleted.

6 changes: 0 additions & 6 deletions cli/modelsvalidator/setup.cfg

This file was deleted.

File renamed without changes.
7 changes: 3 additions & 4 deletions dev/dc.local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ services:
- "5679:5678"
environment:
- OPENSLIDES_DEVELOPMENT=1
- DATASTORE_ENABLE_DEV_ENVIRONMENT=1
- DATASTORE_DATABASE_NAME=openslides
- DATASTORE_DATABASE_USER=openslides
- DATASTORE_DATABASE_HOST=postgres
- DATABASE_NAME=openslides
- DATABASE_USER=openslides
- DATABASE_HOST=postgres
- MESSAGE_BUS_HOST=redis
volumes:
- ../../openslides-datastore-service/datastore:/app/datastore
Expand Down
19 changes: 8 additions & 11 deletions dev/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ services:
- DATASTORE_WRITER_PORT=9011
- AUTH_HOST=auth
- MESSAGE_BUS_HOST=redis
- DATASTORE_DATABASE_HOST=postgres
- DATABASE_HOST=postgres
- DATASTORE_LOG_LEVEL=CRITICAL
depends_on:
- datastore-writer
Expand All @@ -44,7 +44,7 @@ services:
- "9010:9010"
environment:
- OPENSLIDES_DEVELOPMENT=1
- DATASTORE_DATABASE_HOST=postgres
- DATABASE_HOST=postgres
depends_on:
- postgres
networks:
Expand All @@ -61,7 +61,7 @@ services:
- "9011:9011"
environment:
- OPENSLIDES_DEVELOPMENT=1
- DATASTORE_DATABASE_HOST=postgres
- DATABASE_HOST=postgres
depends_on:
- postgres
- redis
Expand Down Expand Up @@ -101,16 +101,13 @@ services:
- "9013:9013"
environment:
- OPENSLIDES_DEVELOPMENT=1
- VOTE_HOST=vote
- DATASTORE_READER_HOST=datastore-reader
- MESSAGING=redis
- MESSAGE_BUS_HOST=redis
- VOTE_REDIS_HOST=redis
- VOTE_DATABASE_HOST=postgres
- VOTE_DATABASE_USER=openslides
- VOTE_DATABASE_NAME=openslides
- DATASTORE_DATABASE_HOST=postgres
- DATASTORE_READER_HOST=datastore-reader
- AUTH_HOST=auth
- DATABASE_HOST=postgres
- VOTE_DATABASE_HOST=postgres
- MESSAGE_BUS_HOST=redis
- CACHE_HOST=redis
depends_on:
- datastore-reader
- redis
Expand Down
1 change: 1 addition & 0 deletions global/data/example-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@
"list_of_speakers_show_first_contribution": false,
"list_of_speakers_enable_point_of_order_speakers": true,
"list_of_speakers_enable_point_of_order_categories": false,
"list_of_speakers_closing_disables_point_of_order": false,
"list_of_speakers_enable_pro_contra_speech": false,
"list_of_speakers_can_set_contribution_self": false,
"list_of_speakers_speaker_note_for_everyone": true,
Expand Down
10 changes: 4 additions & 6 deletions global/meta/models.yml
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,10 @@ meeting:
type: boolean
default: False
restriction_mode: B
list_of_speakers_closing_disables_point_of_order:
type: boolean
default: False
restriction_mode: B
list_of_speakers_enable_pro_contra_speech:
type: boolean
default: False
Expand Down Expand Up @@ -1910,7 +1914,6 @@ tag:
- agenda_item
- assignment
- motion
- topic
field: tag_ids
equal_fields: meeting_id
restriction_mode: A
Expand Down Expand Up @@ -2165,11 +2168,6 @@ topic:
on_delete: CASCADE
equal_fields: meeting_id
restriction_mode: A
tag_ids:
type: relation-list
to: tag/tagged_ids
equal_fields: meeting_id
restriction_mode: A
poll_ids:
type: relation-list
to: poll/content_object_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from ....models.models import AgendaItem
from ....shared.patterns import fqid_from_collection_and_id
from ....shared.schema import optional_id_schema
from ....shared.schema import id_list_schema, optional_id_schema
from ...action import Action

AGENDA_PREFIX = "agenda_"
Expand Down Expand Up @@ -38,6 +38,10 @@
"description": "The weight of the agenda item.",
"type": "integer",
},
f"{AGENDA_PREFIX}tag_ids": {
"description": "The ids of tags to be set.",
**id_list_schema,
},
}


Expand Down
1 change: 1 addition & 0 deletions openslides_backend/action/actions/agenda_item/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class AgendaItemCreate(CreateActionWithInferredMeeting):
"parent_id",
"duration",
"weight",
"tag_ids",
],
)
permission = Permissions.AgendaItem.CAN_MANAGE
Expand Down
1 change: 1 addition & 0 deletions openslides_backend/action/actions/meeting/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"list_of_speakers_show_first_contribution",
"list_of_speakers_enable_point_of_order_speakers",
"list_of_speakers_enable_point_of_order_categories",
"list_of_speakers_closing_disables_point_of_order",
"list_of_speakers_enable_pro_contra_speech",
"list_of_speakers_can_set_contribution_self",
"list_of_speakers_speaker_note_for_everyone",
Expand Down
Loading

0 comments on commit 95d52ad

Please sign in to comment.