Easy $50 for an Ace Python programmer

  • Durum: Closed
  • Ödül: $50
  • Alınan Girdiler: 2
  • Kazanan: pythonleo

Yarışma Özeti

I need a Python script written (Python 3) that can compare two KiCad netlists to determine whether they are equivalent, and if they are not, to output a detailed list of differences between them. If you are an experienced Python coder, I should think you would be able to bang this out in 2 or 3 hours.

One of the attached files is a netlist in KiCad format. If you examine the file with a text editor, you will see that it lists 625 components, 497 nets, and 2103 nodes. The Python script must take as input two such files, read them into local variables, and parse through them to confirm a 1:1 correspondence between the components, nets, and nodes of the two files. Each discrepancy must be reported in a descriptive line of text to the standard output.

The other attachment is a text file describing this project in more detail.

How to Win This Contest

1. Your program must work. It must correctly report that two equivalent netlist files are in fact, equivalent. If the two netlist files being compared are not equivalent, your program must accurately report all inconsistencies between the two files in a format that is easy to understand. This is the minimum requirement. If at least one entry meets this criterion, then I fully intend to fund the award.

2. Your program should execute in a reasonable amount of time. I don't want to wait hours for the program to do its job.

3. If multiple submitted entries all produce correct results, then the entrants will be judged based on the use of good coding practice. I am a Python novice, but a veteran C/C++ programmer, and know about software best practices. Code should have clear, meaningful comments to help me understand how your program works. I will prefer object-based code over procedural code.

Deliverables:

- Your Python script
- Netlists you created for the purpose of testing your script
- A secondary Python script that was used to create the test netlist(s), if you wrote one

Aranan Beceriler

İşveren Geribildirimi

“Pythonleo wrote for me a Python script that compares two arbitrary netlists for equivalence. He was open and collaborative, and enthusiastic about the project. He shared interim versions of his code with me, to allow me to test and evaluate it, and give him further direction. The end product did exactly what I needed.”

Profil Görüntüsü Sifferman, United States.

Genel Açıklama Panosu

  • urosjarc
    urosjarc
    • 7 yıl önce

    #increaseprize

    • 7 yıl önce
  • ankurs13
    ankurs13
    • 7 yıl önce

    #increaseprize #guaranteed please

    • 7 yıl önce
    1. Sifferman
      Yarışma Sahibi
      • 7 yıl önce

      The contest is guaranteed now.

      • 7 yıl önce
  • ankurs13
    ankurs13
    • 7 yıl önce

    Also, can you provide two sample files with matching (but different) and non-matching content?

    • 7 yıl önce
    1. Sifferman
      Yarışma Sahibi
      • 7 yıl önce

      Done.

      • 7 yıl önce
  • pythonleo
    pythonleo
    • 7 yıl önce

    Hello, I'm almost finished, but I have an issue.
    In the requirements it's said that:
    "For a given net in the first input file, the matching net in the second input file will have the
    same list of nodes, but a different "code" and a different "name". Therefore, the script will need to determine whether two nets are the same by comparing only their lists of nodes".

    We can't compare the code and name variables, but we also can't compare lists of nodes for a full match, because some of the nodes might be deleted. Therefore, we can only match nets from different files by an approximate match.

    It means that for each net from file_A we will look at every net from file_B to determite which one is a potential match... Algorithmically, this is a O(n^2) solution, which isn't very good.
    I'll implement it anyway, but I hope there's some other way.

    • 7 yıl önce
    1. Sifferman
      Yarışma Sahibi
      • 7 yıl önce

      For my use case, I would expect most nets to be correct. So usually you can pick a node from file 1, and find the matching net from file 2 in O(n). Sometimes, though, the net won't be found for the given node, or the node will be on an incorrect net. Those (hopefully) few nets will require more processing to determine what's wrong.

      • 7 yıl önce
  • Sifferman
    Yarışma Sahibi
    • 7 yıl önce

    Please make sure your program produces the same results regardless of the order of the two files on the command line. It doesn't matter if the order of the text in the output is different, as long as every problem is discovered.

    • 7 yıl önce
  • Sifferman
    Yarışma Sahibi
    • 7 yıl önce

    Hi everyone, I've uploaded three more netlist files for you to use in testing your code. Use these to compare with Netlist1.net.

    Netlist4_equivalent.net adds some fields. Your program should be able to work in the presence of these extra fields, but otherwise ignore them.

    I've also changed the contest to Guaranteed.

    Good luck!

    • 7 yıl önce
  • urosjarc
    urosjarc
    • 7 yıl önce

    Update regarding entry #2 which is now #3. Previous created script was corrupted and with errors, after detailed examination I deleted previous script, fix edge errors, improve parsing script, check project with hardcore pylint checkings and created extensive documentation. Current script is now working faster. The screen shot was created with 2 Netlist files located on my portfolio page, in (KiCad file parser).

    Contact me (urosjarc) over private msg for more informations...

    • 7 yıl önce

Daha fazla yorum göster

Yarışmalara nasıl başlanır

  • Projenizi ilan edin

    Yarışmanızı İlan Edin Hızlı ve kolay

  • Tonlarca girdi alın

    Tonlarca Girdi Alın Bütün dünyadan

  • En iyi girdiyi seçin

    En iyi girdiyi seçin Dosyaları indirin - Kolay!

Şimdi bir Yarışma İlan Et ya da Bugün Bize Katılın!