<commit_before>from django.conf.urls import patterns, url
from hs_core import views

urlpatterns = patterns('',

    # resource API
     url(r'^resource/types/$', views.resource_rest_api.ResourceTypes.as_view(),
        name='list_resource_types'),

     # DEPRECATED: use form above instead 
     url(r'^resourceTypes/$', views.resource_rest_api.ResourceTypes.as_view(),
        name='DEPRECATED_list_resource_types'),

    # DEPRECATED: use GET /resource/ instead 
    url(r'^resourceList/$', views.resource_rest_api.ResourceList.as_view(),
        name='DEPRECATED_list_resources'),

    url(r'^resource/$', views.resource_rest_api.ResourceListCreate.as_view(),
        name='list_create_resource'),

    url(r'^resource/(?P<pk>[0-9a-f-]+)/$', views.resource_rest_api.ResourceReadUpdateDelete.as_view(),
        name='get_update_delete_resource'),

    url(r'^resource/(?P<pk>[0-9a-f-]+)/access/$', views.resource_rest_api.AccessRulesUpdate.as_view(),
        name='update_access_rules'),

    # DEPRECATED: use form above instead 
    url(r'^resource/accessRules/(?P<pk>[0-9a-f-]+)/$', views.resource_rest_api.AccessRulesUpdate.as_view(),
        name='DEPRECATED_update_access_rules'),

    url(r'^resource/(?P<pk>[0-9a-f-]+)/sysmeta/$', views.resource_rest_api.SystemMetadataRetrieve.as_view(),
        name='get_system_metadata'),

    # DEPRECATED: use form above instead 
    url(r'^sysmeta/(?P<pk>[0-9a-f-]+)/$', views.resource_rest_api.SystemMetadataRetrieve.as_view(),
        name='DEPRECATED_get_system_metadata'),

    url(r'^resource/(?P<pk>[0-9a-f-]+)/scimeta/$', views.resource_rest_api.ScienceMetadataRetrieveUpdate.as_view(),
        name='get_update_science_metadata'),

    # DEPRECATED: use form above instead
    url(r'^scimeta/(?P<pk>[0-9a-f-]+)/$', views.resource_rest_api.ScienceMetadataRetrieveUpdate.as_view(),
        name='DEPRECATED_get_update_science_metadata'),

    url(r'^resource/(?P<pk>[A-z0-9]+)/map/$', views.resource_rest_api.ResourceMapRetrieve.as_view(),
        name='get_resource_map'),

    # Unused. See ResourceFileListCreate. This is now implemented there.
    # Older version based upon polymorphism of ResourceFileCRUD. 
    # url(r'^resource/(?P<pk>[A-z0-9]+)/files/$', views.resource_rest_api.ResourceFileCRUD.as_view(),
    #     name='add_resource_file'),

    # TODO: (Couch) This pattern is much too permissive. Consider limiting it. 
    url(r'^resource/(?P<pk>[0-9a-f-]+)/files/(?P<filename>[^/]+)/$',
        views.resource_rest_api.ResourceFileCRUD.as_view(), 
        name='get_update_delete_resource_file'),

    url(r'^resource/(?P<pk>[0-9a-f-]+)/files/$', 
        views.resource_rest_api.ResourceFileListCreate.as_view(),
        name='list_create_resource_file'),

    # DEPRECATED: use form above instead. Added unused POST for simplicity 
    url(r'^resource/(?P<pk>[0-9a-f-]+)/file_list/$', 
        views.resource_rest_api.ResourceFileListCreate.as_view(),
        name='DEPRECATED_get_resource_file_list'),

    url(r'^taskstatus/(?P<task_id>[A-z0-9\-]+)/$',
        views.resource_rest_api.CheckTaskStatus.as_view(),
        name='get_task_status'),

    url(r'^userInfo/$',
        views.user_rest_api.UserInfo.as_view(), name='get_logged_in_user_info'),

    # internal API

    url(r'^_internal/(?P<shortkey>[0-9a-f-]+)/add-files-to-resource/$', views.add_files_to_resource),
    url(r'^_internal/(?P<shortkey>[0-9a-f-]+)/(?P<element_name>[A-z]+)/add-metadata/$', views.add_metadata_element),
    url(r'^_internal/(?P<shortkey>[0-9a-f-]+)/(?P<element_name>[A-z]+)/(?P<element_id>[A-z0-9]+)/update-metadata/$',
        views.update_metadata_element),
    url(r'^_internal/(?P<shortkey>[0-9a-f-]+)/(?P<element_name>[A-z]+)/(?P<element_id>[A-z0-9]+)/delete-metadata/$',
        views.delete_metadata_element),
    url(r'^_internal/(?P<shortkey>[0-9a-f-]+)/update-key-value-metadata/$',
        views.update_key_value_metadata),
    url(r'^_internal/(?P<shortkey>[0-9a-f-]+)/delete-resource-file/(?P<f>[0-9]+)/$', views.delete_file),
    url(r'^_internal/(?P<shortkey>[0-9a-f-]+)/delete-resource/$', views.delete_resource),
    url(r'^_internal/(?P<shortkey>[0-9a-f-]+)/create-new-version-resource/$', views.create_new_version_resource),
    url(r'^_internal/(?P<shortkey>[0-9a-f-]+)/rep-res-bag-to-irods-user-zone/$', views.rep_res_bag_to_irods_user_zone),
    url(r'^_internal/(?P<shortkey>[0-9a-f-]+)/set-resource-flag/$', views.set_resource_flag),<commit_msg>added delete-multiple-files url mapping back<commit_after>from django.conf.urls import patterns, url
from hs_core import views

urlpatterns = patterns('',

    # resource API
     url(r'^resource/types/$', views.resource_rest_api.ResourceTypes.as_view(),
        name='list_resource_types'),

     # DEPRECATED: use form above instead 
     url(r'^resourceTypes/$', views.resource_rest_api.ResourceTypes.as_view(),
        name='DEPRECATED_list_resource_types'),

    # DEPRECATED: use GET /resource/ instead 
    url(r'^resourceList/$', views.resource_rest_api.ResourceList.as_view(),
        name='DEPRECATED_list_resources'),

    url(r'^resource/$', views.resource_rest_api.ResourceListCreate.as_view(),
        name='list_create_resource'),

    url(r'^resource/(?P<pk>[0-9a-f-]+)/$', views.resource_rest_api.ResourceReadUpdateDelete.as_view(),
        name='get_update_delete_resource'),

    url(r'^resource/(?P<pk>[0-9a-f-]+)/access/$', views.resource_rest_api.AccessRulesUpdate.as_view(),
        name='update_access_rules'),

    # DEPRECATED: use form above instead 
    url(r'^resource/accessRules/(?P<pk>[0-9a-f-]+)/$', views.resource_rest_api.AccessRulesUpdate.as_view(),
        name='DEPRECATED_update_access_rules'),

    url(r'^resource/(?P<pk>[0-9a-f-]+)/sysmeta/$', views.resource_rest_api.SystemMetadataRetrieve.as_view(),
        name='get_system_metadata'),

    # DEPRECATED: use form above instead 
    url(r'^sysmeta/(?P<pk>[0-9a-f-]+)/$', views.resource_rest_api.SystemMetadataRetrieve.as_view(),
        name='DEPRECATED_get_system_metadata'),

    url(r'^resource/(?P<pk>[0-9a-f-]+)/scimeta/$', views.resource_rest_api.ScienceMetadataRetrieveUpdate.as_view(),
        name='get_update_science_metadata'),

    # DEPRECATED: use form above instead
    url(r'^scimeta/(?P<pk>[0-9a-f-]+)/$', views.resource_rest_api.ScienceMetadataRetrieveUpdate.as_view(),
        name='DEPRECATED_get_update_science_metadata'),

    url(r'^resource/(?P<pk>[A-z0-9]+)/map/$', views.resource_rest_api.ResourceMapRetrieve.as_view(),
        name='get_resource_map'),

    # Unused. See ResourceFileListCreate. This is now implemented there.
    # Older version based upon polymorphism of ResourceFileCRUD. 
    # url(r'^resource/(?P<pk>[A-z0-9]+)/files/$', views.resource_rest_api.ResourceFileCRUD.as_view(),
    #     name='add_resource_file'),

    # TODO: (Couch) This pattern is much too permissive. Consider limiting it. 
    url(r'^resource/(?P<pk>[0-9a-f-]+)/files/(?P<filename>[^/]+)/$',
        views.resource_rest_api.ResourceFileCRUD.as_view(), 
        name='get_update_delete_resource_file'),

    url(r'^resource/(?P<pk>[0-9a-f-]+)/files/$', 
        views.resource_rest_api.ResourceFileListCreate.as_view(),
        name='list_create_resource_file'),

    # DEPRECATED: use form above instead. Added unused POST for simplicity 
    url(r'^resource/(?P<pk>[0-9a-f-]+)/file_list/$', 
        views.resource_rest_api.ResourceFileListCreate.as_view(),
        name='DEPRECATED_get_resource_file_list'),

    url(r'^taskstatus/(?P<task_id>[A-z0-9\-]+)/$',
        views.resource_rest_api.CheckTaskStatus.as_view(),
        name='get_task_status'),

    url(r'^userInfo/$',
        views.user_rest_api.UserInfo.as_view(), name='get_logged_in_user_info'),

    # internal API

    url(r'^_internal/(?P<shortkey>[0-9a-f-]+)/add-files-to-resource/$', views.add_files_to_resource),
    url(r'^_internal/(?P<shortkey>[0-9a-f-]+)/(?P<element_name>[A-z]+)/add-metadata/$', views.add_metadata_element),
    url(r'^_internal/(?P<shortkey>[0-9a-f-]+)/(?P<element_name>[A-z]+)/(?P<element_id>[A-z0-9]+)/update-metadata/$',
        views.update_metadata_element),
    url(r'^_internal/(?P<shortkey>[0-9a-f-]+)/(?P<element_name>[A-z]+)/(?P<element_id>[A-z0-9]+)/delete-metadata/$',
        views.delete_metadata_element),
    url(r'^_internal/(?P<shortkey>[0-9a-f-]+)/update-key-value-metadata/$',
        views.update_key_value_metadata),
    url(r'^_internal/(?P<shortkey>[0-9a-f-]+)/delete-resource-file/(?P<f>[0-9]+)/$', views.delete_file),
    url(r'^_internal/(?P<shortkey>[A-z0-9]+)/delete-multiple-files/$',
        views.delete_multiple_files),
    url(r'^_internal/(?P<shortkey>[0-9a-f-]+)/delete-resource/$', views.delete_resource),
    url(r'^_internal/(?P<shortkey>[0-9a-f-]+)/create-new-version-resource/$', views.create_new_version_resource),
    url(r'^_internal/(?P<shortkey>[0-9a-f-]+)/rep-res-bag-to-irods-user-zone/$', views.rep_res_bag_to_irods_user_zone),
    url(r'^_internal/(?P<shortkey>[0-9a-f-]+)/set-resource-flag/$', views.set_resource_flag),
{'fraction_non_alphanumeric': 0.19311875693673697, 'fraction_numerical': 0.011764705882352941, 'mean_word_length': 4.49116392443632, 'pattern_counts': {'":': 0, '<': 64, '<?xml version=': 0, '>': 64, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3047345', 'n_tokens_mistral': 3449, 'n_tokens_neox': 3238, 'n_words': 305}