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

version v2.1.0 #9

Draft
wants to merge 65 commits into
base: rero
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
7304f18
global: add config option to make userprofiles read-only
max-moser May 10, 2021
bc4942c
setup: bump requirements
max-moser May 10, 2021
2cb88fe
tests: fix tests and modernize fixtures
max-moser May 11, 2021
1173044
release: v1.2.2
ntarocco May 17, 2021
f662b7b
i18n: adds german translations
mb-wali Jun 8, 2021
c0933ec
release: v1.2.3
zzacharo Jul 12, 2021
cbd6613
global: make ready for flask 2
max-moser Oct 8, 2021
f06fb33
release: v1.2.4
lnielsen Oct 18, 2021
c6ec0f9
forms: fix flask-login compatibility issue
lnielsen Apr 6, 2022
0326259
github: reduce test matrix size
lnielsen Apr 6, 2022
8cab89e
installation: refactor dependencies
lnielsen Apr 6, 2022
1d20071
tests: add min dependency constraints for tests
lnielsen Apr 6, 2022
c98e516
global: remove __future__ imports
lnielsen Apr 6, 2022
acfcc58
global: move from setup.py to setup.cfg
lnielsen Apr 6, 2022
3c16f3a
global: fix werkzeug compatibility
lnielsen Apr 6, 2022
fec620a
babel: fix extensions removed from jinja2 v3.x
lnielsen Apr 7, 2022
735896d
admin: remove admin interface
lnielsen Apr 20, 2022
915491a
templates: fix rendering for profile fields
lnielsen Apr 20, 2022
5f0bf5b
global: rely on accounts profile field
lnielsen Apr 20, 2022
0586c29
release: v2.0.0.dev1
lnielsen Apr 21, 2022
23c2bfe
views: add support for setting preferences
lnielsen Apr 21, 2022
b5dc576
release: v2.0.0.dev2
lnielsen Apr 21, 2022
e387d8f
tests: support email-validator 1.2.0 and reserved domains
Apr 25, 2022
145d227
views: mark user as changed on update
Apr 25, 2022
0997f0b
dependencies: bump invenio-accounts
Apr 26, 2022
69cbe38
release: v2.0.0.dev3
Apr 26, 2022
a6b1a0c
alembic: migrate data to invenio-accounts user table
rekt-hard May 3, 2022
6284670
alembic: add preferences to migration script
rekt-hard May 4, 2022
4fdb873
release: v2.0.0
lnielsen May 23, 2022
5c205a6
i18n: extract messages (#138)
mb-wali May 27, 2022
8a69383
i18n: add german translations (#140)
mb-wali Jun 3, 2022
d07241d
alembic: added migration dependency
alejandromumo Jun 8, 2022
97648d2
release: v2.0.1
slint Jun 10, 2022
407fc7f
Profile settings: style radio fields removing bullet points
Pineirin Jun 28, 2022
d05fbc8
release: v2.0.2
Jul 1, 2022
2cdf2e5
migrate to use black as opinionated auto formater
utnapischtim Jun 15, 2022
3d4880f
add .git-blame-ignore-revs
utnapischtim Jun 15, 2022
fa786db
fix docs compatibilty problem with Sphinx>=5.0.0
utnapischtim Jun 15, 2022
62ab985
move check_manifest configuration to setup.cfg.
utnapischtim Jun 15, 2022
5c8742f
increase minimal python version to 3.7
utnapischtim Jun 15, 2022
f760399
global: clean test infrastructure
utnapischtim Jun 15, 2022
a26ebae
fix remove documentation of file that no longer exists
utnapischtim Jun 28, 2022
0e19b01
fix sphinx warning of not found reference target
utnapischtim Jun 28, 2022
138d945
global: update git blame ignore
kpsherva Jul 7, 2022
af6e1d2
profile: don't let USERPROFILES_READ_ONLY disable preferences
fenekku Jul 5, 2022
c687484
profile: redirect when update successful
fenekku Jul 6, 2022
20639be
code-styling: adjust for black
fenekku Jul 7, 2022
c5b3c07
release: v2.0.3
kpsherva Jul 8, 2022
3da7c4d
i18n:pulled translations
rekt-hard Nov 8, 2022
3889b11
tests: add teardown handler
rekt-hard Nov 18, 2022
480ca65
release: v2.0.4
kpsherva Nov 21, 2022
407c81e
forms: add helper for preferences form
ntarocco Dec 13, 2022
400ac50
release: v2.0.5
zzacharo Dec 14, 2022
18f921c
ci: adds i18n workflow (#149)
mb-wali Feb 10, 2023
79227e4
migrate: flask_babelex replaced by invenio_i18n
utnapischtim Jan 11, 2023
ca99425
setup: allow newest pytest-invenio, pytest-black
utnapischtim Feb 8, 2023
1147ae2
setup: add invenio-i18n
utnapischtim Mar 1, 2023
e6fcc56
setup: constraint major version of invenio-i18n
kpsherva Mar 2, 2023
2dc790e
release: v2.1.0
kpsherva Mar 2, 2023
7330c33
translations: fix string format
anikachurilova Apr 11, 2023
e013318
preferences: add user preferences locale
TLGINO Mar 18, 2023
75c3708
release: v2.2.0
kpsherva Apr 25, 2023
4b000c7
profile: add SUI styling for locale preferences field
jennur May 5, 2023
9339a8c
release: v2.2.1
kpsherva May 26, 2023
28ba2f3
users: make user profiles read-only
lauren-d Oct 14, 2021
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
10 changes: 0 additions & 10 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,6 @@ insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8

# Python files
[*.py]
indent_size = 4
# isort plugin configuration
known_first_party = invenio_userprofiles
known_third_party = invenio_accounts, invenio_db, invenio_i18n
multi_line_output = 2
default_section = THIRDPARTY
skip = .eggs

# RST files (used by sphinx)
[*.rst]
indent_size = 4
Expand Down
1 change: 1 addition & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2cdf2e549aeff104070802f61680f23995b78c09
64 changes: 64 additions & 0 deletions .github/workflows/i18n-pull.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2022 Graz University of Technology.
#
# Invenio-userprofiles is free software; you can redistribute it and/or modify
# it under the terms of the MIT License; see LICENSE file for more details.

name: i18n:pull translations
on: workflow_dispatch # manually trigger

jobs:
i18n-pull:
runs-on: ubuntu-20.04
env:
PYTHON-VERSION: 3.9
steps:
- name: Checkout
uses: actions/checkout@v2

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

# install dependencies
- name: Install dependencies
run: |
pip install -e ".[all]"

# install transifex client
- name: transifex-client
run: |
pip install transifex-client

# store token
- name: store token
run: |
touch ~/.transifexrc
echo [https://www.transifex.com] >> ~/.transifexrc
echo api_hostname=https://api.transifex.com >> ~/.transifexrc
echo hostname=https://www.transifex.com >> ~/.transifexrc
echo password=${{ secrets.TRANSIFEX_TOKEN }} >> ~/.transifexrc
echo username=api >> ~/.transifexrc

# pull all lang
- name: pull translations
run: |
tx pull -a -f

# remove transifex credential file
- name: remove transifexrc file
uses: JesseTG/[email protected]
with:
path: ~/.transifexrc

- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
commit-message: i18n:pulled translations
title: i18n:pulled translations
body: i18n:pulled translations
branch: 101-translations-pull # name of branch which PR is created from
delete-branch: true # delete branch once merged,closed # allow from settings
69 changes: 69 additions & 0 deletions .github/workflows/i18n-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2022 Graz University of Technology.
#
# Invenio-userprofiles is free software; you can redistribute it and/or modify
# it under the terms of the MIT License; see LICENSE file for more details.

name: i18n:push translations
on: workflow_dispatch # manually trigger

jobs:
i18n-extract:
runs-on: ubuntu-20.04
env:
PYTHON-VERSION: 3.9
steps:
- name: Checkout
uses: actions/checkout@v2

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

# install dependencies
- name: Install dependencies
run: |
pip install -e ".[all]"

# install transifex client
- name: transifex-client
run: |
pip install transifex-client

# store token
- name: store token
run: |
touch ~/.transifexrc
echo [https://www.transifex.com] >> ~/.transifexrc
echo api_hostname=https://api.transifex.com >> ~/.transifexrc
echo hostname=https://www.transifex.com >> ~/.transifexrc
echo password=${{ secrets.TRANSIFEX_TOKEN }} >> ~/.transifexrc
echo username=api >> ~/.transifexrc

# extract
- name: extract_messages
run: |
python setup.py extract_messages

# push source
- name: push_messages
run: |
tx push -s

# remove transifex credential file
- name: remove transifexrc file
uses: JesseTG/[email protected]
with:
path: ~/.transifexrc

- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
commit-message: i18n:push translations
title: i18n:push translations
body: i18n:push translations
branch: 101-translations-push # name of branch which PR is created from
delete-branch: true # delete branch once merged,closed
2 changes: 1 addition & 1 deletion .github/workflows/pypi-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
pip install setuptools wheel babel
- name: Build package
# Remove `compile_catalog` if the package has no translations.
run: |
Expand Down
64 changes: 44 additions & 20 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2020 CERN.
# Copyright (C) 2022 Graz University of Technology.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.

name: CI

on:
Expand All @@ -20,39 +29,51 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
requirements-level: [min, pypi]
db-service: [postgresql9, postgresql11, mysql5, mysql8]
python-version: [3.7, 3.8, 3.9]
requirements-level: [pypi]
db-service: [postgresql10, postgresql14, mysql5, mysql8]

exclude:
- python-version: 3.7
requirements-level: pypi
db-service: postgresql14

- python-version: 3.7
requirements-level: pypi
db-service: mysql8

- python-version: 3.8
requirements-level: min
requirements-level: pypi
db-service: postgresql10

- db-service: postgresql11
python-version: 3.6
- python-version: 3.8
requirements-level: pypi
db-service: mysql5

- db-service: mysql8
python-version: 3.6
- python-version: 3.9
requirements-level: pypi
db-service: postgresql10

- python-version: 3.9
requirements-level: pypi
db-service: mysql5

include:
- db-service: postgresql9
DB: postgresql9
EXTRAS: "all,postgresql"
- db-service: postgresql10
DB: postgresql10

- db-service: postgresql11
DB: postgresql9
EXTRAS: "all,postgresql"
- db-service: postgresql14
DB: postgresql10

- db-service: mysql5
DB: mysql5
EXTRAS: "all,mysql"

- db-service: mysql8
DB: mysql8
EXTRAS: "all,mysql"

env:
DB: ${{ matrix.DB }}
EXTRAS: "tests"

steps:
- name: Checkout
Expand All @@ -65,8 +86,8 @@ jobs:

- name: Generate dependencies
run: |
python -m pip install --upgrade pip setuptools py wheel requirements-builder
requirements-builder -e ${{ matrix.EXTRAS }} ${{ matrix.requirements-file }} --level=${{ matrix.requirements-level }} setup.py > .${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt
pip install wheel requirements-builder
requirements-builder -e "$EXTRAS" ${{ matrix.requirements-file }} --level=${{ matrix.requirements-level }} setup.py > .${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt

- name: Cache pip
uses: actions/cache@v2
Expand All @@ -76,12 +97,15 @@ jobs:

- name: Install dependencies
run: |
pip install -r .${{matrix.requirements-level}}-${{ matrix.python-version }}-requirements.txt
pip install .[${{ matrix.EXTRAS }}]
pip install -r .${{matrix.requirements-level}}-${{ matrix.python-version }}-requirements.txt -c constraints-${{matrix.requirements-level}}.txt
pip install .[$EXTRAS]
pip freeze
docker --version
docker-compose --version

- name: Run translations test
run: ./run-i18n-tests.sh

- name: Run tests
run: |
./run-tests.sh
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ coverage.xml

# Translations
*.mo
*.pot

# Django stuff:
*.log
Expand All @@ -65,3 +64,6 @@ target/
# Example generated
examples/static/
examples/instance/

# VSCode
.vscode
2 changes: 2 additions & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ Contributors
- Sebastian Witowski
- Tibor Simko
- Vaibhav Gupta
- Mojib Wali
- Maximilian Moser
57 changes: 55 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,67 @@
..
This file is part of Invenio.
Copyright (C) 2015-2018 CERN.
Copyright (C) 2015-2022 CERN.

Invenio is free software; you can redistribute it and/or modify it
under the terms of the MIT License; see LICENSE file for more details.

Changes
=======

Version 1.2.0 (released 2020-12-17)
Version 2.2.1 (released 2023-05-26)

- fix styling for locale preferences field

Version 2.2.0 (released 2023-04-25)

- add locale to user profile preferences

Version 2.1.0 (released 2023-03-02)

- remove deprecated flask_babelex imports
- install invenio_i18n explicitly

Version 2.0.5 (released 2022-12-14)

- forms: add helper for preferences form

Version 2.0.4 (released 2022-11-21)

- add translations

Version 2.0.3 (released 2022-07-08)

- add redirection on user profile form submit
- allow updating preferences for read only profiles

Version 2.0.2 (released 2022-07-01)

- Style radio buttons and remove dotted bullet points in settings page.

Version 2.0.1 (released 2022-06-10)

- Fixes the Alembic recipe dependency for removing the userprofiles table.

Version 2.0.0 (released 2022-05-23)

- Changes the profile backend to use the new Invenio-Accounts 2.0 profile
field instead of a separate database table.

- Adds support for allowing users to change their visibility settings.

Version 1.2.4 (released 2021-10-18)

- Unpin Flask 2

Version 1.2.3 (released 2021-07-12)

- Adds german translations

Version 1.2.2 (released 2021-05-17)

- Add config option to make user profiles form read-only

Version 1.2.1 (released 2020-12-17)

- Add theme dependent icons.

Expand Down
3 changes: 2 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ recursive-include docs Makefile
recursive-include examples *.py *.sh *.html *.txt
recursive-include invenio_userprofiles *.html
recursive-include invenio_userprofiles *.mo
recursive-include invenio_userprofiles *.po *.pot
recursive-include invenio_userprofiles *.po *.pot *.mo
recursive-include invenio_userprofiles *.py
recursive-include tests *.py
include .git-blame-ignore-revs
1 change: 0 additions & 1 deletion babel.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ encoding = utf-8

[jinja2: **/templates/**.html]
encoding = utf-8
extensions = jinja2.ext.autoescape, jinja2.ext.with_

# Extraction from JavaScript files

Expand Down
1 change: 1 addition & 0 deletions constraints-pypi.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Empty on purpose
6 changes: 0 additions & 6 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ Extension
.. automodule:: invenio_userprofiles.ext
:members:

Admin
-----

.. automodule:: invenio_userprofiles.admin
:members:

API
---

Expand Down
Loading