-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathusagestats.py
executable file
·66 lines (56 loc) · 2.51 KB
/
usagestats.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
__author__ = '@jotegui'
__contributors__ = "Javier Otegui, John Wieczorek"
__copyright__ = "Copyright 2018 vertnet.org"
__version__ = "usagestats.py 2019-03-19T10:53-03:00"
from admin.parser.InitExtraction import InitExtraction
from admin.parser.GetEvents import GetEvents
from admin.parser.ProcessEvents import ProcessEvents
from admin.parser.GitHubStore import GitHubStore
from admin.parser.GitHubIssue import GitHubIssue
from admin.setup.DatasetsSetup import DatasetsSetup
from admin.tools.Status import Status
from admin.tools.PeriodStatus import PeriodStatus
from admin.tools.RepoChecker import RepoChecker
from admin.tools.WatchChecker import WatchChecker
from admin.tools.EmailTester import EmailTester
from admin.tools.EntityCleaner import EntityCleaner
from viewer.DatasetViewer import DatasetViewer
from viewer.ReportViewer import ReportViewer, TXTReportViewer, JSONReportViewer
import webapp2
# Administrative processes
admin = webapp2.WSGIApplication([
# Report generator
('/admin/parser/init', InitExtraction),
('/admin/parser/get_events', GetEvents),
('/admin/parser/process_events', ProcessEvents),
('/admin/parser/github_store', GitHubStore),
('/admin/parser/github_issue', GitHubIssue),
# Accessory tools
('/admin/setup/datasets', DatasetsSetup),
('/admin/status', Status),
webapp2.Route(r'/admin/status/period/<period>', handler=PeriodStatus),
('/admin/tools/repo_checker', RepoChecker),
('/admin/tools/watch_checker', WatchChecker),
webapp2.Route(r'/admin/tools/watch_checker/watcher/<watcher>', handler=WatchChecker),
('/admin/tools/email_tester', EmailTester),
('/admin/tools/entity_cleaner', EntityCleaner),
], debug=True)
# Public processes
app = webapp2.WSGIApplication([
# Report viewer routes
webapp2.Route(r'/reports/<gbifdatasetid>/',
handler=DatasetViewer),
webapp2.Route(r'/reports/<gbifdatasetid>/<period>/',
handler=ReportViewer),
webapp2.Route(r'/reports/<gbifdatasetid>/<period>/json',
handler=JSONReportViewer),
webapp2.Route(r'/reports/<gbifdatasetid>/<period>/txt',
handler=TXTReportViewer),
], debug=True)