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

Dependency updates #143

Closed
wants to merge 50 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
6001430
refactor: use admin.register decorator
afuetterer Sep 28, 2023
345afd9
build: pin django-mptt dependency
afuetterer Oct 16, 2023
e710708
fix: update verbose_name_plural in questionset
afuetterer Nov 7, 2023
c7f625a
fix #791 for openid_connect providers and refactor keycloak snippet
MyPyDavid Oct 24, 2023
5c469a1
Add custom {more} markdown tag (#595)
jochenklar Oct 6, 2023
480ae0e
Adjust details/summary style
jochenklar Oct 6, 2023
983e7d4
Add ValueConflictValidator and check for conflicts when storing values
jochenklar Oct 30, 2023
ef5cd99
Autosave after eraseValue and removeValue
jochenklar Oct 30, 2023
dd7e415
Add tests for ValueConflictValidator
jochenklar Oct 31, 2023
6b07b40
Fix human2bytes utils function
jochenklar Oct 31, 2023
a5c916f
chore: refactor human2bytes utils func
MyPyDavid Oct 31, 2023
e31c155
Fix ValueQuotaValidator and add tests
jochenklar Oct 31, 2023
6cc0dbd
Update HUMAN2BYTES_MAPPER and add test
jochenklar Oct 31, 2023
41c92fa
Refactor progress bar and take sets and conditions into account (#596)
jochenklar Aug 22, 2023
e8bb565
Check is_optional for progress bar (again)
jochenklar Aug 22, 2023
39965a2
Add progress_count and progress_total to Project model, compute on POST
jochenklar Aug 24, 2023
e1e2fc5
Add navigation action to ProjectViewSet and refactor navigation (#299…
jochenklar Aug 24, 2023
fa2922d
Always show count in progress bar
jochenklar Sep 26, 2023
5de01de
Fix progress bar for questionsets
jochenklar Sep 26, 2023
2204884
Fix progress computation
jochenklar Sep 28, 2023
d6c9d17
Fix progress permissions
jochenklar Sep 28, 2023
0b2dd52
Add tests for progress and navigation
jochenklar Sep 28, 2023
c51b4f1
Add progress to project hierarchy (#488)
jochenklar Oct 8, 2023
2c2afef
chore: refactor values query to managers
MyPyDavid Nov 15, 2023
ade14af
Use "count of total" for the progress in projects table
jochenklar Nov 16, 2023
9ca8cb0
Add support for BASE_URL to the management react interface (#815)
jochenklar Nov 10, 2023
bbccddf
Rename variable
jochenklar Nov 16, 2023
f8c4a00
Merge pull request #821 from rdmorganiser/fix_management_interface
jochenklar Nov 16, 2023
0485fe9
Merge pull request #679 from rdmorganiser/refactor_progressbar
jochenklar Nov 16, 2023
6f0b734
Refresh navigation after auto-save in interview
jochenklar Nov 19, 2023
c998f9e
chore: add pytest-playwright dependency
afuetterer Oct 31, 2023
9b71c8d
chore: add custom pytest marker for e2e tests
afuetterer Oct 31, 2023
44c163e
chore: enable debug mode per env, default false
afuetterer Oct 31, 2023
cf198bd
refactor: add "fixtures" fixture to reuse in e2e tests
afuetterer Oct 31, 2023
9e94f17
test: add frontend-tests with pytest-playwright
afuetterer Oct 31, 2023
28197f1
ci: run e2e tests in ci
afuetterer Nov 2, 2023
874b917
Merge pull request #769 from afuetterer/715-frontend-tests
afuetterer Nov 19, 2023
749b764
chore: update ruff repo name in pre-commit config
afuetterer Nov 3, 2023
25276fa
build: update pre-commit hooks
github-actions[bot] Nov 14, 2023
9b73bcb
chore: fix ruff errors (PGH002, UP032)
afuetterer Nov 15, 2023
585149a
ci: add dependency groups to dependabot config
afuetterer Nov 19, 2023
421f084
ci: update dependabot js groups
afuetterer Nov 23, 2023
e76ef41
build(deps-dev): bump the babel group with 5 updates
dependabot[bot] Nov 23, 2023
4383038
build(deps): bump the react group with 3 updates
dependabot[bot] Nov 23, 2023
4bd896f
build(deps): bump the redux group with 1 update
dependabot[bot] Nov 23, 2023
1522643
build(deps-dev): bump the webpack group with 4 updates
dependabot[bot] Nov 23, 2023
e5505c8
build(deps-dev): bump the eslint group with 2 updates
dependabot[bot] Nov 23, 2023
102eadc
chore: bump eslint versions in pre-commit config
afuetterer Nov 23, 2023
e6d909e
build(deps-dev): bump the dev-dependencies group with 4 updates
dependabot[bot] Nov 23, 2023
158ec73
build(deps): bump the prod-dependencies group with 5 updates
dependabot[bot] Nov 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ module.exports = {
'react': {
'version': 'detect'
}
}
},
}
106 changes: 76 additions & 30 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,78 @@
version: 2
updates:
- package-ecosystem: pip
directory: /
schedule:
interval: monthly
open-pull-requests-limit: 10
target-branch: dependency-updates
labels:
- dependencies
- python
- type:maintenance
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
open-pull-requests-limit: 10
target-branch: dependency-updates
labels:
- dependencies
- github_actions
- type:maintenance
- package-ecosystem: npm
directory: /
schedule:
interval: monthly
open-pull-requests-limit: 10
target-branch: dependency-updates
labels:
- dependencies
- javascript
- type:maintenance
- package-ecosystem: pip
directory: /
schedule:
interval: monthly
open-pull-requests-limit: 10
target-branch: dependency-updates
labels:
- dependencies
- python
- type:maintenance
ignore:
- dependency-name: django-mptt # pinned, 0.15 requires Python >= 3.9
groups:
# create a single pull request containing all updates for the optional dependencies
optional:
patterns:
- coveralls
- django-allauth
- django-auth-ldap
- gunicorn
- mysqlclient
- pre-commit
- psycopg*
- pytest*
# create a single pull request containing all updates for django related dependencies
django:
patterns:
- django*
- drf*
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
open-pull-requests-limit: 10
target-branch: dependency-updates
labels:
- dependencies
- github_actions
- type:maintenance
groups:
# create a single pull request containing all updates for GitHub Actions
github-actions:
patterns:
- '*'
- package-ecosystem: npm
directory: /
schedule:
interval: monthly
open-pull-requests-limit: 10
target-branch: dependency-updates
labels:
- dependencies
- javascript
- type:maintenance
groups:
react:
patterns:
- react*
redux:
patterns:
- redux*
babel:
patterns:
- '@babel*'
- babel*
webpack:
patterns:
- webpack*
- copy-webpack-plugin
eslint:
patterns:
- eslint*
prod-dependencies:
dependency-type: production
dev-dependencies:
dependency-type: development
39 changes: 24 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,30 @@ jobs:
GITHUB_DB_BACKEND: ${{ matrix.db-backend }}
COVERALLS_FLAG_NAME: '${{ matrix.db-backend }}: ${{ matrix.python-version }}'
COVERALLS_PARALLEL: true
# end-to-end tests
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
if: matrix.python-version == '3.12' && matrix.db-backend == 'postgres'
- name: Cache Playwright browsers
uses: actions/cache@v3
with:
path: ~/.cache/ms-playwright/
key: playwright-browsers
if: matrix.python-version == '3.12' && matrix.db-backend == 'postgres'
- name: Install e2e tests dependencies
run: |
npm install
npm run build:prod
playwright install chromium
if: matrix.python-version == '3.12' && matrix.db-backend == 'postgres'
- name: Run end-to-end tests
run: pytest -p randomly -p no:cacheprovider --reuse-db --numprocesses=auto --dist=loadscope -m e2e --nomigrations
if: matrix.python-version == '3.12' && matrix.db-backend == 'postgres'
env:
DJANGO_DEBUG: True
GITHUB_DB_BACKEND: ${{ matrix.db-backend }}

coveralls:
name: Indicate completion to coveralls
Expand Down Expand Up @@ -140,20 +164,6 @@ jobs:
- run: python -m pip freeze
- run: python -m pip list --outdated

webpack-build:
name: Test webpack-build
needs: lint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- run: npm install --dev
- run: npm run build
- run: npm run build:prod

required-checks-pass:
if: always()
needs:
Expand All @@ -162,7 +172,6 @@ jobs:
- coveralls
- dev-setup
- optional-dependencies
- webpack-build
runs-on: ubuntu-22.04
steps:
- uses: re-actors/alls-green@release/v1
Expand Down
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:
hooks:
- id: check-hooks-apply
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-ast
- id: check-json
Expand All @@ -21,17 +21,17 @@ repos:
- id: trailing-whitespace
exclude: \.dot$
- id: debug-statements
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.291
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.6
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.50.0
rev: v8.54.0
hooks:
- id: eslint
args: [--fix, --color]
additional_dependencies:
- eslint@8.41.0
- eslint-plugin-react@7.32.2
- eslint@8.54.0
- eslint-plugin-react@7.33.2
- [email protected]
49 changes: 25 additions & 24 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,33 @@
from rdmo.accounts.utils import set_group_permissions


@pytest.fixture(scope="session")
def fixtures():
allowed_file_stems = {
'accounts',
'conditions',
'domain',
'groups',
'options',
'overlays',
'projects',
'questions',
'sites',
'tasks',
'users',
'views'
}
fixtures = []
for fixture_dir in settings.FIXTURE_DIRS:
filenames = [filename for filename in Path(fixture_dir).iterdir() if filename.stem in allowed_file_stems]
fixtures.extend(filenames)
return fixtures


@pytest.fixture(scope='session')
def django_db_setup(django_db_setup, django_db_blocker):
def django_db_setup(django_db_setup, django_db_blocker, fixtures):
"""Populate database with test data from fixtures directories."""
with django_db_blocker.unblock():
fixtures = []
for fixture_dir in settings.FIXTURE_DIRS:
for file in Path(fixture_dir).iterdir():
if file.stem in [
'accounts',
'conditions',
'domain',
'groups',
'options',
'overlays',
'projects',
'questions',
'sites',
'tasks',
'users',
'views'
]:
fixtures.append(file)

call_command('loaddata', *fixtures)
set_group_permissions()

Expand All @@ -49,7 +53,4 @@ def files(settings, tmp_path):
@pytest.fixture
def json_data():
json_file = Path(settings.BASE_DIR) / 'import' / 'catalogs.json'
json_data = {
'elements': json.loads(json_file.read_text())
}
return json_data
return {'elements': json.loads(json_file.read_text())}
Loading
Loading