CodeForPhilly / CodeForPhilly/stately

context.events should use dot notation

Open
#42 0 comments 0 reactions 0 assignees View on GitHub
api
Dominant language
Python
Stars
22
Forks
5
PR merge metrics
No merged PRs in 30d

Description

Ideally we'd be able to do something like this:

``` python
event_names = [event.action.name for event in events]
if 'Approve Taxes' in event_names and 'Approve Parking' in event_names:
change_state('Approved')
```

But currently we have to use:

``` python
event_names = [event['action']['name'] for event in events]
```

Not a huge deal, just easier to write.
Related to #20

Contributor guide

No contributing guide indexed for this repository

Research direction

No file, test, or entry point is named. Start by tracing how context.events is constructed and consumed, then identify the existing tests for event access; done means supporting the shown dot-notation example without breaking current dictionary-style access.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.