Skip to content

Commit

Permalink
Adapt user.py
Browse files Browse the repository at this point in the history
  • Loading branch information
aversey committed Jul 26, 2024
1 parent 1b5a334 commit fc44667
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
9 changes: 6 additions & 3 deletions python/hopsworks_common/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

from __future__ import annotations

import json

import humps
from hsfs import util
from hopsworks_common import util


class User:
Expand All @@ -40,12 +41,14 @@ def __init__(
user_account_type=None,
num_active_projects=None,
num_remaining_projects=None,
firstname=None,
lastname=None,
**kwargs,
):
self._username = username
self._email = email
self._first_name = first_name
self._last_name = last_name
self._first_name = first_name or firstname
self._last_name = last_name or last_name
self._status = status
self._secret = secret
self._chosen_password = chosen_password
Expand Down
24 changes: 24 additions & 0 deletions python/hsfs/user.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#
# Copyright 2022 Logical Clocks AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

from hopsworks_common.user import (
User,
)


__all__ = [
User,
]

0 comments on commit fc44667

Please sign in to comment.