Skip to content

Pr taxon menu#13

Closed
synrg wants to merge 81 commits into
mainfrom
PR-taxon-menu
Closed

Pr taxon menu#13
synrg wants to merge 81 commits into
mainfrom
PR-taxon-menu

Conversation

@synrg
Copy link
Copy Markdown
Contributor

@synrg synrg commented Aug 3, 2025

In support of dronefly-garden/dronefly#210

A non-exhaustive list of steps to get this PR in shape for use in the bot code, as it is currently far from complete:

  • Make a PlaceCount class based on pyinat UserCount class
  • Generalize the add command to work with taxon menus that have place counts, not just user counts
  • Fully implement handling of other parts of query (id by, etc.) in taxon & add commands.
  • Firm up the Command abstraction so it can be used by all clients, not just dronefly-cli
  • Make menu classes that can be used by all clients and attach any actions (in Dronefly bot these are the buttons) to them
  • Populate the menu classes with any menu concerns currently on ctx (e.g. current page# & formatter), leaving only the currently active menu attached to ctx instead
  • Blocked by query: rework as attrs-based model #1
  • Write developer doc for how to create a new core command with a menu

synrg added 30 commits February 15, 2025 12:46
- i.e. obs/spp by, ids by, unobserved by, etc. are actually counted, not taxa
- also support taxon counts by arbitrary user
- no str support needed
- test now expects header
- move outside class, as no access to self needed
- eliminate nested `with…client`
synrg added 27 commits October 19, 2025 10:51
- core taxon command now shows the count of observations qualified
  by additional query arguments, if applicable, matching the behaviour
  of the bot taxon command
- qualified taxon counts are only of verifiable obs unless for a single user
- when creating a counts formatter from a query, omit the unused client
  parameter
- hardwire counts source pagination to be 15 names per page for now
  as we don't yet parameterize it (probably belongs in the menu constructor)
- `.countable` property now may also be for `.id_by` or `.unobserved_by`,
  not just `.user` or `.place`
- new properties:
  - `.countable_name` is the name of the attribute to count
  - `.countable_value` is the value to count
@synrg
Copy link
Copy Markdown
Contributor Author

synrg commented Jan 25, 2026

Enough of the work has been merged back into devel branch to support inatcog that this PR can now be closed. Unfinished ideas in the checklist should have their own issues.

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

Successfully merging this pull request may close these issues.

1 participant