memberjojo 3.0__tar.gz → 3.2__tar.gz
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.
- {memberjojo-3.0 → memberjojo-3.2}/PKG-INFO +1 -1
- {memberjojo-3.0 → memberjojo-3.2}/src/memberjojo/_version.py +3 -3
- {memberjojo-3.0 → memberjojo-3.2}/src/memberjojo/mojo_common.py +3 -1
- {memberjojo-3.0 → memberjojo-3.2}/src/memberjojo/mojo_member.py +4 -1
- {memberjojo-3.0 → memberjojo-3.2}/LICENSE +0 -0
- {memberjojo-3.0 → memberjojo-3.2}/README.md +0 -0
- {memberjojo-3.0 → memberjojo-3.2}/pyproject.toml +0 -0
- {memberjojo-3.0 → memberjojo-3.2}/src/memberjojo/__init__.py +0 -0
- {memberjojo-3.0 → memberjojo-3.2}/src/memberjojo/download.py +0 -0
- {memberjojo-3.0 → memberjojo-3.2}/src/memberjojo/mojo_loader.py +0 -0
- {memberjojo-3.0 → memberjojo-3.2}/src/memberjojo/mojo_transaction.py +0 -0
- {memberjojo-3.0 → memberjojo-3.2}/src/memberjojo/sql_query.py +0 -0
- {memberjojo-3.0 → memberjojo-3.2}/src/memberjojo/url.py +0 -0
- {memberjojo-3.0 → memberjojo-3.2}/tests/__init__.py +0 -0
- {memberjojo-3.0 → memberjojo-3.2}/tests/test_merge_import.py +0 -0
- {memberjojo-3.0 → memberjojo-3.2}/tests/test_mojo_import_diff.py +0 -0
- {memberjojo-3.0 → memberjojo-3.2}/tests/test_mojo_members.py +0 -0
- {memberjojo-3.0 → memberjojo-3.2}/tests/test_mojo_members_iter.py +0 -0
- {memberjojo-3.0 → memberjojo-3.2}/tests/test_mojo_transactions.py +0 -0
- {memberjojo-3.0 → memberjojo-3.2}/tests/test_version.py +0 -0
- {memberjojo-3.0 → memberjojo-3.2}/tests/utils.py +0 -0
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '3.
|
|
32
|
-
__version_tuple__ = version_tuple = (3,
|
|
31
|
+
__version__ = version = '3.2'
|
|
32
|
+
__version_tuple__ = version_tuple = (3, 2)
|
|
33
33
|
|
|
34
|
-
__commit_id__ = commit_id = '
|
|
34
|
+
__commit_id__ = commit_id = 'g5d89fbbf7'
|
|
@@ -354,12 +354,14 @@ class MojoSkel:
|
|
|
354
354
|
self.cursor.execute(base_query, values)
|
|
355
355
|
return [self._row_to_obj(row) for row in self.cursor.fetchall()]
|
|
356
356
|
|
|
357
|
-
def run_count_query(self, sql: str, params: tuple):
|
|
357
|
+
def run_count_query(self, sql: str, params: tuple) -> int:
|
|
358
358
|
"""
|
|
359
359
|
Generate whole sql query for running on db table for counting and run
|
|
360
360
|
|
|
361
361
|
:param sql: the sqlite query for matching rows
|
|
362
362
|
:param params: the paramaters to use for the query
|
|
363
|
+
|
|
364
|
+
:return: number of matching rows
|
|
363
365
|
"""
|
|
364
366
|
sql_query = f"SELECT count (*) FROM {self.table_name} {sql}"
|
|
365
367
|
cursor = self.cursor.execute(sql_query, params)
|
|
@@ -63,15 +63,18 @@ class Member(MojoSkel):
|
|
|
63
63
|
value = row[0]
|
|
64
64
|
return str(value).lower() == "yes"
|
|
65
65
|
|
|
66
|
-
def member_type_count(self, membership_type: str):
|
|
66
|
+
def member_type_count(self, membership_type: str) -> int:
|
|
67
67
|
"""
|
|
68
68
|
Count members by membership type string
|
|
69
69
|
|
|
70
70
|
:param membership_type: the string to match, can use percent to match
|
|
71
71
|
remaining or preceeding text
|
|
72
|
+
|
|
72
73
|
- Full (match only Full)
|
|
73
74
|
- Full% (match Full and any words after)
|
|
74
75
|
- %Full% ( match Full in the middle)
|
|
76
|
+
|
|
77
|
+
:return: Number of members that are `membership_type`
|
|
75
78
|
"""
|
|
76
79
|
query = "WHERE membership LIKE ?"
|
|
77
80
|
return self.run_count_query(query, (f"{membership_type}",))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|