Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEV-1035: Add support for skipping nodes during tagging/versioning #380

Merged
merged 9 commits into from May 31, 2022

Conversation

kulgan
Copy link
Contributor

@kulgan kulgan commented May 13, 2022

Add implementation that ignores nodes with certain values for certain fields while generating a tag. These fields are configured via the dictionary. A sample configuration is also included for testing purposes.

  • Adds is_taggable method to every node that supports versioning. This returns true only if a tag can be generated for the node
  • Omit tag generation for nodes with is_taggable false
  • Also omit parent nodes with is_taggable false while generating tag for child nodes

@kulgan kulgan marked this pull request as ready for review May 17, 2022 18:05
Copy link
Member

@mpsolano mpsolano left a comment

Choose a reason for hiding this comment

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

Looks good!

"""Tagging configuration instance used for checking if node instance participates in versioning

Returns:
versioning.TaggingConfig): config instance
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
versioning.TaggingConfig): config instance
versioning.TaggingConfig: config instance



class TaggingConfig:
"""A wrapper around the tagConfig definition in the dictionary yaml"""
Copy link
Member

Choose a reason for hiding this comment

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

Should the docstring reference tagBuilderConfig?

Comment on lines 166 to +170
table = node.__table__

if not node.is_taggable():
return # do nothing

Copy link
Contributor

Choose a reason for hiding this comment

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

nit picking:

Suggested change
table = node.__table__
if not node.is_taggable():
return # do nothing
if not node.is_taggable():
return # do nothing
table = node.__table__

@@ -17,6 +17,8 @@
import os
import sys

import six
Copy link
Contributor

Choose a reason for hiding this comment

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

We are still supporting python 2?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sadly we are, biowcs is still py2 and it is a mojor player for GPAS

@kulgan kulgan merged commit 319067b into develop May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants