gdsfactory / kfactory

gdsfactory with a klayout backend
https://gdsfactory.github.io/kfactory/
MIT License
34 stars 13 forks source link

3 tests failing #511

Open fedeinthemix opened 2 weeks ago

fedeinthemix commented 2 weeks ago

Describe the bug

Running the tests I get the following 3 errors:

=========================== short test summary info ============================
FAILED tests/test_pdk.py::test_merge_read_shapes - AttributeError: 'YAML' object has no attribute 'dumps'. Did you mean: 'dump'?
FAILED tests/test_pdk.py::test_merge_read_instances - AttributeError: 'YAML' object has no attribute 'dumps'. Did you mean: 'dump'?
FAILED tests/test_pdk.py::test_merge_properties - AttributeError: 'YAML' object has no attribute 'dumps'. Did you mean: 'dump'?
================== 3 failed, 1453 passed in 98.46s (0:01:38) ===================

Expected behavior I expect all tests to pass.

Desktop (please complete the following information):

Additional context

I'm using:

sebastian-goeldi commented 2 weeks ago

Would it be possible to get the detailed error parts of pytest?

I know what the error is (a YAML from ruamel.yaml without the string extension loaded in, i.e. no YAML(typ=["str"])), but I am a bit confused why for these tests it's reaching a point where it would need the yaml dumper.

fedeinthemix commented 2 weeks ago

Here the full build log including tests

kfactory_tests.log

sebastian-goeldi commented 2 weeks ago

Ah, I think I know where the error is coming from.

'kfactory:ports:1' MetaInfo differs between existing '{'cross_section': 'eac2d666_1000', 'info': {}, 'name': 'o2', 'port_type': 'optical', 'trans': <klayout.dbcore.Trans object at 0x7ffe95b63410>}' and loaded '{'cross_section': '5d8f70ac_1000', 'info': {}, 'name': 'o2', 'port_type': 'optical', 'trans': <klayout.dbcore.Trans object at 0x7ffe95b634a0>}'

This tells me that the hashes do not evaluate to the same value. I suspect it's the LayerInfo object. What I don't understand is why it works on debian (and arch to my knowledge) with no problem

Nvm it must be the cross_section. I don't fully understand yet why you are getting different cross sections for the two