Skip to content

Commit

Permalink
Merge branch 'issue223-docdir-sort'
Browse files Browse the repository at this point in the history
  • Loading branch information
osma committed Dec 6, 2018
2 parents 4f598c4 + 73bdb15 commit 4429e2f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ python:
- '3.5'
- '3.6'
cache: pip
before_install:
- export BOTO_CONFIG=/dev/null
install:
- pip install pipenv
- pip install --upgrade pytest
Expand Down
2 changes: 1 addition & 1 deletion annif/corpus/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def __iter__(self):
subjectfile) containing file paths. If there is no key file and
require_subjects is False, the subjectfile will be returned as None."""

for filename in glob.glob(os.path.join(self.path, '*.txt')):
for filename in sorted(glob.glob(os.path.join(self.path, '*.txt'))):
tsvfilename = re.sub(r'\.txt$', '.tsv', filename)
if os.path.exists(tsvfilename):
yield (filename, tsvfilename)
Expand Down

0 comments on commit 4429e2f

Please sign in to comment.