nhl-api-py 2.1.0__tar.gz → 2.1.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nhl-api-py
3
- Version: 2.1.0
3
+ Version: 2.1.2
4
4
  Summary: NHL API. For standings, team stats, outcomes, player information. Contains each individual API endpoint as well as convience methods for easy data loading in Pandas or any ML applications.
5
5
  Home-page: https://github.com/coreyjs/nhl-api-py
6
6
  License: GPL-3.0-or-later
@@ -1,3 +1,3 @@
1
1
  # Should this be driven by the main pyproject.toml file? yes, is it super convoluted? yes, can it wait? sure
2
2
 
3
- __version__ = "2.1.0"
3
+ __version__ = "2.1.2"
@@ -1,3 +1,5 @@
1
+ import importlib.resources
2
+
1
3
  from typing import List, Optional
2
4
 
3
5
 
@@ -21,9 +23,8 @@ class Standings:
21
23
  if cache:
22
24
  # load json from data/seasonal_information_manifest.json
23
25
  import json
24
- import os
25
26
 
26
- with open(os.path.join(os.getcwd(), "nhlpy/data/seasonal_information_manifest.json"), "r") as f:
27
+ with importlib.resources.open_text("nhlpy.data", "seasonal_information_manifest.json") as f:
27
28
  seasons = json.load(f)["seasons"]
28
29
  else:
29
30
  seasons = self.season_standing_manifest()
@@ -1,5 +1,5 @@
1
1
  import json
2
- import os
2
+ import importlib.resources
3
3
 
4
4
  from typing import List
5
5
 
@@ -26,5 +26,5 @@ class Teams:
26
26
  :return: dict
27
27
  """
28
28
 
29
- with open(os.path.join(os.getcwd(), "nhlpy/data/teams_20232024.json"), "r") as f:
29
+ with importlib.resources.open_text("nhlpy.data", "teams_20232024.json") as f:
30
30
  return json.load(f)
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [tool.poetry]
6
6
  name = "nhl-api-py"
7
- version = "2.1.0"
7
+ version = "2.1.2"
8
8
  description = "NHL API. For standings, team stats, outcomes, player information. Contains each individual API endpoint as well as convience methods for easy data loading in Pandas or any ML applications."
9
9
  authors = ["Corey Schaf <cschaf@gmail.com>"]
10
10
  readme = "README.md"
@@ -25,6 +25,9 @@ classifiers = [
25
25
  "Topic :: Software Development :: Libraries :: Application Frameworks",
26
26
  "Topic :: Software Development :: Libraries :: Python Modules"
27
27
  ]
28
+ include = [
29
+ "nhlpy/data/*",
30
+ ]
28
31
 
29
32
  [tool.poetry.dependencies]
30
33
  python = "^3.10"
File without changes
File without changes
File without changes