Create modular network fixtures for opts testing
I really like the `base_network()` fixture, but wonder too much is included in it? Carriers that are here, but only used in some constraints (ie. `nuclear`), component interactions that shouldnt happen are included (ie. lines and links both being used for power transfer), attributes that are only used for particular constraints are included globally (ie. `land_area`), ect.
This can be an issue as then we are not isolating each test. For example, (a fictional case could be) if a constraint uses a shared function to check that component names are defined correctly and there is an issue with how a line is defined. All tests would fail cause lines are always included in the base network. However, if running a transport model, these tests should pass as lines are replaced with links. This can make diagnosing the problem harder. (I do concede that is is a fairly extreme edge case 😅)
Would it be better to have like a high level base_network() that has only components that are shared across all network configurations (ie. snapshots, buses, loads)? Then we can have a few "sub" base networks. For example, one that is transport or not transport; one that is electrical only vs sector (where, for example some generators are replaced with links); ect?
Or maybe the base network is literally a 1, 2, or 3 node network that only defines the snapshots and buses. Then each constraint adds in exactly what it needs? ie. for some constraints, we dont even need multi-node networks, or storage units?
Or is this creating too much structure?
Originally posted by @trevorb1 in https://github.com/PyPSA/pypsa-usa/pull/592#discussion_r2069229457
Per @trevorb1 suggestion, I will create multiple modular test network fixtures that can be used to catch edge cases for each set of opts testing. This is to avoid having one or few test networks that are loaded with extra data.