Skip to content

Add model to validate the placement block - #87

Open
woodtp wants to merge 4 commits into
pals-project:mainfrom
woodtp:implement-placement-parameters
Open

Add model to validate the placement block#87
woodtp wants to merge 4 commits into
pals-project:mainfrom
woodtp:implement-placement-parameters

Conversation

@woodtp

@woodtp woodtp commented Aug 19, 2026

Copy link
Copy Markdown

Adds a PlacementParameters model according to the standard and incorporates it into the BaseElement.

PlacementParameters defines four fields: offset, to_point, base_item, and from_point. A ValidationError is raised when:

  • offset is not a finite number, such as a string, inf or nan
  • to_point or from_point is not one of ENTRANCE_END, CENTER, EXIT_END, or ZERO_POINT.

I placed the corresponding tests in separate classes to make it easier to run only the tests relevant to these additions.

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