Skip to content

Commit

Permalink
fix black formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack-Vines committed Jul 9, 2024
1 parent 2d3ea01 commit 0f9e570
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 5 additions & 3 deletions ojd_daps_skills/extract_skills/extract_skills.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def extract_skills(self, job_ads: Union[str, List[str]]) -> List[Doc]:

# map skills function

def get_skills(self, job_ad: str, min_length: int=75) -> Doc:
def get_skills(self, job_ad: str, min_length: int = 75) -> Doc:
"""Return a spaCy Doc object with entities
and split 'SKILL' spans.
Expand Down Expand Up @@ -103,9 +103,11 @@ def get_skills(self, job_ad: str, min_length: int=75) -> Doc:
for rule in rules:
split_ent = rule(ent)
if split_ent:
all_skill_ents += split_ent # Add the list of split skills
all_skill_ents += (
split_ent # Add the list of split skills
)
split_found = True
break # stop going through rules
break # stop going through rules
if not split_found:
# else, if no split, append the original entity
all_skill_ents.append(ent)
Expand Down
4 changes: 3 additions & 1 deletion ojd_daps_skills/utils/download_public_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ def download_data():
key = "escoe_extension/ojd_daps_skills_data_refactor.zip"

try:
s3.download_file(bucket_name, key, f"{str(PUBLIC_DATA_FOLDER_PATH)}_refactor.zip")
s3.download_file(
bucket_name, key, f"{str(PUBLIC_DATA_FOLDER_PATH)}_refactor.zip"
)

with ZipFile(f"{PUBLIC_DATA_FOLDER_PATH}_refactor.zip", "r") as zip_ref:
zip_ref.extractall(PROJECT_DIR)
Expand Down

0 comments on commit 0f9e570

Please sign in to comment.