Skip to content

Commit

Permalink
remove print statements
Browse files Browse the repository at this point in the history
  • Loading branch information
jsjiang committed Oct 24, 2023
1 parent 6697719 commit 0c012cf
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions impl/nog_sql/ezid_minter.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,19 +301,14 @@ def mint(self, id_count=1):
self._assert_mask_matches_template()

fmt_str = re.sub('{.*}', '{}', self.template_str)
print("in mint")
print(f"template_str: {self.template_str}")
print(f"fmt_str: {fmt_str}")
for _ in range(id_count):
if self.combined_count == self.max_combined_count:
self._extend_template()
compounded_counter = self._next_state()
self.combined_count += 1
xdig_str = self._get_xdig_str(compounded_counter)
print(f"xdig_str: {xdig_str}")
if self.mask_str.endswith("k"):
minted_id = fmt_str.format(xdig_str)
print(f"minted_id: {minted_id}")
xdig_str += self._get_check_char(minted_id)
yield xdig_str

Expand Down Expand Up @@ -387,7 +382,6 @@ def _get_check_char(self, id_str):
total_int = 0
for i, c in enumerate(id_str):
total_int += (i + 1) * XDIG_DICT.get(c, 0)
print(f'i:{i}, c:{c}, total_int: {total_int}')
return XDIG_STR[total_int % ALPHA_COUNT]

def _extend_template(self):
Expand Down

0 comments on commit 0c012cf

Please sign in to comment.