antijob / neuro-parser

Other
3 stars 0 forks source link

Refactor IncidentPredictor architecture #229

Closed SahDoum closed 1 week ago

github-actions[bot] commented 2 weeks ago

coverage-report

Coverage after merging feature/predictor-redesign into stage will be
56.78%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
server
   __init__.py100%100%100%100%
   urls.py100%100%100%100%
server/apps
   __init__.py100%100%100%100%
server/apps/api
   __init__.py100%100%100%100%
   apps.py100%100%100%100%
   permissions.py75%50%100%83.33%9, 9
   serializers.py100%100%100%100%
   swagger.py100%100%100%100%
   throttling.py73.68%50%100%80%10, 10, 13, 24, 24
   urls.py100%100%100%100%
server/apps/api/tests
   conftest.py95.24%100%100%95.24%10
   test_article_view.py100%100%100%100%
   test_incident_type_view.py100%100%100%100%
   test_media_incident_view.py100%100%100%100%
   test_source_view.py100%100%100%100%
   test_views.py100%100%100%100%
server/apps/api/views
   __init__.py100%100%100%100%
   article_views.py47.33%22.73%100%52.29%103, 103–104, 125, 125, 132–133, 148, 148, 161, 161, 164–165, 181–184, 184, 188, 188, 190–191, 191, 193, 193–196, 212–215, 215, 219, 219–221, 221, 225, 225, 227–230, 45–46, 49–52, 52–54, 60, 60–63, 63–66, 70, 70–73, 92, 92
   incident_type_views.py43.48%0%100%47.62%18–21, 24–25, 27–28, 28, 30, 30–32
   media_incident_views.py100%100%100%100%
   source_views.py52.15%34.62%100%55.47%100, 100, 118, 118–120, 129, 129–132, 136–137, 142–143, 168, 168, 179, 179–181, 190, 190–193, 199–200, 217–220, 220, 224, 224–228, 228, 231, 231–232, 242–245, 245, 249, 249–253, 265–268, 268, 272, 272–276, 278–279, 279, 281, 281–283, 48, 48–50, 68–69
server/apps/bot
   __init__.py100%100%100%100%
   admin.py52.17%42.86%100%54.55%0, 35, 37, 37, 39–40, 40–41, 43, 43–44, 44–45, 47–50, 50–52, 55–57, 60, 62, 62, 64–65, 70, 72, 72–73, 75
   apps.py100%100%100%100%
   bot_instance.py63.64%100%100%63.64%12–14, 16
   forms.py66.67%0%100%75%0, 25–28, 28
   models.py89.66%100%100%89.66%19, 39, 65
   urls.py100%100%100%100%
server/apps/bot/management
   __init__.py100%100%100%100%
server/apps/bot/migrations
   0001_initial.py100%100%100%100%
   0002_auto_20240611_2327.py100%100%100%100%
   0003_auto_20240710_1036.py100%100%100%100%
   __init__.py100%100%100%100%
server/apps/bot/services
   country.py18.75%0%100%26.47%0, 0, 0, 20, 29–30, 41–45, 45, 45–46, 46, 49, 49–51, 51–52, 52, 55, 55, 61–62, 62–63, 63–67, 67–68, 68–71
   inc_post.py32.50%0%100%36.11%0, 0, 18–21, 24, 27–29, 33–36, 38, 47–49, 51, 57, 57–58, 60, 60–62, 64
server/apps/core
   __init__.py100%100%100%100%
   admin.py51.40%37.50%100%57.33%0, 0, 101, 101–103, 103–104, 104–105, 105–106, 106, 108, 108, 114, 117–118, 118–120, 120, 123–124, 124–126, 126, 33–34, 34–36, 36, 42–43, 43–45, 45, 58–59, 59, 81–82, 82–84, 84, 98–99, 99
   apps.py100%100%100%100%
   forms.py52.38%0%100%57.89%0, 16–17, 20–23, 25, 25–26
   models.py73.33%8.33%100%78.99%135, 138, 141–142, 142, 144, 144–145, 145–146, 146, 160, 185, 240, 240–241, 241, 243, 243–246, 248–249, 249–250, 250–251, 251, 253, 253, 257–258, 262–263, 27, 42, 45, 58, 65
   signals.py50%0%100%61.11%0, 0, 22–23, 23–25, 25–28
   urls.py100%100%100%100%
   views.py100%100%100%100%
server/apps/core/data
   messages.py100%100%100%100%
   regions.py100%100%100%100%
server/apps/core/management
   __init__.py100%100%100%100%
server/apps/core/migrations
   0001_incident_types.py100%100%100%100%
   0002_create_region_country.py100%100%100%100%
   0003_add_data_region_country.py100%100%100%100%
   0004_changes_region_country.py100%100%100%100%
   0005_alter_country_name.py100%100%100%100%
   0006_auto_20240805_1949.py100%100%100%100%
   0007_auto_20240819_1821.py100%100%100%100%
   0008_alter_mediaincident_region.py100%100%100%100%
   __init__.py100%100%100%100%
server/apps/users
   __init__.py100%100%100%100%
   admin.py100%100%100%100%
   apps.py100%100%100%100%
   managers.py16%0%100%21.05%11–12, 12–13, 13–17, 20–22, 24–25, 25–26, 26–27, 27–28, 28
   models.py85.71%100%100%85.71%47–48, 52, 56, 72
   urls.py100%100%100%100%
server/apps/users/migrations
   0001_initial.py100%100%100%100%
   __init__.py100%100%100%100%
server/celery
   __init__.py100%100%100%100%
   celery_app.py100%100%100%100%
   crawler.py30.30%0%100%37.04%10, 15–18, 18–22, 22, 27–29, 29–30, 30, 33–34, 34–35, 35–36
   parser.py31.76%0%100%38.03%0, 0, 0, 104, 22–25, 25–26, 30–31, 37, 42, 44–45, 45–46, 46, 48, 53–56, 61–63, 63–64, 64–65, 65–67, 72–77, 82–83, 85, 85–86, 88–89, 89–90, 92, 92–93, 93, 95, 95–98
server/core/article_index
   __init__.py100%100%100%100%
   article_index.py23.30%0%100%26.37%0, 0, 100–101, 101–102, 102–107, 110–111, 111–112, 112–116, 19–21, 27–30, 33–42, 45–52, 52–54, 54–56, 66–69, 72–75, 75, 77, 77–79, 82–84, 84–86, 89–92, 92–93, 96–97
   query_checker.py15.22%0%100%21.88%12–16, 16–17, 17, 21–22, 24, 26, 26–27, 27–28, 28–29, 31, 31, 33–34, 34, 34–35, 35–36, 36–40, 42, 42, 42–43, 43, 45, 45
server/core/article_parser