Skip to content

Commit

Permalink
Removed deprecated 'pkg_resources' dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
chriscarrollsmith committed Apr 23, 2024
1 parent e8a11f8 commit 2e5d722
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 30 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ jobs:
uses: snok/install-poetry@v1
- name: Build and install project
run: |
poetry cache clear --all .
poetry install
- name: Run tests with pytest
run: |
Expand All @@ -43,12 +42,11 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.12'
- name: Install and configure Poetry
uses: snok/install-poetry@v1
- name: Publish to PyPi
run: |
poetry build
poetry publish --build
if [ $? -ne 0 ]; then
echo "Warning: Version has not been incremented. No new version published."
Expand Down
6 changes: 1 addition & 5 deletions imfp/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from requests import get
from json import loads, load, dump, JSONDecodeError
from pandas import DataFrame
from pkg_resources import get_distribution, DistributionNotFound
import re


Expand Down Expand Up @@ -81,10 +80,7 @@ def _download_parse(URL, times=3):
if app_name:
app_name = app_name[:255]
else:
try:
app_name = f'imfp/{get_distribution("imfp").version}'
except DistributionNotFound:
app_name = "imfp"
app_name = "imfp"

headers = {"Accept": "application/json", "User-Agent": app_name}
for _ in range(times):
Expand Down
27 changes: 6 additions & 21 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ pytest = "^7.2.2"
pytest-runner = "^6.0.0"
black = "^23.3.0"
pytest-mock = "^3.10.0"
setuptools = "^69.5.1"

[build-system]
requires = ["poetry-core"]
Expand Down

0 comments on commit 2e5d722

Please sign in to comment.