Skip to content

Commit

Permalink
Implement PR feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
MeenaBana committed Sep 30, 2024
1 parent c68d3e5 commit 6d364b6
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ Run `isort` manually to sort the imports in the project using the command:
```
isort .
```

However, applying these changes could lead to conflicts. To verify the import order without making any modifications, use the following command:

```
isort . --check-only
```

The `isort` configuration is managed in the `pyproject.toml` file to ensure it integrates well with black and other tools.


Expand Down
2 changes: 1 addition & 1 deletion notebooks/Example_Data_Downloading.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.4"
"version": "3.11.0"
},
"orig_nbformat": 4,
"vscode": {
Expand Down
2 changes: 1 addition & 1 deletion notebooks/Exploring_API_Functions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.4"
"version": "3.11.0"
},
"orig_nbformat": 4,
"vscode": {
Expand Down
4 changes: 2 additions & 2 deletions notebooks/Exploring_API_Functions_Authentication.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -322,7 +322,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.4"
"version": "3.11.0"
}
},
"nbformat": 4,
Expand Down
5 changes: 3 additions & 2 deletions src/pyprediktormapclient/analytics_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class AnalyticsHelper:
* Input checks for nodeIds in variables that requires format int:int:string
"""

ID_PATTERN = r"^\d+:\d+:\S+$"

@validate_call
def __init__(self, input: List):
self.dataframe = pd.DataFrame(
Expand Down Expand Up @@ -124,8 +126,7 @@ def namespaces_as_list(self, list_of_dicts: List) -> List:
@validate_call
def split_id(self, id: Any) -> dict:

pattern = r"^\d+:\d+:\S+$"
if not re.match(pattern, id):
if not re.match(self.ID_PATTERN, id):
raise ValueError("Invalid id format")

id_split = id.split(":")
Expand Down

0 comments on commit 6d364b6

Please sign in to comment.