Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into bw25compat
Browse files Browse the repository at this point in the history
  • Loading branch information
cmutel committed Oct 12, 2023
2 parents d20f3c4 + 93a2d8e commit 584b385
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,14 @@ jobs:
- name: Publish distribution 📦 to PyPI if Release
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ secrets.PYPI_USER }}
password: ${{ secrets.PYPI_PASSWORD }}
skip_existing: true

- name: Publish distribution 📦 to Test PyPI if Push
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ secrets.TEST_PYPI_USER }}
password: ${{ secrets.TEST_PYPI_PASSWORD }}
Expand Down
6 changes: 5 additions & 1 deletion premise/inventory_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,9 @@ def __init__(self, database, version_in, version_out, path, system_model):
super().__init__(database, version_in, version_out, path, system_model)

def load_inventory(self, path):
if "http" in path:
path = Path(path)
# check if "http" in path
if "http" in str(path):
# online file
# we need to save it locally first
response = requests.get(path)
Expand All @@ -835,8 +837,10 @@ def load_inventory(self, path):

if path.suffix == ".xlsx":
return ExcelImporter(path)

elif path.suffix == ".csv":
return CSVImporter(path)

else:
raise ValueError(
"Incorrect filetype for inventories." "Should be either .xlsx or .csv"
Expand Down

0 comments on commit 584b385

Please sign in to comment.