Skip to content

Commit

Permalink
the magic of isort
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-bryson committed Jun 1, 2023
1 parent aa21c5a commit 4f6554a
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 8 deletions.
6 changes: 3 additions & 3 deletions datagovharvester/extract/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from datagovharvester.validate.dcat_us import is_dcatus_schema
from datagovharvester.utils.s3_utilities import upload_to_S3
from datagovharvester.extract.utils import download_json
from datagovharvester.extract.dcatus import parse_catalog
from datagovharvester.extract.utils import download_json
from datagovharvester.utils.s3_utilities import upload_to_S3
from datagovharvester.validate.dcat_us import is_dcatus_schema

# ruff: noqa: F841

Expand Down
1 change: 1 addition & 0 deletions datagovharvester/extract/dcatus.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import json

from datagovharvester import content_types, extract_feat_name
from datagovharvester.utils.s3_utilities import create_s3_upload_data

Expand Down
3 changes: 2 additions & 1 deletion datagovharvester/extract/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import requests
import json

import requests


def download_json(url):
""" download file and pull json from response
Expand Down
1 change: 1 addition & 0 deletions datagovharvester/utils/s3_utilities.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import boto3
import botocore

from datagovharvester import bucket_name

# ruff: noqa: F841
Expand Down
3 changes: 2 additions & 1 deletion datagovharvester/validate/dcat_us.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from jsonschema.exceptions import ValidationError
from jsonschema import Draft202012Validator
from jsonschema.exceptions import ValidationError


def is_dcatus_schema( catalog ):

Expand Down
6 changes: 4 additions & 2 deletions tests/extract/conftest.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import pytest
from dotenv import load_dotenv
import os
from uuid import uuid4

import pytest
from dotenv import load_dotenv

from datagovharvester.utils.s3_utilities import create_s3_client


Expand Down
1 change: 1 addition & 0 deletions tests/extract/test_dcatus.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from datagovharvester import bucket_name
from datagovharvester.extract import main


def test_extract_dcatus(get_dcatus_job, create_client):
""" download dcat-us json file and store result in s3 bucket.
get_dcatus_job (dict) : fixture containing job data
Expand Down
4 changes: 3 additions & 1 deletion tests/validate/dcatus/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import pytest
from pathlib import Path

import pytest

from datagovharvester.utils.json_utilities import open_json

BASE_DIR = Path(__file__).parents[3]
Expand Down

1 comment on commit 4f6554a

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCoverMissing
datagovharvester
   __init__.py30100% 
datagovharvester/extract
   __init__.py1922 89%
   dcatus.py1122 82%
   utils.py1644 75%
datagovharvester/utils
   __init__.py00100% 
   json_utilities.py722 71%
   s3_utilities.py1544 73%
datagovharvester/validate
   __init__.py00100% 
   dcat_us.py240100% 
TOTAL951485% 

Tests Skipped Failures Errors Time
16 0 💤 0 ❌ 0 🔥 20.992s ⏱️

Please sign in to comment.