Skip to content

Commit

Permalink
chore: bump versions of GitHub actions (DEV-1532) #263
Browse files Browse the repository at this point in the history
  • Loading branch information
jnussbaum committed Nov 29, 2022
1 parent 21967c6 commit efc9f51
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/daily-test.yml
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set up JDK 17
Expand All @@ -19,7 +19,7 @@ jobs:
distribution: "temurin"
java-version: "17"
- name: Set up Python 3.9
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Expand Up @@ -17,12 +17,12 @@ jobs:
runs-on: ubuntu-latest
steps:
# check out repo
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 1
# install python
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.9'
# install python dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests-on-push.yml
Expand Up @@ -14,7 +14,7 @@ jobs:
target: [ 'test-end-to-end-ci', 'test-unittests', 'docs-build' ]
steps:
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set up JDK 17
Expand All @@ -23,7 +23,7 @@ jobs:
distribution: "temurin"
java-version: "17"
- name: Set up Python 3.9
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
Expand Down
10 changes: 5 additions & 5 deletions knora/dsplib/utils/xml_upload.py
Expand Up @@ -240,7 +240,7 @@ def _check_consistency_with_ontology(
"""
if verbose:
print("Check if the resource types and properties are consistent with the ontology...")
knora_properties = resclass_name_2_type[resources[0].restype].knora_properties
knora_properties = resclass_name_2_type[resources[0].restype].knora_properties # type: ignore

for resource in resources:

Expand All @@ -259,7 +259,7 @@ def _check_consistency_with_ontology(
)

# check that the property types are consistent with the ontology
resource_properties = resclass_name_2_type[resource.restype].properties.keys()
resource_properties = resclass_name_2_type[resource.restype].properties.keys() # type: ignore
for propname in [prop.name for prop in resource.properties]:
if propname not in knora_properties and propname not in resource_properties:
raise BaseError(
Expand Down Expand Up @@ -471,7 +471,7 @@ def _upload_resources(
if resource.bitstream:
try:
img: Optional[dict[Any, Any]] = try_network_action(
action=lambda: sipi_server.upload_bitstream(filepath=os.path.join(imgdir, resource.bitstream.value)),
action=lambda: sipi_server.upload_bitstream(filepath=os.path.join(imgdir, resource.bitstream.value)), # type: ignore
failure_msg=f'ERROR while trying to upload file "{resource.bitstream.value}" of resource '
f'"{resource.label}" ({resource.id}).'
)
Expand All @@ -481,7 +481,7 @@ def _upload_resources(
continue
bitstream_size_uploaded_mb += next(bitstream_all_sizes_iterator)
print(f"Uploaded file '{resource.bitstream.value}' ({bitstream_size_uploaded_mb:.1f} MB / {bitstream_size_total_mb} MB)")
internal_file_name_bitstream = img['uploadedFiles'][0]['internalFilename']
internal_file_name_bitstream = img['uploadedFiles'][0]['internalFilename'] # type: ignore
resource_bitstream = resource.get_bitstream(internal_file_name_bitstream, permissions_lookup)

# create the resource in DSP
Expand All @@ -493,7 +493,7 @@ def _upload_resources(
con=con,
label=resource.label,
iri=resource_iri,
permissions=permissions_lookup.get(resource.permissions),
permissions=permissions_lookup.get(resource.permissions), # type: ignore
creation_date=resource.creation_date,
bitstream=resource_bitstream,
values=properties
Expand Down
3 changes: 2 additions & 1 deletion test/e2e/test_tools.py
Expand Up @@ -13,6 +13,7 @@

import jsonpath_ng
import jsonpath_ng.ext
import pytest

from knora.dsplib.utils.excel_to_json_lists import excel2lists, validate_lists_section_with_schema
from knora.dsplib.utils.excel_to_json_project import excel2json
Expand Down Expand Up @@ -336,7 +337,7 @@ def test_id_to_iri(self) -> None:
self.assertTrue(os.path.isfile("testdata/tmp/test-id2iri-out.xml"))
os.remove("testdata/tmp/test-id2iri-out.xml")


@pytest.mark.filterwarnings("ignore")
def test_excel2xml(self) -> None:
excel2xml("testdata/excel2xml-testdata.xlsx", "1234", "excel2xml-output")
self.assertTrue(os.path.isfile("excel2xml-output-data.xml"))
Expand Down

0 comments on commit efc9f51

Please sign in to comment.