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

Readme and logging #30

Merged
merged 8 commits into from
Dec 20, 2018
Merged

Readme and logging #30

merged 8 commits into from
Dec 20, 2018

Conversation

JRMeyer
Copy link
Contributor

@JRMeyer JRMeyer commented Dec 19, 2018

Small changes to README (python must be python3, and CorporaCreator kdavis$ is a little confusing with the whitespace).

Also, added to the logger to be more verbose at the terminal and print to log files.

_logger = logging.getLogger(__name__)
_logger.setLevel(logging.DEBUG)
Copy link
Contributor

Choose a reason for hiding this comment

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

Command line option -vv already allows for debug logging. This is not needed.

_logger = logging.getLogger(__name__)
_logger.setLevel(logging.DEBUG)
_logger.addHandler(logging.FileHandler('corpora.log'))
Copy link
Contributor

Choose a reason for hiding this comment

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

Command line option -vv already allows for debug logging. This is not needed.

_logger = logging.getLogger(__name__)
_logger.setLevel(logging.DEBUG)
Copy link
Contributor

Choose a reason for hiding this comment

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

Command line option -vv already allows for debug logging. This is not needed.

_logger = logging.getLogger(__name__)
_logger.setLevel(logging.DEBUG)
_logger.addHandler(logging.FileHandler('corpus.log'))
Copy link
Contributor

Choose a reason for hiding this comment

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

Command line option -vv already allows for debug logging. This is not needed.

@@ -7,7 +7,8 @@


_logger = logging.getLogger(__name__)

_logger.setLevel(logging.DEBUG)
Copy link
Contributor

Choose a reason for hiding this comment

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

Command line option -vv already allows for debug logging. This is not needed.

@@ -7,7 +7,8 @@


_logger = logging.getLogger(__name__)

_logger.setLevel(logging.DEBUG)
_logger.addHandler(logging.FileHandler('tool.log'))
Copy link
Contributor

Choose a reason for hiding this comment

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

Command line option -vv already allows for debug logging. This is not needed.

@kdavis-mozilla
Copy link
Contributor

For example...

(.virtualenv) kdavis-19htdh:CorporaCreator kdavis$ create-corpora --help
usage: create-corpora [-h] [--version] [-v] [-vv] -f TSV_FILENAME -d DIRECTORY
                      [-s DUPLICATE_SENTENCE_COUNT]

Creates tsv files for Common Voice corpora

optional arguments:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  -v, --verbose         set loglevel to INFO
  -vv, --very-verbose   set loglevel to DEBUG
  -f TSV_FILENAME, --file TSV_FILENAME
                        Path to the Common Voice tsv for all languages
  -d DIRECTORY, --directory DIRECTORY
                        Directory in which to save the Common Voice corpora
  -s DUPLICATE_SENTENCE_COUNT, --duplicate-sentence-count DUPLICATE_SENTENCE_COUNT
                        Maximum number of times a sentence can appear in a
                        corpus.

@kdavis-mozilla kdavis-mozilla merged commit 5acc95c into master Dec 20, 2018
@kdavis-mozilla kdavis-mozilla deleted the josh branch January 10, 2019 10:56
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.

2 participants