Skip to content

Commit

Permalink
Titlecase in stats (#456)
Browse files Browse the repository at this point in the history
* titlecase

Signed-off-by: lizz <lizz@sensetime.com>

* tiny

Signed-off-by: lizz <lizz@sensetime.com>

* changelog

Signed-off-by: lizz <lizz@sensetime.com>

* Update changelog.md
  • Loading branch information
innerlee authored Dec 18, 2020
1 parent 562c759 commit f342947
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

**Improvements**
- Fix CI due to pip upgrade. ([#454](https://github.com/open-mmlab/mmaction2/pull/454))
- Use title case in modelzoo statistics. ([#456](https://github.com/open-mmlab/mmaction2/pull/456))
- Add FAQ documents for easy troubleshooting. ([#413](https://github.com/open-mmlab/mmaction2/pull/413), [#420](https://github.com/open-mmlab/mmaction2/pull/420), [#439](https://github.com/open-mmlab/mmaction2/pull/439))


Expand Down
7 changes: 5 additions & 2 deletions docs/stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import glob
import re

import titlecase

files = sorted(glob.glob('*_models.md'))

stats = []
Expand All @@ -15,8 +17,9 @@
title = content.split('\n')[0].replace('#', '')

# count papers
papers = set(x.lower().strip()
for x in re.findall(r'\btitle\s*=\s*{(.*)}', content))
papers = set(
titlecase.titlecase(x.lower().strip())
for x in re.findall(r'\btitle\s*=\s*{(.*)}', content))
paperlist = '\n'.join(sorted(' - ' + x for x in papers))

# count configs
Expand Down
1 change: 1 addition & 0 deletions requirements/readthedocs.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
mmcv
titlecase
torch
torchvision
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ line_length = 79
multi_line_output = 0
known_standard_library = pkg_resources,setuptools
known_first_party = mmaction
known_third_party = cv2,joblib,matplotlib,mmcv,numpy,pandas,pytest,scipy,seaborn,torch
known_third_party = cv2,joblib,matplotlib,mmcv,numpy,pandas,pytest,scipy,seaborn,titlecase,torch
no_lines_before = STDLIB,LOCALFOLDER
default_section = THIRDPARTY

0 comments on commit f342947

Please # to comment.