Skip to content

Commit

Permalink
release: v2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kpsherva authored and rerowep committed Jun 1, 2023
1 parent 8a2dce3 commit e940fc3
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 17 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,6 @@ target/
# Example generated
examples/static/
examples/instance/

# VSCode
.vscode
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
Changes
=======

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
Expand Down
2 changes: 1 addition & 1 deletion invenio_userprofiles/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from .ext import InvenioUserProfiles
from .models import UserProfile, UserProfileProxy

__version__ = "2.0.5"
__version__ = "2.1.0"

__all__ = (
"__version__",
Expand Down
23 changes: 18 additions & 5 deletions invenio_userprofiles/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,24 @@
from flask_security.forms import email_validator, unique_user_email
from flask_wtf import FlaskForm
from invenio_i18n import lazy_gettext as _
from wtforms import BooleanField, FormField, RadioField, SelectField, \
StringField, SubmitField
from wtforms.fields.html5 import DateField
from wtforms.validators import DataRequired, EqualTo, Length, Optional, \
Regexp, StopValidation, ValidationError
from wtforms import (
BooleanField,
FormField,
RadioField,
SelectField,
StringField,
SubmitField,
)
from wtforms.fields import DateField
from wtforms.validators import (
DataRequired,
EqualTo,
Length,
Optional,
Regexp,
StopValidation,
ValidationError,
)
from wtforms_components import read_only

from .models import UserProfileProxy
Expand Down
2 changes: 2 additions & 0 deletions invenio_userprofiles/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
"""Database models for user profiles."""

from flask import current_app
from invenio_db import db
from sqlalchemy.ext.hybrid import hybrid_property


class AnonymousUserProfile:
Expand Down
1 change: 1 addition & 0 deletions invenio_userprofiles/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"""Validators for user profiles."""

from __future__ import absolute_import, print_function

import re

from invenio_i18n import lazy_gettext as _
Expand Down
21 changes: 11 additions & 10 deletions invenio_userprofiles/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,15 @@

from warnings import warn

from flask import Blueprint, current_app, flash, redirect, render_template, \
request, url_for
from flask import (
Blueprint,
current_app,
flash,
redirect,
render_template,
request,
url_for,
)
from flask_breadcrumbs import register_breadcrumb
from flask_login import current_user, login_required
from flask_menu import register_menu
Expand All @@ -23,12 +30,6 @@
from invenio_theme.proxies import current_theme_icons

from .api import current_userprofile
from .forms import EmailProfileForm, ProfileForm, VerificationForm, \
confirm_register_form_factory, register_form_factory
from .models import UserProfile, UserProfileProxy
from .signals import after_profile_update


from .forms import (
EmailProfileForm,
PreferencesForm,
Expand All @@ -37,8 +38,8 @@
confirm_register_form_factory,
register_form_factory,
)
from .models import UserProfileProxy
>>>>>>> 2cdf2e5 (migrate to use black as opinionated auto formater)
from .models import UserProfile, UserProfileProxy
from .signals import after_profile_update

blueprint = Blueprint(
"invenio_userprofiles",
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,5 @@ ignore =
*-requirements.txt

[tool:pytest]
addopts = --black --isort --pydocstyle --doctest-glob="*.rst" --doctest-modules --cov=invenio_userprofiles --cov-report=term-missing
addopts =--isort --pydocstyle --doctest-glob="*.rst" --doctest-modules --cov=invenio_userprofiles --cov-report=term-missing
testpaths = tests invenio_userprofiles

0 comments on commit e940fc3

Please sign in to comment.