Skip to content

Conversation

@Carmine12328
Copy link

No description provided.

lib/cfg.py Outdated
logger.info("Root path %s\n" % root_path)

wk_config = ConfigParser.RawConfigParser()
print("Sono qui%s" %(workspace_file_path))
Copy link
Owner

Choose a reason for hiding this comment

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

Le print di debug non si committano, se sono messaggi utenti o che hanno senso che rimangono usare il logger.

lib/cfg.py Outdated
merge_file_itemNoPath = os.path.join(file_to_merge_path,bom_name)+ '.csv'

print(os.path.exists(merge_file_item))
print(os.path.exists(merge_file_itemNoPath))
Copy link
Owner

Choose a reason for hiding this comment

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

come sopra

lib/cfg.py Outdated
bom_name = "%s%s%s" % (bom_prefix, basename, bom_postfix)
path_file = os.path.join(file_to_merge_path, basename)
merge_file_item = os.path.join(path_file, bom_name) + '.csv'
merge_file_itemNoPath = os.path.join(file_to_merge_path,bom_name)+ '.csv'
Copy link
Owner

Choose a reason for hiding this comment

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

Per il coding style fare riferimento al PEP8. https://www.python.org/dev/peps/pep-0008/

# ricerca file del progetto a cui fare il merge e messi in una lista
bom_name = "%s%s%s" % (bom_prefix, basename, bom_postfix)
path_file = os.path.join(file_to_merge_path, basename)
merge_file_item = os.path.join(path_file, bom_name) + '.csv'
Copy link
Owner

Choose a reason for hiding this comment

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

Il programma deve funzionare sia con i csv che con i file excel. Per sapere quando siamo in un caso o in un altro utilizzare la variabile csv_file

Copy link
Owner

Choose a reason for hiding this comment

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

Aggiunger un test specifico per i due casi, creando dentro la cartella test un workspace completo (vedi altri file nei test) e aggiungere due progetti uno con csv e uno con excel.

lib/cfg.py Outdated
print("NO")
logger.error("Warning empty parameters\n")
else:
print("OK")
Copy link
Owner

Choose a reason for hiding this comment

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

come sopra togliere le print.

lib/lib.py Outdated
sys.exit(1)
return ", ".join(d)

def oreder_footprint(ref_str,logger):
Copy link
Owner

Choose a reason for hiding this comment

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

Ti sei scordato funzioni a giro che non usi anche con errori.. togliere.
PS: dopo la virgola si mette uno spazio..

merge_test.py Outdated
suite.addTest(TestMergeBom("test_stats"))
suite.addTest(TestMergeBom("test_notPopulate"))
suite.addTest(TestMergeBom("test_otherColumn"))
#suite.addTest(TestMergeBom("test_otherColumn"))
Copy link
Owner

Choose a reason for hiding this comment

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

Anche questo test deve funzionare..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants