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

Code standard + Documentation #1038

Closed
cfrademan opened this issue Jun 28, 2021 · 2 comments
Closed

Code standard + Documentation #1038

cfrademan opened this issue Jun 28, 2021 · 2 comments

Comments

@cfrademan
Copy link

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
When can you guys structure the code in a mature way? Its hard to read, and doesnt follow typical python practices. I am contemplating writing my own BGP interface now due to this.

Describe the solution you'd like
Write decent documentation relevant to version, and proper unit testing with decent code.. use python entry points, clear implementation of the BGP state machine.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@thomas-mangin
Copy link
Member

TLDR; I welcome your new python BGP project, I wish you all the best with it, let's speak again when you have spent a few hundred/thousand hours on it.

@cfrademan Hi there,

I came from a non-python background and when I started programming in Python PEP8 (end of 1999, start of 2000) was not yet a thing. I kept that coding style for many years and did not feel like changing the whole code when PEP8 took on, that was how we coded as "a team". Since then the python coding style solidified a lot, and that is why we now use black to get a bit back in line. As the tooling for static error checking in python is quite lacking, I would rather rewrite the code in Go than start to use annotation to fix the issue. So the style is there to stay.

There is some unit test and functional testing, surely more would be good but I have a life and what is there does a correct job. If you are desperate to see some improvements or documentation, you can help.

The code has entry points. I am happy with them, if can think of a way to improve them, I will gladly consider a patch.

If you think the implementation of the BGP state machine is bad, I will invite you to slowly read and fully understand it. Also study the code of Bird, Quagga, GoBGP, CoreBGP and BioRouting. The BGP state machine is not the panacea you may believe it is when first reading RFC 4271, but obviously this knowledge will only come after spending time implementing the RFC. If you have to only pick one, I would recommend BioRouting.
https://github.com/Exa-Networks/exabgp/wiki/Other-OSS-BGP-implementations

I will be keeping an eye on https://github.com/cfrademan/bgpd and will provide you with quality feedback as soon as it does establish a connection with a peer and implements RFC 4271 fully.

I wish you good luck!

@thomas-mangin
Copy link
Member

I will also change your insulting title to something less abrasive for my ego

@thomas-mangin thomas-mangin changed the title Poor code standard + Documentation Code standard + Documentation Jun 29, 2021
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

No branches or pull requests

2 participants