artemis-model 0.1.156__py3-none-any.whl → 0.1.160__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of artemis-model might be problematic. Click here for more details.

artemis_model/__init__.py CHANGED
@@ -1,5 +1,4 @@
1
1
  from artemis_model.album import * # noqa
2
- from artemis_model.approved_playlist_list import * # noqa
3
2
  from artemis_model.artist import * # noqa
4
3
  from artemis_model.auth import * # noqa
5
4
  from artemis_model.category import * # noqa
@@ -42,21 +42,6 @@ class OrganizationMixin(TimeStampMixin):
42
42
  def include_pal_setting(cls) -> Mapped["OrganizationIncludePalSetting"]:
43
43
  return relationship(back_populates="organization", uselist=False, cascade="all, delete-orphan")
44
44
 
45
- @declared_attr
46
- def approved_playlist_lists(cls) -> Mapped[List["ApprovedPlaylistList"]]:
47
- return relationship("ApprovedPlaylistList", back_populates="organization")
48
-
49
- @property
50
- def approved_playlists(self) -> List[int]:
51
- """
52
- Convenience property to get all playlist IDs from all approved lists, flattened.
53
- Returns empty list if no approved lists exist.
54
- """
55
- playlist_ids = []
56
- for approved_list in self.approved_playlist_lists:
57
- playlist_ids.extend([playlist.id for playlist in approved_list.playlists])
58
- return playlist_ids
59
-
60
45
 
61
46
  def generate_slug(target: Any, value: Any, old_value: Any, initiator: Any) -> None:
