Skip to content

Conversation

@calumbell
Copy link
Contributor

Description

This PR adds in missing contextual information to the CreatureAction V2 model about the order in which to display actions in a creature's statblock. This data is encoded in the order property, which is an integer that represents the position in the actions/bonus actions/reactions/legendary actions list it appears.

The bulk of the work undertaken was in writing a Python script for scraping the V1 data, extracting the ordering information, and adding it to the V2 data.

Related Issue

Closes #667

How was this tested

This fix was primarily tested by spot checking the data, either looking directly at the JSON data, or poking around the /v2/creatures endpoint on a Django test server.

Tests were run via pytest, and after test cases were updated to reflect the new shape of the API response all were passing

@calumbell calumbell merged commit 72195bd into open5e:staging Apr 14, 2025
3 checks passed
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.

V2: preserve order of CreatureActions in statblock

2 participants