18F/State-TalentMAP-API

View on GitHub
talentmap_api/integrations/synchronization_helpers.py

Summary

Maintainability
C
1 day
Test Coverage

Showing 4 of 4 total issues

File synchronization_helpers.py has 427 lines of code (exceeds 250 allowed). Consider refactoring.
Open

'''
This file contains a variety of helper functions for data synchronization
'''
 
from requests import Session
Severity: Minor
Found in talentmap_api/integrations/synchronization_helpers.py - About 6 hrs to fix

    Function mode_cycle_positions has a Cognitive Complexity of 33 (exceeds 7 allowed). Consider refactoring.
    Open

    def mode_cycle_positions(last_updated_date=None):
    # Set the appropriate use_last_updated string
    use_last_updated_string = ""
    if last_updated_date is not None:
    use_last_updated_string = f"<LAST_DATE_UPDATED>{last_updated_date}</LAST_DATE_UPDATED>"
    Severity: Minor
    Found in talentmap_api/integrations/synchronization_helpers.py - About 4 hrs to fix

    Function get_soap_client has a Cognitive Complexity of 12 (exceeds 7 allowed). Consider refactoring.
    Open

    def get_soap_client(cert=None, soap_function="", test=False):
    '''
    Creates a properly initialized SOAP client, with unit testing support
     
    Args:
    Severity: Minor
    Found in talentmap_api/integrations/synchronization_helpers.py - About 1 hr to fix

    Function mode_cycles has a Cognitive Complexity of 10 (exceeds 7 allowed). Consider refactoring.
    Open

    def mode_cycles(last_updated_date=None):
    # Request data
    soap_arguments = {
    "RequestorID": "TalentMAP",
    "Action": "GET",
    Severity: Minor
    Found in talentmap_api/integrations/synchronization_helpers.py - About 45 mins to fix

    There are no issues that match your filters.

    Category
    Status