62
47
  """Creates a reasonable slug based on organization name."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: artemis-model
3
- Version: 0.1.156
3
+ Version: 0.1.160
4
4
  Summary:
5
5
  Author: Jukeboxy
6
6
  Requires-Python: >=3.10.6,<4.0.0
@@ -1,6 +1,5 @@
1
- artemis_model/__init__.py,sha256=R__YcDg7FMAMHyy9CVjqi6fC58DEWkwMXCg0S9Az6Ck,981
1
+ artemis_model/__init__.py,sha256=k2vjBKwr-B0GU51teQMyNwVaXxqW9lJT3GoyU_yI2ZM,922
2
2
  artemis_model/album.py,sha256=9uw9HVNHVBjl-0Dgv-o5MHXhUPwedvbnbzzY3A1cKQg,2077
3
- artemis_model/approved_playlist_list.py,sha256=JJ2n15JA7kBbsKrQA-GpfriMEjCHZmWcFhFAKfNcPxY,1869
4
3
  artemis_model/artist.py,sha256=vjXlFN2mOEidAzUzxmsAP5GnVTvJUuhFdhQaH214lgw,1563
5
4
  artemis_model/auth.py,sha256=0Yg_6N1nj4U31F86u1PE0leIa3D64QlYrsDlavulN6s,4033
6
5
  artemis_model/banned_tracks.py,sha256=uU-F-6DL2EshPAUwLTTHjYZ7UEz4vm0Wfcif2F0lSKw,664
@@ -11,7 +10,7 @@ artemis_model/genre.py,sha256=8_-IuJS543wIhUVCES3bdrDpKPKx-plDuBKGBcoMIbc,1570
11
10
  artemis_model/location.py,sha256=6Z99OCxhB3VQ4CqNwZP3ShnJ-gOnc5rxGnCn5aCIFZ8,4896
12
11
  artemis_model/location_genre_exclusion.py,sha256=SMX4TXmpwn28tytUq7-qP9ZyJ_ULs5SUv4h7sU0dRFo,1252
13
12
  artemis_model/message.py,sha256=W4vhllsD4Nn11JIKeXlgsKC2NWCt3UMkWh-Sma71gBI,3325
14
- artemis_model/organization.py,sha256=oyq8YIqVr5HAli1IuqFj2UlVKw9KBpWIMlZGcEzmYyA,3167
13
+ artemis_model/organization.py,sha256=_UON9x6iDsU6bW_GWbtQaRnetFx1Bel4ZqXTiugjL2s,2556
15
14
  artemis_model/organization_include_pal_setting.py,sha256=OhNRn4aH96IquJcJBsubvZEgIY3ENqPr4Rda4GWEZ1g,1179
16
15
  artemis_model/otp.py,sha256=guIRGtyFlHUBthCAEsTh5_Hs-1yiGN_qfEO4uHNcv4s,1017
17
16
  artemis_model/permission.py,sha256=Bn1Bg1aCS4Z4_3tqEqvtrzqAYDCImsvmGyIEMoVycEk,1452
@@ -30,6 +29,6 @@ artemis_model/track.py,sha256=QwUF0QKVn1I64648B-NI75-IzGQvnLt9B0emD4GnS6E,3757
30
29
  artemis_model/user.py,sha256=eqIdCiBJRNLjCwPPCn-gQ6si0O5JUBGfp9oWJL5zVW4,2131
31
30
  artemis_model/zone.py,sha256=iGRUtzUwKh9LHT3MOfzzg1DnkPBts_ZBzZVTi2EmIgs,2282
32
31
  artemis_model/zone_activity.py,sha256=BY4iODavY9ceJ5oRChdjjxf26S3U30Yb7Pxm5YRFpCo,1590
33
- artemis_model-0.1.156.dist-info/METADATA,sha256=W7-Dbr6jmhszilJVX1J9N5ACS2Ll8q_6DfobTFqhSu4,3496
34
- artemis_model-0.1.156.dist-info/WHEEL,sha256=M5asmiAlL6HEcOq52Yi5mmk9KmTVjY2RDPtO4p9DMrc,88
35
- artemis_model-0.1.156.dist-info/RECORD,,
32
+ artemis_model-0.1.160.dist-info/METADATA,sha256=jvCJ494LoRsFJcB61KeZqN4gbfvDP6qOWGqb-sDMmt0,3496
33
+ artemis_model-0.1.160.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
34
+ artemis_model-0.1.160.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.2.0
2
+ Generator: poetry-core 2.2.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,59 +0,0 @@
1
- import uuid
2
- from typing import List
3
-
4
- from sqlalchemy import ForeignKey
5
- from sqlalchemy.orm import Mapped, mapped_column, relationship
6
- from sqlalchemy.ext.declarative import declared_attr
7
-
8
- from artemis_model.base import CustomSyncBase, TimeStampMixin, AuditMixin, CustomBase
9
-
10
-
11
- class ApprovedPlaylistListMixin(TimeStampMixin, AuditMixin):
12
-
13
- id: Mapped[int] = mapped_column(autoincrement=True, primary_key=True, index=True)
14
- name: Mapped[str] = mapped_column(nullable=False)
15
- organization_id: Mapped[uuid.UUID] = mapped_column(
16
- ForeignKey("organization.id"), nullable=False, index=True
17
- )
18
-
19
- @declared_attr
20
- def organization(cls) -> Mapped["Organization"]:
21
- return relationship("Organization", back_populates="approved_playlist_lists")
22
-
23
- @declared_attr
24
- def playlist_associations(cls) -> Mapped[List["ApprovedPlaylistListPlaylistAssoc"]]:
25
- return relationship(cascade="all, delete-orphan")
26
-
27
- @declared_attr
28
- def playlists(cls) -> Mapped[List["Playlist"]]:
29
- return relationship(
30
- "Playlist",
31
- secondary="approved_playlist_list_playlist_assoc",
32
- viewonly=True
33
- )
34
-
35
-
36
- class ApprovedPlaylistListSync(CustomSyncBase, ApprovedPlaylistListMixin):
37
- pass
38
-
39
-
40
- class ApprovedPlaylistList(CustomBase, ApprovedPlaylistListMixin):
41
- pass
42
-
43
-
44
- class ApprovedPlaylistListPlaylistAssocMixin(TimeStampMixin):
45
-
46
- approved_playlist_list_id: Mapped[int] = mapped_column(
47
- ForeignKey("approved_playlist_list.id"), primary_key=True, nullable=False
48
- )
49
- playlist_id: Mapped[int] = mapped_column(
50
- ForeignKey("playlist.id"), primary_key=True, nullable=False
51
- )
52
-
53
-
54
- class ApprovedPlaylistListPlaylistAssocSync(CustomSyncBase, ApprovedPlaylistListPlaylistAssocMixin):
55
- pass
56
-
57
-
58
- class ApprovedPlaylistListPlaylistAssoc(CustomBase, ApprovedPlaylistListPlaylistAssocMixin):
59
- pass