Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stats: Number of unit admins #1419

Merged
merged 11 commits into from
May 30, 2023
Merged

Stats: Number of unit admins #1419

merged 11 commits into from
May 30, 2023

Conversation

i-oden
Copy link
Member

@i-oden i-oden commented May 29, 2023

Before submitting this PR

  1. Description: Save number of unit admins to database, in the Reporting table.
  2. Jira task / GitHub issue: DDS-1551
  3. How to test:
    1. In the dds_web container, run flask db upgrade and flask db downgrade to verify the migrations.
    2. After one flask db downgrade, add a row manually to the Reporting table, and then run flask db upgrade. There should be no errors.
  4. Type of change: Check the relevant boxes in the section below
  5. Add docstrings and comments to code, even if you personally think it's obvious.

What type of change(s) does the PR contain?

  • New feature
    • Breaking: Please describe the reason for the break and how we can fix it.
    • Non-breaking
  • Database change
    • Migration included in PR
    • Migration not needed
  • Bug fix
    • Breaking: Please describe the reason for the break and how we can fix it.
    • Non-breaking
  • Security Alert fix
  • Documentation
  • Tests (only)
  • Workflow

Checklist

  • Sprintlog
    • Added
    • Not needed (E.g. PR contains only tests)
  • Rebase / Update / Merge from base branch (the branch from which the current is forked)
    • Done
    • Not needed
  • Blocking PRs
    • Merged
    • No blocking PRs
  • PR to master branch

Actions / Scans

  • Black: Python code formatter. Does not execute. Only tests.
    Run black . locally to execute formatting.
    • Passed
  • Prettier: General code formatter. Our use case: MD and yaml mainly.
    Run npx prettier --write . locally to execute formatting.
    • Passed
  • Yamllint: Linting of yaml files.
    • Passed
  • Tests: Pytest to verify that functionality works as expected.
    • New tests added
    • No new tests
    • Passed
  • CodeQL: Scan for security vulnerabilities, bugs, errors
    • New alerts: Go through them and either fix, dismiss och ignore. Add reasoning in items below.
    • Alerts fixed: What?
    • Alerts ignored / dismissed: Why?
    • Passed
  • Trivy: Security scanner
    • New alerts: Go through them and either fix, dismiss och ignore. Add reasoning in items below.
    • Alerts fixed: What?
    • Alerts ignored / dismissed: Why?
    • Passed
  • Snyk: Security scanner
    • New alerts: Go through them and either fix, dismiss och ignore. Add reasoning in items below.
    • Alerts fixed: What?
    • Alerts ignored / dismissed: Why?
    • Passed

@i-oden i-oden changed the title Stats: number of unit admins Stats: Number of unit admins May 29, 2023
@i-oden i-oden self-assigned this May 29, 2023
@i-oden i-oden mentioned this pull request May 29, 2023
40 tasks
@i-oden i-oden marked this pull request as ready for review May 29, 2023 09:51
@i-oden i-oden requested a review from valyo May 29, 2023 09:51
@i-oden i-oden marked this pull request as draft May 29, 2023 10:20
dds_web/database/models.py Outdated Show resolved Hide resolved
@i-oden i-oden removed the request for review from valyo May 29, 2023 11:36
@i-oden i-oden marked this pull request as ready for review May 29, 2023 13:01
@i-oden i-oden requested a review from valyo May 29, 2023 13:01
@i-oden
Copy link
Member Author

i-oden commented May 30, 2023

@valyo This one is ready now, tests are fixed

@valyo
Copy link
Member

valyo commented May 30, 2023

Everything seems fine but following "Hot to test" doesn't behave as expected (or I am not doing it corretly)

@i-oden
Copy link
Member Author

i-oden commented May 30, 2023

Everything seems fine but following "Hot to test" doesn't behave as expected (or I am not doing it corretly)

How does it behave?

@valyo
Copy link
Member

valyo commented May 30, 2023

Actually it does

@i-oden i-oden merged commit 0a44a39 into dev May 30, 2023
@i-oden i-oden deleted the DDS-1551-stats-number-of-unit-admins branch May 30, 2023 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants