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

Add flag for 'exact match' #44

Merged
merged 7 commits into from
Jan 25, 2021
Merged

Add flag for 'exact match' #44

merged 7 commits into from
Jan 25, 2021

Conversation

obi134
Copy link
Contributor

@obi134 obi134 commented Jan 19, 2021

Description

A Flag called 'exact_match' was added. Now it can be checked, if a call needs to match exactly to apply the data.

  • Added Comments for better understanding the code
  • Added flag to dict
  • Change flag in dict when prefix starts with '='
  • Fix problem when data is reused for continued dxcc entry (previously data from primary prefix was also changed)

Fixes #42

Type of change

  • Bug fix
  • New feature
  • Refactor/code cleanup

How has this been tested?

China: 24: 44: AS: 36.00: -102.00: -8.0: BY:
3H,3H0(23)[42],=B7/BA7CK(26),=BD9BI/0(23)[42]
Fed. Rep. of Germany: 14: 28: EU: 51.00: -10.00: -1.0: DL:
=DR9Z/LH;

Results in:
'entity': 'Fed. Rep. of Germany', 'cq': 14, 'itu': 28, 'continent': 'EU', 'lat': 51.0, 'long': -10.0, 'tz': 1.0, 'len': 2, 'primary_pfx': 'DL', 'exact_match': False}
{'entity': 'Fed. Rep. of Germany', 'cq': 14, 'itu': 28, 'continent': 'EU', 'lat': 51.0, 'long': -10.0, 'tz': 1.0, 'len': 2, 'primary_pfx': 'DL', 'exact_match': True}
{'entity': 'China', 'cq': 24, 'itu': 44, 'continent': 'AS', 'lat': 36.0, 'long': -102.0, 'tz': 8.0, 'len': 2, 'primary_pfx': 'BY', 'exact_match': False}
{'entity': 'China', 'cq': 24, 'itu': 44, 'continent': 'AS', 'lat': 36.0, 'long': -102.0, 'tz': 8.0, 'len': 2, 'primary_pfx': 'BY', 'exact_match': False}
{'entity': 'China', 'cq': 23, 'itu': 42, 'continent': 'AS', 'lat': 36.0, 'long': -102.0, 'tz': 8.0, 'len': 2, 'primary_pfx': 'BY', 'exact_match': False}
{'entity': 'China', 'cq': 26, 'itu': 44, 'continent': 'AS', 'lat': 36.0, 'long': -102.0, 'tz': 8.0, 'len': 2, 'primary_pfx': 'BY', 'exact_match': True}
{'entity': 'China', 'cq': 23, 'itu': 42, 'continent': 'AS', 'lat': 36.0, 'long': -102.0, 'tz': 8.0, 'len': 2, 'primary_pfx': 'BY', 'exact_match': True}

Checklist

  • Issue exists for PR
  • Code reviewed by the author
  • Code documented (comments or other documentation)
  • Changes tested
  • All tests pass (see DEVELOPING.md, if it exists)
  • CHANGELOG.md updated if needed
  • Informative commit messages
  • Descriptive PR title

Copy link
Member

@classabbyamp classabbyamp left a comment

Choose a reason for hiding this comment

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

The exact_match part of this PR is good.

We would prefer that next time the commenting/documentation gets added in another PR, preferably one with an issue attached.

For more details, see the review comments.

ctyparser/bigcty.py Outdated Show resolved Hide resolved
ctyparser/bigcty.py Outdated Show resolved Hide resolved
ctyparser/bigcty.py Outdated Show resolved Hide resolved
ctyparser/bigcty.py Outdated Show resolved Hide resolved
ctyparser/bigcty.py Outdated Show resolved Hide resolved
ctyparser/bigcty.py Outdated Show resolved Hide resolved
ctyparser/bigcty.py Outdated Show resolved Hide resolved
ctyparser/bigcty.py Outdated Show resolved Hide resolved
ctyparser/bigcty.py Outdated Show resolved Hide resolved
ctyparser/bigcty.py Outdated Show resolved Hide resolved
obi134 and others added 3 commits January 20, 2021 19:16
Co-authored-by: classabbyamp <5366828+classabbyamp@users.noreply.github.com>
Co-authored-by: classabbyamp <5366828+classabbyamp@users.noreply.github.com>
Copy link
Contributor Author

@obi134 obi134 left a comment

Choose a reason for hiding this comment

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

Okay, thanks for you feedback. Accepted your suggestions

@classabbyamp classabbyamp merged commit 30e7156 into miaowware:master Jan 25, 2021
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.

Add flag for 'exact match' in prefix
2 participants