Skip to content

Commit

Permalink
Merge pull request #1815 from 4dn-dcic/kmp_use_lorem-text
Browse files Browse the repository at this point in the history
Use lorem-text library instead of loremipsum (C4-1040)
  • Loading branch information
netsettler authored Jun 14, 2023
2 parents 9364682 + 754e6e1 commit d626a7e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 13 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ fourfront
Change Log
----------


5.3.11
======

* Use ``lorem-text`` library instead of ``loremipsum`` for proper license compatibility.
This affects only the ``extract-text-data`` script, which was used a long time ago
on a one-off basis to set up the system and isn't actually used at runtime, so the
impact of this is probably very small. Also, there are no apparent tests of this script,
but it's not clear there is a good reason to write any at this time. A manual test
was done in creating this patch to make sure the relevant change is plug-compatible.


5.3.10
=====

Expand Down
21 changes: 12 additions & 9 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
# Note: Various modules refer to this system as "encoded", not "fourfront".
name = "encoded"
version = "5.3.10"
version = "5.3.11"
description = "4DN-DCIC Fourfront"
authors = ["4DN-DCIC Team <support@4dnucleome.org>"]
license = "MIT"
Expand Down Expand Up @@ -131,7 +131,7 @@ flake8 = ">=3.9.2"
flaky = ">=3.7.0"
# flask only for moto[server]
flask = ">=2.0.3"
loremipsum = "^1.0.5"
lorem-text = "^2.1"
# Here AND ELSEWHERE (related scripts), we pin use of moto 1.3.7.
# I asked Will today why we're pinning that and he explained to me that above there (i.e., in version 1.3.8),
# an SQS-related bug is introduced, and that we cannot upgrade versions until this bug is fixed.
Expand Down
4 changes: 2 additions & 2 deletions src/encoded/commands/extract_test_data.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import argparse
import csv
import loremipsum
import random
import re
import sys
import traceback

from lorem_text import lorem
from ..loadxl import *


Expand All @@ -15,7 +15,7 @@ class Anonymizer(object):

# From Colander. Not exhaustive, will not match .museum etc.
email_re = re.compile(r'(?i)[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}')
random_words = loremipsum._generator.words
random_words = lorem.WORDS

def __init__(self):
self.mapped_emails = {}
Expand Down

0 comments on commit d626a7e

Please sign in to comment.