Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Bug of Parameters Controls in cfg_altiumWorkspace and add Feature Group componets for footprint size(with test) #24

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Carmine12328
Copy link

No description provided.

lib/cfg.py Outdated
@@ -300,6 +302,7 @@ def cfg_altiumWorkspace(workspace_file_path, csv_file, bom_search_dir,
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
@@ -348,23 +351,35 @@ def cfg_altiumWorkspace(workspace_file_path, csv_file, bom_search_dir,
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/

@@ -348,23 +351,35 @@ def cfg_altiumWorkspace(workspace_file_path, csv_file, bom_search_dir,
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
@@ -35,6 +35,11 @@ def order_designator(ref_str, logger):
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 Show resolved Hide resolved
merge_test.py Outdated Show resolved Hide resolved
merge_test.py Outdated
@@ -844,7 +913,8 @@ def test_cliCSV(self):
suite.addTest(TestMergeBom("test_mergedFile"))
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.

None yet

2 participants