batfish / pybatfish

Python client for Batfish: https://github.com/batfish/batfish
Apache License 2.0
214 stars 52 forks source link

pybatfish: delete legacy default session #907

Closed dhalperi closed 4 months ago

dhalperi commented 4 months ago

It's been long enough that we can delete bf_session, bf_q, and the like. This is now leading to confusion as folks who customize the sessions are surprised when the default session is used instead.

This is a breaking change:

  1. Add missing helpers for network_object to session
  2. Delete command and extended commands files. Commands is the one that contained the default bf_session.
  3. Fixup some other code and tests to use real sessions, also adding some missing or wrong type annotations as they messed me up.
  4. Delete bfq also, but keep the docs working. Fix a few old incorrect references. (e.g., to documentation paths that are no longer there.)

Stack:

⚠️ Part of a stack created by spr. Do not merge manually using the UI - doing so may have unexpected results.

batfish-bot commented 4 months ago

This change is Reviewable

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 59.25926% with 22 lines in your changes missing coverage. Please review.

Project coverage is 84.90%. Comparing base (4a21ca3) to head (2fd847a).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #907 +/- ## ========================================== - Coverage 85.57% 84.90% -0.67% ========================================== Files 29 26 -3 Lines 3985 3875 -110 Branches 819 819 ========================================== - Hits 3410 3290 -120 - Misses 430 431 +1 - Partials 145 154 +9 ``` | [Files](https://app.codecov.io/gh/batfish/pybatfish/pull/907?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=batfish) | Coverage Δ | | |---|---|---| | [pybatfish/client/restv2helper.py](https://app.codecov.io/gh/batfish/pybatfish/pull/907?src=pr&el=tree&filepath=pybatfish%2Fclient%2Frestv2helper.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=batfish#diff-cHliYXRmaXNoL2NsaWVudC9yZXN0djJoZWxwZXIucHk=) | `68.67% <100.00%> (-1.51%)` | :arrow_down: | | [pybatfish/client/session.py](https://app.codecov.io/gh/batfish/pybatfish/pull/907?src=pr&el=tree&filepath=pybatfish%2Fclient%2Fsession.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=batfish#diff-cHliYXRmaXNoL2NsaWVudC9zZXNzaW9uLnB5) | `77.14% <100.00%> (+1.38%)` | :arrow_up: | | [pybatfish/datamodel/referencelibrary.py](https://app.codecov.io/gh/batfish/pybatfish/pull/907?src=pr&el=tree&filepath=pybatfish%2Fdatamodel%2Freferencelibrary.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=batfish#diff-cHliYXRmaXNoL2RhdGFtb2RlbC9yZWZlcmVuY2VsaWJyYXJ5LnB5) | `98.13% <100.00%> (ø)` | | | [pybatfish/question/question.py](https://app.codecov.io/gh/batfish/pybatfish/pull/907?src=pr&el=tree&filepath=pybatfish%2Fquestion%2Fquestion.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=batfish#diff-cHliYXRmaXNoL3F1ZXN0aW9uL3F1ZXN0aW9uLnB5) | `81.37% <ø> (-1.26%)` | :arrow_down: | | [pybatfish/client/asserts.py](https://app.codecov.io/gh/batfish/pybatfish/pull/907?src=pr&el=tree&filepath=pybatfish%2Fclient%2Fasserts.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=batfish#diff-cHliYXRmaXNoL2NsaWVudC9hc3NlcnRzLnB5) | `83.07% <8.33%> (-8.85%)` | :arrow_down: |