• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

SEED-platform / seed / #9422
24%

Build:
DEFAULT BRANCH: develop
Ran 12 Aug 2026 09:22PM UTC
Jobs 1
Files 785
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Aug 2026 08:48PM UTC coverage: 24.517% (-0.02%) from 24.533%
#9422

push

coveralls-python

web-flow
Optimize cross-cycles queries (properties_across_cycles / taxlots_across_cycles) (#5295)

Both functions ran a separate PropertyView/TaxLotView query plus a separate
TaxLotProperty.serialize() call per requested cycle_id, and re-fetched the
(unchanging) Organization row inside that same per-cycle loop. serialize()
itself issues several `__in` batch queries internally (meter counts, note
counts, merged-state audit log lookups, access-level-instance paths, related
tax lot/property joins), so selecting N cycles multiplied all of that work by
N instead of running it once - the more cycles a user selects in the Cross
Cycles UI (the feature this code exists for), the more redundant work was
done for no benefit.

Both functions now:
- fetch every -View across all requested cycles in a single query
  (cycle_id__in=cycle_ids) and run serialize() once for the whole batch, then
  group the already-serialized rows back out by the view's own cycle_id
- fetch the Organization row once instead of once per cycle
- normalize cycle_ids to int up front so the pre-initialized per-cycle result
  keys always match the cycle_id values read back from the database

The endpoint's request/response shape is unchanged (still a dict keyed by
cycle_id, each value a list of serialized records) - this is a pure
performance change, verified with the existing filter_by_cycle tests plus new
multi-cycle test cases (a record linked across multiple cycles, one existing
in only one of them) for both properties and tax lots, and the
match_merge_link preview tests that also call these functions. Full
test_property_views/test_taxlot_views/test_match_existing suites (143 tests)
pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

2 of 54 new or added lines in 4 files covered. (3.7%)

12434 of 50715 relevant lines covered (24.52%)

0.25 hits per line

Uncovered Changes

Lines Coverage ∆ File
15
8.7
-0.03% seed/tests/test_property_views.py
15
9.88
-0.11% seed/tests/test_taxlot_views.py
11
13.28
-0.43% seed/utils/properties.py
11
16.67
-3.33% seed/utils/taxlots.py
Jobs
ID Job ID Ran Files Coverage
1 #9422.1 12 Aug 2026 09:22PM UTC 785
24.52
Source Files on build #9422
  • Tree
  • List 785
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 34d123b9 on github
  • Prev Build on develop
  • Next Build on develop
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc