Skip to content

Some backend changes to clean up the code

Compare
Choose a tag to compare
@jgostick jgostick released this 27 Apr 19:29

Almost all changes in this minor release are back-end fixes, or were at least implemented in a backwards compatible way. Looking at the length of this list makes me realize that we should be doing minor version bumps more often!

⚠️ API changes (backend)

  • set_locations was removed from Core and moved to Base.Tools as a new class. This functionality is now added to GenericGeometry and GenericPhysics via composition, so they still have a set_locations method, but Phase and Network objects do not.
  • Codecov is now working again
  • Test coverage was increased by 2%
  • Object handles are now stored in dicts rather than lists, so you can access them by name (geom.phases['air']) and also iterate on the dict (pn.phases.values()). This was implemented in a backwards compatible way so geom.phases() and geom.phases('air') still work as they used to...of course using the dict syntax is encourage henceforth.
  • Several private methods were removed that were never called by the code
  • The check_network_health method now finds duplicate throats in a more robust and reliable way
  • Loading simulations from a pnm file now registers objects with the Controller properly
  • The tools located under Utilities.topology have been moved to Network.tools, but wrapper methods were left in the old location for backward compatibility.
  • Many little tweaks in PR #547
  • Changed many print statements to logger messages
  • Added a mode argument to num_neighbors so you can count neighbors that meet given criteria