Skip to content

Remove behaviours from Tool model#629

Merged
AdrianDAlessandro merged 3 commits intomainfrom
remove-behaviours
Mar 13, 2026
Merged

Remove behaviours from Tool model#629
AdrianDAlessandro merged 3 commits intomainfrom
remove-behaviours

Conversation

@AdrianDAlessandro
Copy link
Copy Markdown
Collaborator

Description

Relatively straightforward. We have decided that behaviours should not be in the Tool model. So this PR removes them. The migration removes all instances of them from the database too.

I also noticed that using the Import behaviour in the admin interface allowed for invalid choices for Tool.kind. So I added a clean_fields call to the save method, which has caught that. This will prevent kind being mistakenly assigned to "behaviour" with old data.

Fixes #621

Type of change

  • Documentation (non-breaking change that adds or improves the documentation)
  • New feature (non-breaking change which adds functionality)
  • Optimization (non-breaking, back-end change that speeds up the code)
  • Technical work (non-breaking, change which is work as part of a new feature)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (whatever its nature)

Key checklist

  • All tests pass (eg. python -m pytest)
  • The documentation builds and looks OK (eg. mkdocs serve)
  • Pre-commit hooks run successfully (eg. pre-commit run --all-files)

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added or an issue has been opened to tackle that in the future. (Indicate issue here: # (issue))

@AdrianDAlessandro AdrianDAlessandro marked this pull request as ready for review March 12, 2026 18:39
Copy link
Copy Markdown
Contributor

@Sahil590 Sahil590 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM just tests need fixing

@AdrianDAlessandro AdrianDAlessandro merged commit f4f7e40 into main Mar 13, 2026
4 checks passed
@AdrianDAlessandro AdrianDAlessandro deleted the remove-behaviours branch March 13, 2026 15:57
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

Remove behaviours from the Tool model

2 participants