rgwfuncs 0.0.7__tar.gz → 0.0.8__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: rgwfuncs
3
- Version: 0.0.7
3
+ Version: 0.0.8
4
4
  Summary: A functional programming paradigm for mathematical modelling and data science
5
5
  Home-page: https://github.com/ryangerardwilson/rgwfunc
6
6
  Author: Ryan Gerard Wilson
@@ -77,7 +77,7 @@ A `rgwml.config` file (located at `vi ~/Documents/rgwml.config) is required for
77
77
  "project_id": ""
78
78
  }
79
79
  ],
80
- "vm_presets": [
80
+ "vm_presets": [
81
81
  {
82
82
  "name": "main_server",
83
83
  "host": "",
@@ -85,34 +85,34 @@ A `rgwml.config` file (located at `vi ~/Documents/rgwml.config) is required for
85
85
  "ssh_key_path": ""
86
86
  }
87
87
  ],
88
- "cloud_storage_presets": [
88
+ "cloud_storage_presets": [
89
89
  {
90
90
  "name": "gcs_bucket_name",
91
- "credential_path": "path/to/your/credentials.json"
91
+ "credential_path": "/path/to/your/credentials.json"
92
92
  }
93
93
  ],
94
- "telegram_bot_presets": [
95
- {
96
- "name": "rgwml-bot",
97
- "chat_id": "",
98
- "bot_token": ""
99
- }
100
- ],
101
- "slack_bot_presets": [
102
- {
103
- "name": "labs-channel",
104
- "channel_id": "",
105
- "bot_token": ""
106
- }
107
- ],
108
- "gmail_bot_presets": [
109
- {
110
- "name": "info@xyz.com",
111
- "service_account_credentials_path": "/home/user/Documents/credentials/your_creds.json"
112
- }
113
- ]
114
- }
115
-
94
+ "telegram_bot_presets": [
95
+ {
96
+ "name": "rgwml-bot",
97
+ "chat_id": "",
98
+ "bot_token": ""
99
+ }
100
+ ],
101
+ "slack_bot_presets": [
102
+ {
103
+ "name": "labs-channel",
104
+ "channel_id": "",
105
+ "bot_token": ""
106
+ }
107
+ ],
108
+ "gmail_bot_presets": [
109
+ {
110
+ "name": "info@xyz.com",
111
+ "service_account_credentials_path": "/path/to/your/credentials.json"
112
+ }
113
+ ]
114
+ }
115
+
116
116
  --------------------------------------------------------------------------------
117
117
 
118
118
  ## Basic Usage
@@ -51,7 +51,7 @@ A `rgwml.config` file (located at `vi ~/Documents/rgwml.config) is required for
51
51
  "project_id": ""
52
52
  }
53
53
  ],
54
- "vm_presets": [
54
+ "vm_presets": [
55
55
  {
56
56
  "name": "main_server",
57
57
  "host": "",
@@ -59,34 +59,34 @@ A `rgwml.config` file (located at `vi ~/Documents/rgwml.config) is required for
59
59
  "ssh_key_path": ""
60
60
  }
61
61
  ],
62
- "cloud_storage_presets": [
62
+ "cloud_storage_presets": [
63
63
  {
64
64
  "name": "gcs_bucket_name",
65
- "credential_path": "path/to/your/credentials.json"
65
+ "credential_path": "/path/to/your/credentials.json"
66
66
  }
67
67
  ],
68
- "telegram_bot_presets": [
69
- {
70
- "name": "rgwml-bot",
71
- "chat_id": "",
72
- "bot_token": ""
73
- }
74
- ],
75
- "slack_bot_presets": [
76
- {
77
- "name": "labs-channel",
78
- "channel_id": "",
79
- "bot_token": ""
80
- }
81
- ],
82
- "gmail_bot_presets": [
83
- {
84
- "name": "info@xyz.com",
85
- "service_account_credentials_path": "/home/user/Documents/credentials/your_creds.json"
86
- }
87
- ]
88
- }
89
-
68
+ "telegram_bot_presets": [
69
+ {
70
+ "name": "rgwml-bot",
71
+ "chat_id": "",
72
+ "bot_token": ""
73
+ }
74
+ ],
75
+ "slack_bot_presets": [
76
+ {
77
+ "name": "labs-channel",
78
+ "channel_id": "",
79
+ "bot_token": ""
80
+ }
81
+ ],
82
+ "gmail_bot_presets": [
83
+ {
84
+ "name": "info@xyz.com",
85
+ "service_account_credentials_path": "/path/to/your/credentials.json"
86
+ }
87
+ ]
88
+ }
89
+
90
90
  --------------------------------------------------------------------------------
91
91
 
92
92
  ## Basic Usage
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "rgwfuncs"
7
- version = "0.0.7"
7
+ version = "0.0.8"
8
8
  authors = [
9
9
  { name = "Ryan Gerard Wilson", email = "ryangerardwilson@gmail.com" },
10
10
  ]
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = rgwfuncs
3
- version = 0.0.7
3
+ version = 0.0.8
4
4
  author = Ryan Gerard Wilson
5
5
  author_email = ryangerardwilson@gmail.com
6
6
  description = A functional programming paradigm for mathematical modelling and data science
