|
10 | 10 | from wtforms.fields import HiddenField |
11 | 11 | from wtforms import widgets |
12 | 12 |
|
| 13 | +from arxiv import taxonomy |
| 14 | + |
13 | 15 | from search.controllers.util import doesNotStartWithWildcard, stripWhiteSpace |
14 | 16 |
|
15 | 17 |
|
@@ -91,13 +93,10 @@ class ClassificationForm(Form): |
91 | 93 | ('q-fin', 'q_finance'), |
92 | 94 | ('stat', 'statistics') |
93 | 95 | ] |
94 | | - PHYSICS_ARCHIVES = [ |
95 | | - ('all', 'all'), ('astro-ph', 'astro-ph'), ('cond-mat', 'cond-mat'), |
96 | | - ('gr-qc', 'gr-qc'), ('hep-ex', 'hep-ex'), ('hep-lat', 'hep-lat'), |
97 | | - ('hep-ph', 'hep-ph'), ('hep-th', 'hep-th'), ('math-ph', 'math-ph'), |
98 | | - ('nlin', 'nlin'), ('nucl-ex', 'nucl-ex'), ('nucl-th', 'nucl-th'), |
99 | | - ('physics', 'physics'), ('quant-ph', 'quant-ph') |
100 | | - ] |
| 96 | + PHYSICS_ARCHIVES = [('all', 'all')] + \ |
| 97 | + [(archive, archive) for archive, description |
| 98 | + in taxonomy.ARCHIVES_ACTIVE.items() |
| 99 | + if description['in_group'] == 'grp_physics'] |
101 | 100 |
|
102 | 101 | computer_science = BooleanField('Computer Science (cs)') |
103 | 102 | economics = BooleanField('Economics (econ)') |
@@ -186,5 +185,5 @@ class AdvancedSearchForm(Form): |
186 | 185 | ('-submitted_date', 'Submission date (newest first)'), |
187 | 186 | ('submitted_date', 'Submission date (oldest first)'), |
188 | 187 | ('', 'Relevance') |
189 | | - ], validators=[validators.Optional()], default='') |
| 188 | + ], validators=[validators.Optional()], default='-announced_date_first') |
190 | 189 | include_older_versions = BooleanField('Include older versions of papers') |
0 commit comments