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

RDMO 2.0.0 #649

Merged
merged 602 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
602 commits
Select commit Hold shift + click to select a range
c06471c
Use function based components for containers
jochenklar May 30, 2023
66fb400
Check for circular descendants when using drag and drop
jochenklar May 30, 2023
5dbc07c
Fix panel height
jochenklar May 30, 2023
e146462
Fix management sidebar
jochenklar Jun 1, 2023
6d9646a
Fix select components
jochenklar Jun 1, 2023
640c5aa
Fix select/deselect all in import sidebar
jochenklar Jun 1, 2023
d597600
Fix Select component
jochenklar Jun 1, 2023
78650c2
Fix export links
jochenklar Jun 20, 2023
e976753
Refactor links in management
jochenklar Jun 20, 2023
7f1e8ab
Add EXPORT_CONTENT_DISPOSITION to settings
jochenklar Jun 22, 2023
d45e30b
Refactor xml export and allow for export of related items (#464)
jochenklar Jun 22, 2023
e3ce297
Prevent multiple export of the same element
jochenklar Jun 23, 2023
c7410cd
Add full export to management interface
jochenklar Jun 23, 2023
228c05d
Fix target_option export
jochenklar Jun 23, 2023
343e131
Merge pull request #592 from rdmorganiser/refactor_elements
jochenklar Jun 23, 2023
96e62d8
Merge branch 'dev-2.0.0' into feature/490-editor-permissions-multisite
jochenklar Jun 23, 2023
a1bb01c
Fix base_navigation.html
jochenklar Jun 23, 2023
9695820
Fix migrations and add editors to Page
jochenklar Jun 23, 2023
8149bfa
rename HasProjectQuestionPermission into HasProjectPagePermission
MyPyDavid Jun 26, 2023
f24b95e
add rules for page
MyPyDavid Jun 26, 2023
fe630e9
update test_rule can_view_management
MyPyDavid Jun 26, 2023
7115437
add read_only to options serializers
MyPyDavid Jun 26, 2023
63f1f59
add read_only to questions serializers
MyPyDavid Jun 26, 2023
b7c5ed7
remove redundant permission_classes from actions of element viewsets
MyPyDavid Jun 26, 2023
61334a8
remove redundant permission_classes from CopyModelMixin
MyPyDavid Jun 26, 2023
3106b9f
add editors to prefetch_related in questions viewsets
MyPyDavid Jun 26, 2023
076cad1
add editors and foo- elements to testing fixtures
MyPyDavid Jun 26, 2023
ad69824
fix tests in test_viewset_catalog_multisite
MyPyDavid Jun 26, 2023
1790bab
Add editors to edit components in management interface
jochenklar Jun 26, 2023
3c4bf57
Add editors to serializers
jochenklar Jun 27, 2023
a16c3e6
Add superuser check to base_navigation.html
jochenklar Jun 27, 2023
41e6fe6
Add read_only mode to management interface
jochenklar Jun 27, 2023
189452f
Fix fetch errors
jochenklar Jun 27, 2023
7e92401
Update admin interface
jochenklar Jun 27, 2023
78d081d
add testing fixtures for site bar.com
MyPyDavid Jun 27, 2023
6ce4b2b
fix and refactor tests for multisite
MyPyDavid Jun 27, 2023
a4dd7f6
fix test_detail_export
MyPyDavid Jun 28, 2023
f9438b7
fix failing tests, rename key with uri_path
MyPyDavid Jun 28, 2023
e01c33b
fix tests for tasks and views
MyPyDavid Jun 28, 2023
90e9725
fix tests for viewset page
MyPyDavid Jun 28, 2023
e99e74f
refactor string formatting in ReadOnlyObjectPermissionsSerializerMixin
MyPyDavid Jun 28, 2023
9feb620
fix test_viewset_question, remove nested
MyPyDavid Jun 28, 2023
c21bea5
refactor tests for multisite viewsets of elements
MyPyDavid Jun 28, 2023
3c53da5
Merge pull request #565 from rdmorganiser/feature/490-editor-permissi…
jochenklar Jun 29, 2023
f7a1dbd
Fix ProjectPageViewset
jochenklar Jun 29, 2023
8376f6f
Remove views, static directories and templates for the old management
jochenklar Jun 29, 2023
c0117f5
Refactor serializers
jochenklar Jun 29, 2023
ad7d4ae
rename mixin to ReadOnlyObjectPermissionSerializerMixin
MyPyDavid Jun 30, 2023
d2b6f6b
Fix management tests
jochenklar Jul 6, 2023
bed234f
Refactor permission check when importing
jochenklar Jul 6, 2023
2250856
Fix import message
jochenklar Jul 6, 2023
d0753a3
Fix management urls
jochenklar Jul 6, 2023
df9bcef
Fix attribute import
jochenklar Jul 6, 2023
073d0ed
add current site check for can_view_management
MyPyDavid Jul 10, 2023
5965528
refactor indentation imports methods
MyPyDavid Jul 11, 2023
051d78d
refactor indentation serializers methods
MyPyDavid Jul 11, 2023
99eb78d
refactor indentation questions validators
MyPyDavid Jul 11, 2023
d69b09e
fix refactor indentation core/imports
MyPyDavid Jul 11, 2023
22ed039
remove None checks from is_element_editor rules
MyPyDavid Jul 13, 2023
ba78069
refactor indentation append_element
MyPyDavid Jul 13, 2023
a5830be
fix tests for multisite, add all-element
MyPyDavid Jul 13, 2023
4c94713
fix imports check_perms, add instance for object perms
MyPyDavid Jul 13, 2023
9592c52
keep None check in is_element_editor for add obj perms
MyPyDavid Jul 13, 2023
f4e357e
tests add foo and bar catalog to json
MyPyDavid Jul 13, 2023
4b09f7d
tests move json_data to fixture and fix create_create
MyPyDavid Jul 13, 2023
b03e244
tests add tests for viewset_import_multisite
MyPyDavid Jul 13, 2023
627bc6e
add a filter for editors in management
MyPyDavid Jul 13, 2023
230e488
Add current site when copying elements
jochenklar Jul 22, 2023
21729ea
fix typo editors
MyPyDavid Jul 24, 2023
138ab57
add allLabel to FilterSite and rm FilterEditor
MyPyDavid Jul 24, 2023
942bf98
add editors to filter elements config
MyPyDavid Jul 24, 2023
b1a14e2
add filter for editor to element components
MyPyDavid Jul 24, 2023
dd7dd8a
Merge pull request #633 from rdmorganiser/dev-2.0.0-cleanup+managemen…
jochenklar Jul 27, 2023
ca96145
Fix typo
jochenklar Jul 27, 2023
b10ab45
Merge pull request #640 from rdmorganiser/dev-2.0.0-cleanup+add-site-…
jochenklar Jul 27, 2023
581c748
Improve can_view_management rule
jochenklar Jul 20, 2023
96af298
Add load command to new views
jochenklar Jul 20, 2023
773b372
Fix view template validation
jochenklar Jul 20, 2023
fd9553d
Refactor config and add show elements link
jochenklar Jul 24, 2023
7892436
Refactor management filtering
jochenklar Jul 27, 2023
2920eb4
Merge pull request #643 from rdmorganiser/dev-2.0.0-cleanup+refactor-…
jochenklar Jul 27, 2023
31d648d
Merge pull request #624 from rdmorganiser/dev-2.0.0-cleanup
jochenklar Jul 27, 2023
7f3bc3d
Add validation for widget_type, value_type and is_collection (#597)
jochenklar Jul 10, 2023
4e6d2e8
Fix propType
jochenklar Jul 27, 2023
271dc61
Merge branch 'master' into dev-2.0.0
jochenklar Aug 4, 2023
eb99b01
Fix test_view_project.py
jochenklar Aug 5, 2023
ec47b03
Fix fixtures
jochenklar Aug 5, 2023
2c5a8ad
Cleanup and update German translation
jochenklar Aug 5, 2023
e4a8da8
Cleanup other languages
jochenklar Aug 5, 2023
f738798
Refactor serializers, remove set_context
jochenklar Aug 8, 2023
d227777
Update Citation.cff
jochenklar Jul 27, 2023
c65e7d0
Merge pull request #650 from rdmorganiser/dev-2.0.0+update_citations
jochenklar Aug 8, 2023
303f7a3
Bump version to 2.0.0rc1
jochenklar Aug 11, 2023
935dda4
Update docs
jochenklar Aug 11, 2023
0e49651
Fix prev and next in interview
jochenklar Aug 18, 2023
6724e39
Merge pull request #668 from rdmorganiser/dev-2.0.0+refactor-serializers
jochenklar Aug 18, 2023
3d100bb
Fix catalog validation in projects api (#674)
jochenklar Aug 18, 2023
4aaa4da
Merge pull request #676 from rdmorganiser/fix_projects_api
jochenklar Aug 18, 2023
a7ca083
Fix new Shibboleth setup
jochenklar Aug 15, 2023
ef9d2b8
Update tests
jochenklar Aug 15, 2023
4deabf9
Add margin to login form
jochenklar Aug 15, 2023
777e4e1
Merge pull request #675 from rdmorganiser/dev-2.0.0+fix-next-prev
jochenklar Aug 18, 2023
71c6ad7
Merge pull request #673 from rdmorganiser/fix_shibboleth
jochenklar Aug 18, 2023
5746620
Add JSONExport for projects and refactor CSVExport
jochenklar Aug 11, 2023
750ca54
Merge pull request #672 from rdmorganiser/json_export
jochenklar Aug 18, 2023
ba223a1
Merge branch 'master' into dev-2.0.0
jochenklar Aug 18, 2023
f9b10ba
Remove catalogs.json
jochenklar Aug 18, 2023
63bb3da
Add setup.cfg and refactor setup
jochenklar Mar 9, 2023
d6e4044
add pre-commit-config
MyPyDavid Apr 17, 2023
e9b11aa
add flake8 config
MyPyDavid Apr 17, 2023
ce9f313
update flake8 config, exclude migrations and testing settings __init_…
MyPyDavid Apr 17, 2023
a2cbadf
add aiosmtpd to dev docs
MyPyDavid Apr 26, 2023
e215aee
chore: update pre-commit hooks
afuetterer Aug 7, 2023
1c533f1
style: fix indentation
afuetterer Aug 5, 2023
6901c0a
docs: add versions section to bug report template
afuetterer Aug 8, 2023
ebf5fb3
build!: add pyproject.toml
afuetterer Aug 4, 2023
bc4ca37
test: add project status test cases
afuetterer Aug 8, 2023
626068f
ci: add concurrency section to ci settings
afuetterer Aug 8, 2023
7cde043
ci: run postgres tests on ubuntu service
afuetterer Aug 8, 2023
de3dbdd
perf: files fixture
afuetterer Aug 8, 2023
f48c0a6
perf: enhance db testing performance
afuetterer Aug 8, 2023
09fa647
perf: user faster password hasher in test settings
afuetterer Aug 8, 2023
28fc936
perf: improve testing performance in base settings
afuetterer Aug 8, 2023
97a7736
perf: do not write pycache in ci
afuetterer Aug 8, 2023
0d5c34e
perf: do not write pytest cache in ci
afuetterer Aug 8, 2023
2c8040a
test: run test cases in random order
afuetterer Aug 8, 2023
331df28
perf: add reuse-db flag to pytest run in ci
afuetterer Aug 8, 2023
47b7b89
perf: run tests in parallel with pytest-xdist (ci)
afuetterer Aug 8, 2023
ed67fa8
build: add more dependency groups
afuetterer Aug 17, 2023
2698222
build: add black config to pyproject.toml
afuetterer Aug 17, 2023
715f686
build: add ruff pre-commit hook
afuetterer Aug 17, 2023
163d9d0
build: add ruff config to pyproject.toml
afuetterer Aug 17, 2023
ee199d5
chore: remove flake8 settings
afuetterer Aug 17, 2023
f03d70a
chore: update context section in bug report issue
afuetterer Aug 17, 2023
a9bed53
docs: update dev docs
afuetterer Aug 17, 2023
3fcd239
docs: update badges in readme
afuetterer Aug 17, 2023
de79b33
ci: use ubuntu 22.04 base image in ci
afuetterer Aug 17, 2023
bfe029a
ci: add lint job in ci
afuetterer Aug 17, 2023
ac977b0
ci: add dev-setup job in ci
afuetterer Aug 17, 2023
911a86f
ci: allow failure of lint step
afuetterer Aug 17, 2023
eac8c09
build: update pre-commit hooks
afuetterer Aug 17, 2023
8b2b318
chore: update pre-commit hook config
afuetterer Aug 18, 2023
7ea0e82
build: add ignore rules by ruff
afuetterer Aug 18, 2023
015e23b
build!: drop python 3.7 support
afuetterer Aug 18, 2023
6598db3
ci: add required-checks-pass job in ci
afuetterer Aug 18, 2023
116b981
chore: enable ruff pre-commit hook autofix
afuetterer Aug 18, 2023
f844804
chore: update ruff rules
afuetterer Aug 18, 2023
bec624c
chore: drop black and blacken-docs from pre-commit config
afuetterer Aug 18, 2023
059b572
docs: add icons to tree in dev docs
afuetterer Aug 18, 2023
003bec7
docs: add afuetterer to list of contributors
afuetterer Aug 18, 2023
77618ef
chore: add ref
afuetterer Aug 18, 2023
eba66bf
docs: update contributor guide
afuetterer Aug 18, 2023
90a0fd5
test: update compilemessages test case
afuetterer Aug 18, 2023
0e468d0
docs: add links to contributor guide
afuetterer Aug 18, 2023
0275a3a
Update users.json fixture
jochenklar Aug 18, 2023
c6ecd79
Remove docs dependency
jochenklar Aug 18, 2023
577431b
Fix conftest.py
jochenklar Aug 18, 2023
30caf5b
Remove test_compilemessages_is_already_up_to_date
jochenklar Aug 18, 2023
7f1a4fe
Update testing settings
jochenklar Aug 18, 2023
1b09630
Update pyproject.toml
jochenklar Aug 18, 2023
f9bf299
Update .pre-commit-config.yaml
jochenklar Aug 18, 2023
9590f99
Fix package data in pyproject.toml
jochenklar Aug 19, 2023
81135c8
Add is_legacy_reviewer rule
jochenklar Aug 22, 2023
233c6d5
Fix CITATION.cff
jochenklar Aug 22, 2023
e0a707d
chore: add pre-commit hook debug-statements
MyPyDavid Aug 24, 2023
5e1b87d
chore: clean up breakpoint from test_viewset_attribute_multisite
MyPyDavid Aug 24, 2023
c63078b
chore: rename test vars in accounts test_views
MyPyDavid Aug 25, 2023
e721a97
test: fix failing tests for accounts test_views
MyPyDavid Aug 25, 2023
5e71b7e
chore: rename test vars in core test_models
MyPyDavid Aug 25, 2023
31ba7d6
[fix] exclude "test_file.txt.py" from pytest files
MyPyDavid Aug 25, 2023
43ca413
test: add teardown to accounts test_views
MyPyDavid Aug 25, 2023
a68356b
Fix tests
jochenklar Aug 25, 2023
5313e50
Update .eslintrc.rc
jochenklar Aug 25, 2023
3c5d811
Use pytest-randomly not by default (but in CI), cleanup GitHub action…
jochenklar Aug 25, 2023
ed498ac
Remove sqlite3 tests
jochenklar Aug 26, 2023
53ca243
Merge pull request #586 from rdmorganiser/dev-setup-refactoring
jochenklar Aug 26, 2023
91be4c2
Fix end of interview and error pages
jochenklar Aug 25, 2023
5d47c6f
Fix ProjectWrapper
jochenklar Aug 25, 2023
783549d
Run end-of-file-fixer
jochenklar Aug 26, 2023
ceeabf6
Run trailing-whitespace
jochenklar Aug 26, 2023
1c7a053
Fix ruff errors
jochenklar Aug 26, 2023
3ef5e18
Update pre-commit config
jochenklar Aug 26, 2023
d9d376f
Update rdmo/questions/tests/test_model.py
jochenklar Aug 26, 2023
5764918
Restore test_xml.py
jochenklar Aug 26, 2023
46e69f0
Remove continue-on-error in GitHub actions linting step
jochenklar Aug 26, 2023
74aeefa
Fix pyproject.toml
jochenklar Aug 26, 2023
1eb34f8
Merge pull request #681 from rdmorganiser/dev-2.0.0+cleanup
jochenklar Aug 26, 2023
11030b9
Bump version to 2.0.0rc2
jochenklar Aug 26, 2023
c9b9560
Remove shibboleth from optional-dependencies
jochenklar Aug 28, 2023
5d0935b
chore: add github pull request template
afuetterer Sep 3, 2023
653f5c7
chore: fix typos
afuetterer Sep 7, 2023
8e40b01
chore: remove third-party jsonfield dependency
afuetterer Sep 7, 2023
a9c413f
chore: update ci jobs
afuetterer Sep 7, 2023
0184264
Update CHANGELOG.md
jochenklar Sep 8, 2023
74dc1ef
Update CHANGELOG.md
jochenklar Sep 8, 2023
30f91e5
chore: add npm section to dependabot configuration
afuetterer Aug 30, 2023
5a07164
Merge pull request #694 from afuetterer/codespell
jochenklar Sep 10, 2023
75016b7
Merge pull request #696 from afuetterer/ci-jobs
jochenklar Sep 10, 2023
0e54878
Fix CHANGELOG.md
jochenklar Sep 10, 2023
2880fa8
Merge pull request #697 from rdmorganiser/dev-2.0.0+changelog
jochenklar Sep 10, 2023
f155f07
Merge pull request #688 from afuetterer/680
jochenklar Sep 10, 2023
ca2ada3
Merge pull request #682 from afuetterer/dependabot
jochenklar Sep 10, 2023
07cbc77
Fix CHANGELOG.md
jochenklar Sep 10, 2023
6dad26a
Fix Catalog uri_path verbose_name
jochenklar Sep 10, 2023
22ead7d
ci: add python 3.12-dev test run in ci
afuetterer Sep 10, 2023
3d536c3
docs: update project urls
afuetterer Sep 11, 2023
528c0ac
Merge pull request #700 from afuetterer/python-312-dev
jochenklar Sep 11, 2023
eb2e9b9
Merge pull request #701 from afuetterer/project-urls
jochenklar Sep 11, 2023
d2b9578
Merge pull request #699 from rdmorganiser/fix_catalog_uri_path_verbos…
jochenklar Sep 12, 2023
96dda18
chore: add eslint pre-commit hook
afuetterer Sep 3, 2023
bcc198b
chore: remove unused import in webpack config
afuetterer Sep 11, 2023
6b06856
test: add test case to compare js versions in pre-commit and package.…
afuetterer Sep 12, 2023
0dc9c7d
chore: remove obsolete dependency pytest-dotenv
afuetterer Sep 13, 2023
9347cdc
Merge pull request #705 from afuetterer/remove-pytest-dotenv
jochenklar Sep 15, 2023
ccb9572
Merge pull request #706 from afuetterer/692-remove-jsonfield-dependency
jochenklar Sep 15, 2023
54c2f4c
Merge pull request #689 from afuetterer/eslint-pre-commit-hook
jochenklar Sep 15, 2023
f1098eb
chore: update python dependencies
afuetterer Sep 7, 2023
88bd260
chore: update django-allauth to 0.56
afuetterer Sep 7, 2023
92b19be
chore: update django version to 4.2
afuetterer Sep 7, 2023
4f1cc9e
chore: fix multiple RemovedInDjango50Warnings
afuetterer Sep 7, 2023
e3aa9e1
chore: fix DeleteViewCustomDeleteWarning
afuetterer Sep 7, 2023
443b639
chore: fix passing unsaved objects to related filters
afuetterer Sep 10, 2023
82347fb
chore: add filterwarnings to pytest configuration
afuetterer Sep 10, 2023
1729b8c
fix: move rdmo[allauth] from ci to dev
afuetterer Sep 14, 2023
bf004c6
Merge pull request #693 from afuetterer/442-update-dependencies
jochenklar Sep 16, 2023
ef50f7c
Fix editor field related_name
jochenklar Sep 18, 2023
ff7aa89
Update AUTHORS and CITATION.cff
jochenklar Sep 18, 2023
e9d124e
Reorder CITATION.cff
jochenklar Sep 18, 2023
f88088b
Merge pull request #709 from rdmorganiser/update_citations
jochenklar Sep 18, 2023
7c70717
Fix typo (#702)
jochenklar Sep 18, 2023
4d78359
chore: rename ci workflow file
afuetterer Sep 19, 2023
4ff1c90
ci: add paths filter for ci workflow
afuetterer Sep 19, 2023
6d88ae1
ci: add webpack-build job
afuetterer Sep 19, 2023
e2dec7a
docs: add compare urls to changelog
afuetterer Sep 19, 2023
acc131a
Add SITE_ID, DEBUG_TOOLBAR, ALLOWED_HOSTS, and BASE_URL to default se…
jochenklar Sep 14, 2023
4e65681
Add django-split-settings to dependencies
jochenklar Sep 15, 2023
2f10203
Merge pull request #710 from afuetterer/ci
jochenklar Sep 19, 2023
6f29a44
Merge pull request #707 from rdmorganiser/dev-2.0.0+update_settings
jochenklar Sep 19, 2023
4e58c96
Do not prefetch elements/catalog for index api endpoints
jochenklar Sep 19, 2023
3b9df84
chore: use major.minor.patch constraint for 0 major version dependencies
afuetterer Sep 19, 2023
cf77b17
build: remove memcached from optional-depencies
MyPyDavid Sep 20, 2023
659eccf
ci: remove memcached from optional-depencies
MyPyDavid Sep 20, 2023
b23b358
Remove django-debug-toolbar dependency and DEBUG_TOOLBAR and BASE_URL…
jochenklar Sep 21, 2023
9ebe8fb
Refactor testing settings (#690)
jochenklar Sep 21, 2023
f7b79c9
Remove docs (has been moved to the main documentation) and update CON…
jochenklar Sep 21, 2023
39eb94b
Prevent addition of new elements to non-saved elements in the managam…
jochenklar Sep 21, 2023
eb5140f
Update translations
jochenklar Sep 21, 2023
02d00b8
Merge pull request #711 from afuetterer/version-constraints
jochenklar Sep 21, 2023
1d69292
Merge pull request #712 from afuetterer/changelog
jochenklar Sep 21, 2023
db1b867
Update CHANGELOG.md
jochenklar Sep 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 0 additions & 11 deletions .coveragerc

This file was deleted.

48 changes: 48 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
module.exports = {
'globals': {
'gettext': true,
'ngettext': true,
'interpolate': true,
'process': true,
'require': true
},
'env': {
'browser': true,
'es2021': true,
'node': true
},
'extends': [
'eslint:recommended',
'plugin:react/recommended'
],
'overrides': [],
'parserOptions': {
'ecmaVersion': 'latest',
'sourceType': 'module'
},
'plugins': [
'react'
],
'ignorePatterns': ['**/static/**/*.js'],
'rules': {
'indent': 'off',
'no-empty-pattern': 'off',
'linebreak-style': [
'error',
'unix'
],
'quotes': [
'error',
'single'
],
'semi': [
'error',
'never'
]
},
'settings': {
'react': {
'version': 'detect'
}
}
}
6 changes: 5 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ A clear and concise description of what you expected to happen.
3. Scroll down to '....'
4. See error

### Context / Kontext

Please state your operating system, the RDMO version, and (if applicable) the browser the error occured in.

### References / Verweise

*
*
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ assignees: ''

A clear and concise description of what the problem is, followed by the solution you'd like.

### Affected
### Affected

Who is affected by the change (Users, Managers, Admins)?

Expand All @@ -25,4 +25,4 @@ What sort of related functionality would you like to see in addition?

### References / Verweise

*
*
45 changes: 45 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!--- Provide a general summary of your changes in the Title above --->

## Description
<!--- Describe your changes in detail --->

<!--- This project only accepts pull requests related to open issues --->
<!--- If suggesting a new feature or change, please discuss it in an issue first --->
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce --->
<!--- Please link to the issue here: --->
Related issue: #ISSUE_NUMBER

## Motivation and Context
<!--- Why is this change required? What problem does it solve? --->

## How has this been tested?
<!--- Please describe in detail how you tested your changes. --->
<!--- Include details of your testing environment, and the tests you ran to --->
<!--- see how your change affects other areas of the code, etc. --->

## Screenshots (if appropriate)

## Types of Changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] Documentation content changes
- [ ] Other (please describe):

## Checklist
<!--- Go over all the following points, and put an `x` in all the boxes that apply. --->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --->
- [ ] I have read the [contributor guide](https://github.com/rdmorganiser/rdmo/blob/master/CONTRIBUTING.md).
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.

<!--- This pull request template is adapted from:
<!--- "open-source-templates", https://github.com/TalAter/open-source-templates (MIT License). --->
<!--- "amazing-github-template", https://github.com/dec0dOS/amazing-github-template (MIT License). --->
28 changes: 24 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
version: 2
updates:
- package-ecosystem: pip
directory: "/"
directory: /
schedule:
interval: monthly
target-branch: master
open-pull-requests-limit: 10
target-branch: dependency-updates
labels:
- dependencies
- python
- type:maintenance
- package-ecosystem: github-actions
directory: "/"
directory: /
schedule:
interval: monthly
target-branch: master
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
177 changes: 177 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
name: CI

on:
push:
branches:
- master
pull_request:
# run CI only if files in these whitelisted paths are changed
paths:
- '.github/workflows/**'
- 'rdmo/**'
- 'testing/**'
- .pre-commit-config.yaml
- conftest.py
- package.json
- pyproject.toml

# Ref: https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
PYTHONDONTWRITEBYTECODE: 1
FORCE_COLOR: 1 # colored output by pytest etc.
CLICOLOR_FORCE: 1 # colored output by ruff

jobs:

lint:
name: Lint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: pip
- run: python -m pip install --upgrade pip setuptools wheel
- run: python -m pip install -e .[dev]
- name: Set up pre-commit cache
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: lint-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Run linters via pre-commit (ruff, eslint)
run: pre-commit run --all-files --color=always

test:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ['3.8', '3.11']
db-backend: [mysql, postgres]
# test Python 3.12 already using 3.12-dev
# release is scheduled for 2023-10-02 (https://peps.python.org/pep-0693/)
# when released: replace "python-version: ['3.8', '3.11']" with python-version: ['3.8', '3.12']
include:
- python-version: '3.12-dev'
db-backend: postgres

name: "Test (Python: ${{ matrix.python-version }}, DB: ${{ matrix.db-backend }})"
needs: lint
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install Dependencies
run: |
sudo apt update
sudo apt install --yes pandoc texlive-xetex
python -m pip install --upgrade pip setuptools wheel
pandoc --version
- name: Install rdmo[mysql] and start mysql
run: |
python -m pip install -e .[ci,mysql]
sudo systemctl start mysql.service
if: matrix.db-backend == 'mysql'
- name: Install rdmo[postgres] and start postgresql
run: |
python -m pip install -e .[ci,postgres]
sudo systemctl start postgresql.service
pg_isready
sudo -u postgres psql --command="CREATE USER postgres_user PASSWORD 'postgres_password' CREATEDB"
if: matrix.db-backend == 'postgres'
- name: Prepare Env
run: |
cp testing/config/settings/${{ matrix.db-backend }}.py testing/config/settings/local.py
cp -r testing/media testing/media_root
mkdir testing/log
- name: Run Tests
run: |
pytest -p randomly -p no:cacheprovider --cov --reuse-db --numprocesses=auto --dist=loadscope
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: '${{ matrix.db-backend }}: ${{ matrix.python-version }}'
COVERALLS_PARALLEL: true

coveralls:
name: Indicate completion to coveralls
needs: test
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Run Coveralls finish
run: |
python -m pip install coveralls
coveralls --service=github --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

dev-setup:
# Ref: structlog (MIT licensed) <https://github.com/hynek/structlog/blob/main/.github/workflows/ci.yml>
name: "Test dev setup on ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: pip
- run: python -Im pip install -e .[dev]
- run: python -Ic 'import rdmo; print(rdmo.__version__)'

optional-dependencies:
name: Test installation of optional-dependencies
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: pip
- name: Install os requirements for python-ldap
run: |
sudo apt update
sudo apt install --yes libldap2-dev libsasl2-dev
- run: python -m pip install --upgrade pip setuptools
- run: python -m pip install .[allauth,ci,dev,gunicorn,ldap,mysql,postgres,pytest]
- 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@v3
- 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:
- lint
- test
- coveralls
- dev-setup
- optional-dependencies
- webpack-build
runs-on: ubuntu-22.04
steps:
- uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
Loading