@@ -27,10 +27,13 @@ from typing import Optional, Callable, Dict, List, Tuple, Any
27
27
 
28
28
  def docs(method_type_filter: Optional[str] = None) -> None:
29
29
  """
30
- Print a list of function names in alphabetical order. If method_type_filter is specified, print the docstrings of the functions that match the filter. Using '*' as a filter will print the docstrings for all functions.
30
+ Print a list of function names in alphabetical order. If method_type_filter
31
+ is specified, print the docstrings of the functions that match the filter.
32
+ Using '*' as a filter will print the docstrings for all functions.
31
33
 
32
34
  Parameters:
33
- method_type_filter: Optional filter string, comma-separated to select docstring types, or '*' for all.
35
+ method_type_filter: Optional filter string representing a function name,
36
+ or '*' to display docstrings for all functions.
34
37
  """
35
38
  # Get the current module's namespace
36
39
  current_module = __name__
@@ -41,7 +44,7 @@ def docs(method_type_filter: Optional[str] = None) -> None:
41
44
  }
42
45
 
43
46
  # List of function names sorted alphabetically
44
- function_names: List[str] = sorted(local_functions.keys())
47
+ function_names = sorted(local_functions.keys())
45
48
 
46
49
  # Print function names
47
50
  print("Functions in alphabetical order:")
@@ -50,26 +53,13 @@ def docs(method_type_filter: Optional[str] = None) -> None:
50
53
 
51
54
  # If a filter is provided or '*', print the docstrings of functions
52
55
  if method_type_filter:
53
- print("\nFiltered function documentation:")
56
+ # print("\nFiltered function documentation:")
54
57
  for name, func in local_functions.items():
55
58
  docstring: Optional[str] = func.__doc__
56
59
  if docstring:
57
- if method_type_filter == '*':
58
- # Print the entire docstring for each function
60
+ if method_type_filter == '*' or method_type_filter == name:
61
+ # Print the entire docstring for the matching function
59
62
  print(f"\n{name}:\n{docstring}")
60
- else:
61
- # Extract only the first line of the docstring
62
- first_line: str = docstring.split('\n')[0]
63
- if "::" in first_line:
64
- # Find the first occurrence of "::" and split there
65
- split_index: int = first_line.find("::")
66
- function_type: str = first_line[:split_index].strip()
67
- function_type_list: List[str] = [
68
- mt.strip() for mt in method_type_filter.split(',')]
69
- if function_type in function_type_list:
70
- # Print the entire docstring if the filter matches
71
- print(f"\n{name}:\n{docstring}")
72
-
73
63
 
74
64
  def numeric_clean(df: pd.DataFrame, column_names: str, column_type: str, irregular_value_treatment: str) -> pd.DataFrame:
75
65
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: rgwfuncs
3
- Version: 0.0.7
3
+ Version: 0.0.8
4
4
  Summary: A functional programming paradigm for mathematical modelling and data science
5
5
  Home-page: https://github.com/ryangerardwilson/rgwfunc
6
6
  Author: Ryan Gerard Wilson
@@ -77,7 +77,7 @@ A `rgwml.config` file (located at `vi ~/Documents/rgwml.config) is required for
77
77
  "project_id": ""
78
78
  }
79
79
  ],
80
- "vm_presets": [
80
+ "vm_presets": [
81
81
  {
82
82
  "name": "main_server",
83
83
  "host": "",
@@ -85,34 +85,34 @@ A `rgwml.config` file (located at `vi ~/Documents/rgwml.config) is required for
85
85
  "ssh_key_path": ""
86
86
  }
87
87
  ],
88
- "cloud_storage_presets": [
88
+ "cloud_storage_presets": [
89
89
  {
90
90
  "name": "gcs_bucket_name",
91
- "credential_path": "path/to/your/credentials.json"
91
+ "credential_path": "/path/to/your/credentials.json"
92
92
  }
93
93
  ],
94
- "telegram_bot_presets": [
95
- {
96
- "name": "rgwml-bot",
97
- "chat_id": "",
98
- "bot_token": ""
99
- }
100
- ],
101
- "slack_bot_presets": [
102
- {
103
- "name": "labs-channel",
104
- "channel_id": "",
105
- "bot_token": ""
106
- }
107
- ],
108
- "gmail_bot_presets": [
109
- {
110
- "name": "info@xyz.com",
111
- "service_account_credentials_path": "/home/user/Documents/credentials/your_creds.json"
112
- }
113
- ]
114
- }
115
-
94
+ "telegram_bot_presets": [
95
+ {
96
+ "name": "rgwml-bot",
97
+ "chat_id": "",
98
+ "bot_token": ""
99
+ }
100
+ ],
101
+ "slack_bot_presets": [
102
+ {
103
+ "name": "labs-channel",
104
+ "channel_id": "",
105
+ "bot_token": ""
106
+ }
107
+ ],
108
+ "gmail_bot_presets": [
109
+ {
110
+ "name": "info@xyz.com",
111
+ "service_account_credentials_path": "/path/to/your/credentials.json"
112
+ }
113
+ ]
114
+ }
115
+
116
116
  --------------------------------------------------------------------------------
117
117
 
118
118
  ## Basic Usage
File without changes