From 7f47cb371ff43bc7ec957cf52410f6ef12c2ee29 Mon Sep 17 00:00:00 2001 From: India Kerle Date: Wed, 8 May 2024 17:09:01 +0100 Subject: [PATCH] fix formatting --- ojd_daps_skills/extract_skills/extract_skills_utils.py | 1 + ojd_daps_skills/extract_skills/multiskill_rules.py | 1 + .../map_skills/format_taxonomy/lightcast_formatting.py | 8 ++++---- ojd_daps_skills/map_skills/skill_mapper.py | 6 +++--- ojd_daps_skills/utils/text_cleaning.py | 1 + 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/ojd_daps_skills/extract_skills/extract_skills_utils.py b/ojd_daps_skills/extract_skills/extract_skills_utils.py index 2259e4a0..ddb7298d 100644 --- a/ojd_daps_skills/extract_skills/extract_skills_utils.py +++ b/ojd_daps_skills/extract_skills/extract_skills_utils.py @@ -2,6 +2,7 @@ Utility functions and a configuration manager for extracting skills from job descriptions. """ + import os from typing import List, Optional diff --git a/ojd_daps_skills/extract_skills/multiskill_rules.py b/ojd_daps_skills/extract_skills/multiskill_rules.py index c5aeb233..1fb83cfb 100644 --- a/ojd_daps_skills/extract_skills/multiskill_rules.py +++ b/ojd_daps_skills/extract_skills/multiskill_rules.py @@ -1,6 +1,7 @@ """ Phrase splitting rules for multi-skill phrases. """ + import re from typing import List diff --git a/ojd_daps_skills/map_skills/format_taxonomy/lightcast_formatting.py b/ojd_daps_skills/map_skills/format_taxonomy/lightcast_formatting.py index 46235819..769e4cd6 100644 --- a/ojd_daps_skills/map_skills/format_taxonomy/lightcast_formatting.py +++ b/ojd_daps_skills/map_skills/format_taxonomy/lightcast_formatting.py @@ -155,10 +155,10 @@ def remove_bad_hierarchy_levels(hierarchy_levels): lightcast_formatted = pd.concat( [all_skills, category_skills, subcategory_skills] ).reset_index(drop=True) - lightcast_formatted[ - "hierarchy_levels" - ] = lightcast_formatted.hierarchy_levels.apply(map_subcategory_ids).apply( - remove_bad_hierarchy_levels + lightcast_formatted["hierarchy_levels"] = ( + lightcast_formatted.hierarchy_levels.apply(map_subcategory_ids).apply( + remove_bad_hierarchy_levels + ) ) lightcast_formatted = lightcast_formatted.query("description.notna()").query( 'description != "NULL"' diff --git a/ojd_daps_skills/map_skills/skill_mapper.py b/ojd_daps_skills/map_skills/skill_mapper.py index 488dc55e..3f56dd1b 100644 --- a/ojd_daps_skills/map_skills/skill_mapper.py +++ b/ojd_daps_skills/map_skills/skill_mapper.py @@ -219,9 +219,9 @@ def map_skills(self, job_ads: List[Doc]) -> List[Dict[str, Any]]: high_hier_codes += [hier_level] * round(sim_score * 10) high_tax_skills_results = {} for hier_level in range(self.config.taxonomy_config["num_hier_levels"]): - high_tax_skills_results[ - "most_common_level_" + str(hier_level) - ] = get_most_common_code(high_hier_codes, hier_level) + high_tax_skills_results["most_common_level_" + str(hier_level)] = ( + get_most_common_code(high_hier_codes, hier_level) + ) if high_tax_skills_results: match_results["high_tax_skills"] = high_tax_skills_results diff --git a/ojd_daps_skills/utils/text_cleaning.py b/ojd_daps_skills/utils/text_cleaning.py index a5beb0f1..d40158bf 100644 --- a/ojd_daps_skills/utils/text_cleaning.py +++ b/ojd_daps_skills/utils/text_cleaning.py @@ -1,6 +1,7 @@ """ Text cleaning utilities for the skills extraction pipeline. """ + import re from hashlib import md5