diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 20f8898..0163701 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -55,7 +55,7 @@ further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at space.frostbyte@gmail.com. All +reported by contacting the project team at nicolas.klatzer@gmail.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. diff --git a/LICENSE b/LICENSE index 834a970..5f5a302 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 Frostbyte Development Team +Copyright (c) 2020 - 2021 Nicolas Klatzer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/MANIFEST.in b/MANIFEST.in index 08cf9d2..f57e853 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,4 @@ global-include requirements.txt include openhivenpy/*.env -exclude doc-examples +global-exclude *__pycache__*/ graft openhivenpy \ No newline at end of file diff --git a/README.md b/README.md index d55f800..11537bf 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,19 @@ # ![OpenHiven.py](https://images.nxybi.me/da4e88d64f12.png)
OpenHiven.py ## The OpenSource Python API Wrapper for Hiven! -[![Package Version](https://img.shields.io/badge/package%20version-v0.1.3.dev2-purple?logo=python)](https://github.com/FrostbyteSpace/openhiven.py) +[![Package Version](https://img.shields.io/badge/package%20version-v0.1.3.1-purple?logo=python)](https://github.com/Nicolas-Klatzer/openhiven.py) [![Python Version](https://img.shields.io/badge/python->=3.7-blue?logo=python)](https://python.org) -![Build](https://img.shields.io/github/workflow/status/FrostbyteSpace/openhiven.py/CodeQL?logo=github) -[![Latest Commit](https://img.shields.io/github/last-commit/FrostbyteSpace/openhiven.py?logo=github&color=violet)](https://github.com/FrostbyteSpace/openhiven.py/commits/mainy) -![Lines of Code](https://img.shields.io/tokei/lines/github/FrostbyteSpace/openhiven.py) -[![License](https://img.shields.io/github/license/FrostbyteSpace/openhiven.py)](https://github.com/FrostbyteSpace/openhiven.py/blob/main/LICENSE) +![Build](https://img.shields.io/github/workflow/status/Nicolas-Klatzer/openhiven.py/CodeQL?logo=github) +[![Latest Commit](https://img.shields.io/github/last-commit/Nicolas-Klatzer/openhiven.py?logo=github&color=violet)](https://github.com/Nicolas-Klatzer/openhiven.py/commits/mainy) +![Lines of Code](https://img.shields.io/tokei/lines/github/Nicolas-Klatzer/openhiven.py) +[![License](https://img.shields.io/github/license/Nicolas-Klatzer/openhiven.py)](https://github.com/Nicolas-Klatzer/openhiven.py/blob/main/LICENSE) [![Documentation Status](https://readthedocs.org/projects/openhivenpy/badge/?version=latest)](https://readthedocs.org/projects/openhivenpy/) ## Dependencies -[![aiohttp](https://img.shields.io/github/pipenv/locked/dependency-version/FrostbyteSpace/openhiven.py/aiohttp/main)](https://docs.aiohttp.org/en/stable/) -[![asyncio](https://img.shields.io/github/pipenv/locked/dependency-version/FrostbyteSpace/openhiven.py/asyncio/main)](https://docs.python.org/3/library/asyncio.html) -[![typing](https://img.shields.io/github/pipenv/locked/dependency-version/FrostbyteSpace/openhiven.py/typing/main)](https://docs.python.org/3/library/typing.html) +[![aiohttp](https://img.shields.io/github/pipenv/locked/dependency-version/Nicolas-Klatzer/openhiven.py/aiohttp/main)](https://docs.aiohttp.org/en/stable/) +[![asyncio](https://img.shields.io/github/pipenv/locked/dependency-version/Nicolas-Klatzer/openhiven.py/asyncio/main)](https://docs.python.org/3/library/asyncio.html) +[![typing](https://img.shields.io/github/pipenv/locked/dependency-version/Nicolas-Klatzer/openhiven.py/typing/main)](https://docs.python.org/3/library/typing.html) ## Installation ### Install (PyPi Release) @@ -30,13 +30,13 @@ python3 -m pip install -U openhivenpy==version ### Install (Github Build) ```bash -python3 -m pip install -U https://github.com/FrostbyteSpace/openhiven.py/archive/main.zip +python3 -m pip install -U https://github.com/Nicolas-Klatzer/openhiven.py/archive/main.zip ``` ## Documentation For full documentation visit the documentation our readthedocs-page [here](https://openhivenpy.readthedocs.io/en/latest/) or go to the github pages build -[here](https://frostbytespace.github.io/docs_openhiven.py/build/) +[here](https://nicolas-klatzer.github.io/docs_openhiven.py/build/) ### Usage Example diff --git a/openhivenpy/__init__.py b/openhivenpy/__init__.py index 5f4baf5..95b74fe 100644 --- a/openhivenpy/__init__.py +++ b/openhivenpy/__init__.py @@ -6,7 +6,7 @@ Under MIT License -Copyright © 2020 Frostbyte Development Team +Copyright © 2020 - 2021 Nicolas Klatzer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -31,8 +31,8 @@ __title__ = "openhiven.py" __author__ = "Nicolas Klatzer" __license__ = "MIT" -__version__ = "0.1.3.dev2" -__copyright__ = "FrostbyteSpace" +__version__ = "0.1.3.1" +__copyright__ = "Nicolas Klatzer" import logging diff --git a/openhivenpy/client/__init__.py b/openhivenpy/client/__init__.py index 90c49f3..5acd125 100644 --- a/openhivenpy/client/__init__.py +++ b/openhivenpy/client/__init__.py @@ -6,7 +6,7 @@ Under MIT License -Copyright © 2020 Frostbyte Development Team +Copyright © 2020 - 2021 Nicolas Klatzer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/openhivenpy/events/__init__.py b/openhivenpy/events/__init__.py index fbd9ed2..dc95acb 100644 --- a/openhivenpy/events/__init__.py +++ b/openhivenpy/events/__init__.py @@ -6,7 +6,7 @@ Under MIT License -Copyright © 2020 Frostbyte Development Team +Copyright © 2020 - 2021 Nicolas Klatzer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/openhivenpy/exception.py b/openhivenpy/exception.py index 0b5b91c..602f9e7 100644 --- a/openhivenpy/exception.py +++ b/openhivenpy/exception.py @@ -5,7 +5,7 @@ Under MIT License -Copyright © 2020 Frostbyte Development Team +Copyright © 2020 - 2021 Nicolas Klatzer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/openhivenpy/gateway/__init__.py b/openhivenpy/gateway/__init__.py index 3781a2c..62b8df6 100644 --- a/openhivenpy/gateway/__init__.py +++ b/openhivenpy/gateway/__init__.py @@ -6,7 +6,7 @@ Under MIT License -Copyright © 2020 Frostbyte Development Team +Copyright © 2020 - 2021 Nicolas Klatzer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/openhivenpy/gateway/connection.py b/openhivenpy/gateway/connection.py index 9aa8d90..561eb6f 100644 --- a/openhivenpy/gateway/connection.py +++ b/openhivenpy/gateway/connection.py @@ -125,7 +125,7 @@ async def startup(): # Fetching the startup_task from the object that stores them async_task = getattr(self._startup_tasks_handler, task_name) # Creating a callable task and appending it to the methods to call - _tasks.append(asyncio.create_task(async_task(), name=task_name)) + _tasks.append(asyncio.create_task(async_task())) # Passing all tasks as args to the event loop await asyncio.gather(*_tasks) @@ -155,7 +155,7 @@ async def __background_loop(): # Fetching the startup_task from the object that stores them async_task = getattr(self._background_tasks_handler, task_name) # Creating a callable task - _tasks.append(asyncio.create_task(async_task(), name=task_name)) + _tasks.append(asyncio.create_task(async_task())) # Passing all tasks as args to the event loop await asyncio.gather(*_tasks) diff --git a/openhivenpy/gateway/ws.py b/openhivenpy/gateway/ws.py index 2ee968a..09816b3 100644 --- a/openhivenpy/gateway/ws.py +++ b/openhivenpy/gateway/ws.py @@ -232,7 +232,7 @@ async def ws_connection(): return # Creating a task that wraps the coroutine - self._connection_task = asyncio.create_task(ws_connection(), name="openhivenpy-ws-connection") + self._connection_task = asyncio.create_task(ws_connection()) # Running the task in the background try: diff --git a/openhivenpy/types/__init__.py b/openhivenpy/types/__init__.py index ce3e4d5..2d0db7d 100644 --- a/openhivenpy/types/__init__.py +++ b/openhivenpy/types/__init__.py @@ -6,7 +6,7 @@ Under MIT License -Copyright © 2020 Frostbyte Development Team +Copyright © 2020 - 2021 Nicolas Klatzer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/openhivenpy/types/attatchment.py b/openhivenpy/types/attatchment.py index 45d3baa..bc37df6 100644 --- a/openhivenpy/types/attatchment.py +++ b/openhivenpy/types/attatchment.py @@ -65,14 +65,14 @@ async def from_dict(cls, data: dict, http, **kwargs): except ValidationError as e: utils.log_validation_traceback(cls, e) - raise errs.InvalidPassedDataError(data=data) + raise errs.InvalidPassedDataError(f"Failed to perform validation in '{cls.__name__}'", data=data) from e except Exception as e: utils.log_traceback(msg=f"Traceback in '{cls.__name__}' Validation:", suffix=f"Failed to initialise {cls.__name__} due to exception:\n" f"{sys.exc_info()[0].__name__}: {e}!") raise errs.InitializationError(f"Failed to initialise {cls.__name__} due to exception:\n" - f"{sys.exc_info()[0].__name__}: {e}!") + f"{sys.exc_info()[0].__name__}: {e}!") from e else: # Adding the http attribute for API interaction instance._http = http diff --git a/openhivenpy/types/context.py b/openhivenpy/types/context.py index cefbb57..0d2bfc4 100644 --- a/openhivenpy/types/context.py +++ b/openhivenpy/types/context.py @@ -66,14 +66,14 @@ async def from_dict(cls, data: dict, http, **kwargs): except ValidationError as e: utils.log_validation_traceback(cls, e) - raise errs.InvalidPassedDataError(data=data) + raise errs.InvalidPassedDataError(f"Failed to perform validation in '{cls.__name__}'", data=data) from e except Exception as e: utils.log_traceback(msg=f"Traceback in '{cls.__name__}' Validation:", suffix=f"Failed to initialise {cls.__name__} due to exception:\n" f"{sys.exc_info()[0].__name__}: {e}!") raise errs.InitializationError(f"Failed to initialise {cls.__name__} due to exception:\n" - f"{sys.exc_info()[0].__name__}: {e}!") + f"{sys.exc_info()[0].__name__}: {e}!") from e else: # Adding the http attribute for API interaction instance._http = http diff --git a/openhivenpy/types/embed.py b/openhivenpy/types/embed.py index 2a7789f..9b9f686 100644 --- a/openhivenpy/types/embed.py +++ b/openhivenpy/types/embed.py @@ -68,14 +68,14 @@ async def from_dict(cls, data: dict, http, **kwargs): except ValidationError as e: utils.log_validation_traceback(cls, e) - raise errs.InvalidPassedDataError(data=data) + raise errs.InvalidPassedDataError(f"Failed to perform validation in '{cls.__name__}'", data=data) from e except Exception as e: utils.log_traceback(msg=f"Traceback in '{cls.__name__}' Validation:", suffix=f"Failed to initialise {cls.__name__} due to exception:\n" f"{sys.exc_info()[0].__name__}: {e}!") raise errs.InitializationError(f"Failed to initialise {cls.__name__} due to exception:\n" - f"{sys.exc_info()[0].__name__}: {e}!") + f"{sys.exc_info()[0].__name__}: {e}!") from e else: # Adding the http attribute for API interaction instance._http = http diff --git a/openhivenpy/types/entity.py b/openhivenpy/types/entity.py index 2cdea36..b675a28 100644 --- a/openhivenpy/types/entity.py +++ b/openhivenpy/types/entity.py @@ -18,7 +18,7 @@ class EntitySchema(Schema): id = fields.Int(required=True) name = fields.Str(required=True) type = fields.Int(required=True) - resource_pointers = fields.List(fields.Field(), required=True) + resource_pointers = fields.List(fields.Field(), allow_none=True, required=True) house_id = fields.Str(default=None) position = fields.Int(default=0) @@ -81,14 +81,14 @@ async def from_dict(cls, data: dict, http, house, **kwargs): except ValidationError as e: utils.log_validation_traceback(cls, e) - raise errs.InvalidPassedDataError(data=data) + raise errs.InvalidPassedDataError(f"Failed to perform validation in '{cls.__name__}'", data=data) from e except Exception as e: utils.log_traceback(msg=f"Traceback in '{cls.__name__}' Validation:", suffix=f"Failed to initialise {cls.__name__} due to exception:\n" f"{sys.exc_info()[0].__name__}: {e}!") raise errs.InitializationError(f"Failed to initialise {cls.__name__} due to exception:\n" - f"{sys.exc_info()[0].__name__}: {e}!") + f"{sys.exc_info()[0].__name__}: {e}!") from e else: # Adding the http attribute for API interaction instance._http = http diff --git a/openhivenpy/types/house.py b/openhivenpy/types/house.py index 0b0e2fc..40fb7ae 100644 --- a/openhivenpy/types/house.py +++ b/openhivenpy/types/house.py @@ -118,14 +118,14 @@ async def from_dict(cls, data: dict, http, rooms: typing.List[room.Room], **kwar except ValidationError as e: utils.log_validation_traceback(cls, e) - raise errs.InvalidPassedDataError(data=data) + raise errs.InvalidPassedDataError(f"Failed to perform validation in '{cls.__name__}'", data=data) from e except Exception as e: utils.log_traceback(msg=f"Traceback in '{cls.__name__}' Validation:", suffix=f"Failed to initialise {cls.__name__} due to exception:\n" f"{sys.exc_info()[0].__name__}: {e}!") raise errs.InitializationError(f"Failed to initialise {cls.__name__} due to exception:\n" - f"{sys.exc_info()[0].__name__}: {e}!") + f"{sys.exc_info()[0].__name__}: {e}!") from e else: # Adding the http attribute for API interaction instance._http = http @@ -231,14 +231,14 @@ async def from_dict(cls, data: dict, http, rooms: typing.List[room.Room], **kwar except ValidationError as e: utils.log_validation_traceback(cls, e) - raise errs.InvalidPassedDataError(data=data) + raise errs.InvalidPassedDataError(f"Failed to perform validation in '{cls.__name__}'", data=data) from e except Exception as e: utils.log_traceback(msg=f"Traceback in '{cls.__name__}' Validation:", suffix=f"Failed to initialise {cls.__name__} due to exception:\n" f"{sys.exc_info()[0].__name__}: {e}!") raise errs.InitializationError(f"Failed to initialise {cls.__name__} due to exception:\n" - f"{sys.exc_info()[0].__name__}: {e}!") + f"{sys.exc_info()[0].__name__}: {e}!") from e else: # Adding the http attribute for API interaction instance._http = http diff --git a/openhivenpy/types/invite.py b/openhivenpy/types/invite.py index 812b98f..27b0eba 100644 --- a/openhivenpy/types/invite.py +++ b/openhivenpy/types/invite.py @@ -111,14 +111,14 @@ async def from_dict(cls, except ValidationError as e: utils.log_validation_traceback(cls, e) - raise errs.InvalidPassedDataError(data=data) + raise errs.InvalidPassedDataError(f"Failed to perform validation in '{cls.__name__}'", data=data) from e except Exception as e: utils.log_traceback(msg=f"Traceback in '{cls.__name__}' Validation:", suffix=f"Failed to initialise {cls.__name__} due to exception:\n" f"{sys.exc_info()[0].__name__}: {e}!") raise errs.InitializationError(f"Failed to initialise {cls.__name__} due to exception:\n" - f"{sys.exc_info()[0].__name__}: {e}!") + f"{sys.exc_info()[0].__name__}: {e}!") from e else: # Adding the http attribute for API interaction instance._http = http diff --git a/openhivenpy/types/member.py b/openhivenpy/types/member.py index 353b670..0223716 100644 --- a/openhivenpy/types/member.py +++ b/openhivenpy/types/member.py @@ -111,14 +111,14 @@ async def from_dict(cls, except ValidationError as e: utils.log_validation_traceback(cls, e) - raise errs.InvalidPassedDataError(data=data) + raise errs.InvalidPassedDataError(f"Failed to perform validation in '{cls.__name__}'", data=data) from e except Exception as e: utils.log_traceback(msg=f"Traceback in '{cls.__name__}' Validation:", suffix=f"Failed to initialise {cls.__name__} due to exception:\n" f"{sys.exc_info()[0].__name__}: {e}!") raise errs.InitializationError(f"Failed to initialise {cls.__name__} due to exception:\n" - f"{sys.exc_info()[0].__name__}: {e}!") + f"{sys.exc_info()[0].__name__}: {e}!") from e else: # Adding the http attribute for API interaction instance._http = http diff --git a/openhivenpy/types/mention.py b/openhivenpy/types/mention.py index 8855930..8a4ae6f 100644 --- a/openhivenpy/types/mention.py +++ b/openhivenpy/types/mention.py @@ -64,14 +64,14 @@ async def from_dict(cls, except ValidationError as e: utils.log_validation_traceback(cls, e) - raise errs.InvalidPassedDataError(data=data) + raise errs.InvalidPassedDataError(f"Failed to perform validation in '{cls.__name__}'", data=data) from e except Exception as e: utils.log_traceback(msg=f"Traceback in '{cls.__name__}' Validation:", suffix=f"Failed to initialise {cls.__name__} due to exception:\n" f"{sys.exc_info()[0].__name__}: {e}!") raise errs.InitializationError(f"Failed to initialise {cls.__name__} due to exception:\n" - f"{sys.exc_info()[0].__name__}: {e}!") + f"{sys.exc_info()[0].__name__}: {e}!") from e else: return instance diff --git a/openhivenpy/types/message.py b/openhivenpy/types/message.py index ee34e12..3811629 100644 --- a/openhivenpy/types/message.py +++ b/openhivenpy/types/message.py @@ -108,14 +108,14 @@ async def from_dict(cls, data: dict, **kwargs): except ValidationError as e: utils.log_validation_traceback(cls, e) - raise errs.InvalidPassedDataError(data=data) + raise errs.InvalidPassedDataError(f"Failed to perform validation in '{cls.__name__}'", data=data) from e except Exception as e: utils.log_traceback(msg=f"Traceback in '{cls.__name__}' Validation:", suffix=f"Failed to initialise {cls.__name__} due to exception:\n" f"{sys.exc_info()[0].__name__}: {e}!") raise errs.InitializationError(f"Failed to initialise {cls.__name__} due to exception:\n" - f"{sys.exc_info()[0].__name__}: {e}!") + f"{sys.exc_info()[0].__name__}: {e}!") from e else: return instance @@ -235,14 +235,14 @@ async def from_dict(cls, except ValidationError as e: utils.log_validation_traceback(cls, e) - raise errs.InvalidPassedDataError(data=data) + raise errs.InvalidPassedDataError(f"Failed to perform validation in '{cls.__name__}'", data=data) from e except Exception as e: utils.log_traceback(msg=f"Traceback in '{cls.__name__}' Validation:", suffix=f"Failed to initialise {cls.__name__} due to exception:\n" f"{sys.exc_info()[0].__name__}: {e}!") raise errs.InitializationError(f"Failed to initialise {cls.__name__} due to exception:\n" - f"{sys.exc_info()[0].__name__}: {e}!") + f"{sys.exc_info()[0].__name__}: {e}!") from e else: # Adding the http attribute for API interaction instance._http = http diff --git a/openhivenpy/types/private_room.py b/openhivenpy/types/private_room.py index 52d67b5..3c14cb1 100644 --- a/openhivenpy/types/private_room.py +++ b/openhivenpy/types/private_room.py @@ -136,14 +136,14 @@ async def from_dict(cls, except ValidationError as e: utils.log_validation_traceback(cls, e) - raise errs.InvalidPassedDataError(data=data) + raise errs.InvalidPassedDataError(f"Failed to perform validation in '{cls.__name__}'", data=data) from e except Exception as e: utils.log_traceback(msg=f"Traceback in '{cls.__name__}' Validation:", suffix=f"Failed to initialise {cls.__name__} due to exception:\n" f"{sys.exc_info()[0].__name__}: {e}!") raise errs.InitializationError(f"Failed to initialise {cls.__name__} due to exception:\n" - f"{sys.exc_info()[0].__name__}: {e}!") + f"{sys.exc_info()[0].__name__}: {e}!") from e else: # Adding the http attribute for API interaction instance._http = http @@ -287,14 +287,14 @@ async def from_dict(cls, data: dict, http, client_user, **kwargs): except ValidationError as e: utils.log_validation_traceback(cls, e) - raise errs.InvalidPassedDataError(data=data) + raise errs.InvalidPassedDataError(f"Failed to perform validation in '{cls.__name__}'", data=data) from e except Exception as e: utils.log_traceback(msg=f"Traceback in '{cls.__name__}' Validation:", suffix=f"Failed to initialise {cls.__name__} due to exception:\n" f"{sys.exc_info()[0].__name__}: {e}!") raise errs.InitializationError(f"Failed to initialise {cls.__name__} due to exception:\n" - f"{sys.exc_info()[0].__name__}: {e}!") + f"{sys.exc_info()[0].__name__}: {e}!") from e else: # Adding the http attribute for API interaction instance._http = http diff --git a/openhivenpy/types/relationship.py b/openhivenpy/types/relationship.py index ed67fea..d7a4c8b 100644 --- a/openhivenpy/types/relationship.py +++ b/openhivenpy/types/relationship.py @@ -107,14 +107,14 @@ async def from_dict(cls, except ValidationError as e: utils.log_validation_traceback(cls, e) - raise errs.InvalidPassedDataError(data=data) + raise errs.InvalidPassedDataError(f"Failed to perform validation in '{cls.__name__}'", data=data) from e except Exception as e: utils.log_traceback(msg=f"Traceback in '{cls.__name__}' Validation:", suffix=f"Failed to initialise {cls.__name__} due to exception:\n" f"{sys.exc_info()[0].__name__}: {e}!") raise errs.InitializationError(f"Failed to initialise {cls.__name__} due to exception:\n" - f"{sys.exc_info()[0].__name__}: {e}!") + f"{sys.exc_info()[0].__name__}: {e}!") from e else: # Adding the http attribute for API interaction instance._http = http diff --git a/openhivenpy/types/room.py b/openhivenpy/types/room.py index 701ab91..6c90172 100644 --- a/openhivenpy/types/room.py +++ b/openhivenpy/types/room.py @@ -114,14 +114,14 @@ async def from_dict(cls, except ValidationError as e: utils.log_validation_traceback(cls, e) - raise errs.InvalidPassedDataError(data=data) + raise errs.InvalidPassedDataError(f"Failed to perform validation in '{cls.__name__}'", data=data) from e except Exception as e: utils.log_traceback(msg=f"Traceback in '{cls.__name__}' Validation:", suffix=f"Failed to initialise {cls.__name__} due to exception:\n" f"{sys.exc_info()[0].__name__}: {e}!") raise errs.InitializationError(f"Failed to initialise {cls.__name__} due to exception:\n" - f"{sys.exc_info()[0].__name__}: {e}!") + f"{sys.exc_info()[0].__name__}: {e}!") from e else: # Adding the http attribute for API interaction instance._http = http diff --git a/openhivenpy/types/user.py b/openhivenpy/types/user.py index 2ba1397..415ff1e 100644 --- a/openhivenpy/types/user.py +++ b/openhivenpy/types/user.py @@ -113,14 +113,14 @@ async def from_dict(cls, except ValidationError as e: utils.log_validation_traceback(cls, e) - raise errs.InvalidPassedDataError(data=data) + raise errs.InvalidPassedDataError(f"Failed to perform validation in '{cls.__name__}'", data=data) from e except Exception as e: utils.log_traceback(msg=f"Traceback in '{cls.__name__}' Validation:", suffix=f"Failed to initialise {cls.__name__} due to exception:\n" f"{sys.exc_info()[0].__name__}: {e}!") raise errs.InitializationError(f"Failed to initialise {cls.__name__} due to exception:\n" - f"{sys.exc_info()[0].__name__}: {e}!") + f"{sys.exc_info()[0].__name__}: {e}!") from e else: # Adding the http attribute for API interaction instance._http = http @@ -197,14 +197,14 @@ async def from_dict(cls, except ValidationError as e: utils.log_validation_traceback(cls, e) - raise errs.InvalidPassedDataError(data=data) + raise errs.InvalidPassedDataError(f"Failed to perform validation in '{cls.__name__}'", data=data) from e except Exception as e: utils.log_traceback(msg=f"Traceback in '{cls.__name__}' Validation:", suffix=f"Failed to initialise {cls.__name__} due to exception:\n" f"{sys.exc_info()[0].__name__}: {e}!") raise errs.InitializationError(f"Failed to initialise {cls.__name__} due to exception:\n" - f"{sys.exc_info()[0].__name__}: {e}!") + f"{sys.exc_info()[0].__name__}: {e}!") from e else: # Adding the http attribute for API interaction instance._http = http diff --git a/openhivenpy/types/usertyping.py b/openhivenpy/types/usertyping.py index f750c17..d430a72 100644 --- a/openhivenpy/types/usertyping.py +++ b/openhivenpy/types/usertyping.py @@ -98,14 +98,14 @@ async def from_dict(cls, except ValidationError as e: utils.log_validation_traceback(cls, e) - raise errs.InvalidPassedDataError(data=data) + raise errs.InvalidPassedDataError(f"Failed to perform validation in '{cls.__name__}'", data=data) from e except Exception as e: utils.log_traceback(msg=f"Traceback in '{cls.__name__}' Validation:", suffix=f"Failed to initialise {cls.__name__} due to exception:\n" f"{sys.exc_info()[0].__name__}: {e}!") raise errs.InitializationError(f"Failed to initialise {cls.__name__} due to exception:\n" - f"{sys.exc_info()[0].__name__}: {e}!") + f"{sys.exc_info()[0].__name__}: {e}!") from e else: # Adding the http attribute for API interaction instance._http = http diff --git a/openhivenpy/utils/__init__.py b/openhivenpy/utils/__init__.py index ad3d8e9..fc15b46 100644 --- a/openhivenpy/utils/__init__.py +++ b/openhivenpy/utils/__init__.py @@ -6,7 +6,7 @@ Under MIT License -Copyright © 2020 Frostbyte Development Team +Copyright © 2020 - 2021 Nicolas Klatzer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/setup.cfg b/setup.cfg index 224a779..0f94f37 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,2 @@ [metadata] -description-file = README.md \ No newline at end of file +description_file = README.md \ No newline at end of file diff --git a/setup.py b/setup.py index f58a8a5..6a8b270 100644 --- a/setup.py +++ b/setup.py @@ -8,18 +8,18 @@ setuptools.setup( name="openhivenpy", - version="0.1.3.dev2", + version="0.1.3.1", author="Nicolas Klatzer", author_email="nicolas.klatzer@gmail.com", description="The OpenSource Python API Wrapper for Hiven!", long_description=long_description, long_description_content_type="text/markdown", license="MIT", - url="https://github.com/FrostbyteSpace/openhiven.py", + url="https://github.com/Nicolas-Klatzer/openhiven.py", project_urls={ "Docs Rewrite": "https://openhivenpy.readthedocs.io/en/mkdocs-material-rewrite/", "Hiven API Docs": "https://openhivenpy.readthedocs.io/en/mkdocs-material-rewrite/api_reference/", - "Issues": "https://github.com/FrostbyteSpace/openhiven.py/issues/", + "Issues": "https://github.com/Nicolas-Klatzer/openhiven.py/issues/", "Changelog": "https://openhivenpy.readthedocs.io/en/mkdocs-material-rewrite/changelog.html" }, packages=setuptools.find_packages(),