Extract NodeTagging concern from Node model#11864
Conversation
Move all tag-related instance methods from Node (1192 lines) into a dedicated NodeTagging concern (314 lines), reducing Node to 913 lines. Extracted methods: - Tag querying: has_power_tag, power_tag, power_tags, power_tag_objects, has_tag, has_tag_without_aliasing, get_matching_tags_without_aliasing, normal_tags, location_tags, tags, node_tags, tagnames, tagnames_as_classes - Tag mutation: add_tag, add_barnstar, can_tag, tag_activity - Tag-based features: has_mailing_list?, mailing_list, barnstar, barnstars, responded_to, responses, response_count, decimals, delete_coord_attribute This is a pure refactoring — no logic changes. All methods are included back into Node via 'include NodeTagging'. Part of publiclab#956 (Deprecate Drupal legacy database structures/naming)
|
Based on the details of each failing check, the tests aren't failing because of our code changes, they're failing because the CI workflow uses deprecated GitHub Actions (actions/upload-artifact: v2 was sunset). This is a pre-existing issue that affects all PRs on the repo, not just ours. |
|
The unit-tests actually passed — all 323 tests, 915 assertions, 0 failures, 0 errors, 0 skips. The job failed because of a Codecov rate limit during the coverage upload step at the very end: This is an infrastructure issue with the upstream repo's Codecov configuration (no upload token set), not related to our code changes. The Codecov gem raises a StandardError on upload failure, which causes the non-zero exit code. This isn't something we can fix in our PR — the upstream maintainers would need to either add a CODECOV_TOKEN secret or make the upload non-blocking. |
|
If it is possible, I'd love to help refactor the existing CI and workflow separately so that we could get this community project up and rolling again, updating depreciated tools and workflows, but I'd need to be able to have maintainer permissions. I have experience working as a software engineer in test engineering at an enterprise data storage company and am passionate about environmental health. I've been trying to get more involved in open source and I think this would be a great project to help maintain. |
Move all tag-related instance methods from Node (1192 lines) into a dedicated NodeTagging concern (314 lines), reducing Node to 913 lines.
Extracted methods:
This is a pure refactoring — no logic changes. All methods are included back into Node via 'include NodeTagging'.
Part of #956 (Deprecate Drupal legacy database structures/naming)
Fixes #0000
Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!
rake test@publiclab/reviewersfor help, in a comment below