internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: Cloud-CV/EvalAI

Issue:
Add a boolean field to challenge to make it featured challenge
## Current behavior

Currently, the first challenge is considered as the featured challenge on EvalAI. We would like to change this and the admin should have the functionality to choose which challenge should be featured challenge. 

## Deliverables

- [x] Add a new field in the challenge model which makes a challenge featured
- [x] Don't forget to name the migration
Add a boolean field to challenge to make it featured challenge
## Current behavior

Currently, the first challenge is considered as the featured challenge on EvalAI. We would like to change this and the admin should have the functionality to choose which challenge should be featured challenge. 

## Deliverables

- [x] Add a new field in the challenge model which makes a challenge featured
- [x] Don't forget to name the migration


Discussion:
Hi sir, can I take up this issue?
@sehgalayush1 sure, go ahead. :) 
@deshraj Please clear something for me, You want the default value of the featured field to be false right?
Also, should i just push the new code in the master of my fork and create a PR or should I create a new branch?
@sehgalayush1 Please make a new branch for that
Hi sir, can I take up this issue?
@sehgalayush1 sure, go ahead. :) 
@deshraj Please clear something for me, You want the default value of the featured field to be false right?
Also, should i just push the new code in the master of my fork and create a PR or should I create a new branch?
@sehgalayush1 Please make a new branch for that

Resolving patch:
diff --git a/apps/challenges/migrations/0032_adds_featured_field_in_challenge.py b/apps/challenges/migrations/0032_adds_featured_field_in_challenge.py
new file mode 100644
--- /dev/null
+++ b/apps/challenges/migrations/0032_adds_featured_field_in_challenge.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10.2 on 2017-09-29 07:09
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('challenges', '0031_add_db_index_to_challenge_related_models'),
+    ]
+
+    operations = [
+        migrations.AddField(
+            model_name='challenge',
+            name='featured',
+            field=models.BooleanField(db_index=True, default=False, verbose_name='Featured'),
+        ),
+    ]
diff --git a/apps/challenges/models.py b/apps/challenges/models.py
--- a/apps/challenges/models.py
+++ b/apps/challenges/models.py
@@ -43,6 +43,8 @@ def __init__(self, *args, **kwargs):
         default=False, upload_to=RandomFileName("evaluation_scripts"))  # should be zip format
     approved_by_admin = models.BooleanField(
         default=False, verbose_name="Approved By Admin", db_index=True)
+    featured = models.BooleanField(
+        default=False, verbose_name="Featured", db_index=True)
 
     class Meta:
         app_label = 'challenges'


Test patch:
Repository: Cloud-CV/EvalAI

Issue:
Add challenge filtering using featured parameter.
We need to add filtering in challenge model on the basis of `featured` parameter.
Add challenge filtering using featured parameter.
We need to add filtering in challenge model on the basis of `featured` parameter.


Discussion:
@RishabhJain2018  this sounds interesting. Can you provide more details?
@pohzipohzi Currently the challenges are filtered in django admin using [these](https://github.com/Cloud-CV/EvalAI/blob/master/apps/challenges/admin.py#L18) fields. We need to add `featured` field to it.
Please let me know if you need more help.
@RishabhJain2018  this sounds interesting. Can you provide more details?
@pohzipohzi Currently the challenges are filtered in django admin using [these](https://github.com/Cloud-CV/EvalAI/blob/master/apps/challenges/admin.py#L18) fields. We need to add `featured` field to it.
Please let me know if you need more help.

Resolving patch:
diff --git a/apps/challenges/admin.py b/apps/challenges/admin.py
--- a/apps/challenges/admin.py
+++ b/apps/challenges/admin.py
@@ -14,8 +14,9 @@
 
 @admin.register(Challenge)
 class ChallengeAdmin(ImportExportTimeStampedAdmin):
-    list_display = ("title", "start_date", "end_date", "creator", "published", "enable_forum", "anonymous_leaderboard")
-    list_filter = ("creator", "published", "enable_forum", "anonymous_leaderboard")
+    list_display = ("title", "start_date", "end_date", "creator", "published", "enable_forum", "anonymous_leaderboard",
+                    "featured")
+    list_filter = ("creator", "published", "enable_forum", "anonymous_leaderboard", "featured")
     search_fields = ("title", "creator")
 
 


Test patch:
Repository: Cloud-CV/EvalAI

Issue:
Increase the data upload limit.
## Current Behaviour
By default django supports only 2.5 MB of the data to be uploaded on the web app. Refer [here](https://docs.djangoproject.com/en/1.10/ref/settings/#data-upload-max-memory-size) for more info.

## Effects
Due to the low upload limit the file in challenge creation using zip isn't being uploaded on the app as the size exceeds.

## Expected Behaviour
The upload limit must be increased to 10MB.


Discussion:
Hello! I took the task
@memclutter Go ahead! :)
Edit: there are challenges where the challenge configuration file is of more than 100MB. We would like to update the size to 500MB

Resolving patch:
diff --git a/settings/common.py b/settings/common.py
--- a/settings/common.py
+++ b/settings/common.py
@@ -274,6 +274,11 @@
     'SUBMISSION_QUEUE': 'submission_task_queue',
 }
 
+# The maximum size in bytes for request body
+# https://docs.djangoproject.com/en/1.10/ref/settings/#data-upload-max-memory-size
+FILE_UPLOAD_MAX_MEMORY_SIZE = 524288000  # 500 MB
+DATA_UPLOAD_MAX_MEMORY_SIZE = 524288000  # 500 MB
+
 # To make usermame field read-only, customized serializer is defined.
 REST_AUTH_SERIALIZERS = {
     'USER_DETAILS_SERIALIZER': 'accounts.serializers.ProfileSerializer',


Test patch:
Repository: Cloud-CV/EvalAI

Issue:
Remove models from Accounts app
**Expected Behaviour** : Remove the `Affiliation` and `UserAffiliation` model from the `Accounts` app.
**Deliverables:**
- [ ] Remove the `Affiliation` and `UserAffiliation` model from accounts app.
- [ ] Create and name the migration.



Discussion:
I'll pick this one up

@markslingerland sure. Assigning this to you!
@RishabhJain2018 can I look into this?
@markslingerland is working on it. @HargovindArora Please take up any other issue from the list. :)
Sure @RishabhJain2018 .
@deshraj @RishabhJain2018 Working on it!


Resolving patch:
diff --git a/apps/accounts/migrations/remove_affiliation_model.py b/apps/accounts/migrations/remove_affiliation_model.py
new file mode 100644
--- /dev/null
+++ b/apps/accounts/migrations/remove_affiliation_model.py
@@ -0,0 +1,29 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10.2 on 2017-10-21 07:20
+from __future__ import unicode_literals
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('accounts', '0002_profile'),
+    ]
+
+    operations = [
+        migrations.RemoveField(
+            model_name='useraffliation',
+            name='affiliation',
+        ),
+        migrations.RemoveField(
+            model_name='useraffliation',
+            name='user',
+        ),
+        migrations.DeleteModel(
+            name='Affiliation',
+        ),
+        migrations.DeleteModel(
+            name='UserAffliation',
+        ),
+    ]
diff --git a/apps/accounts/models.py b/apps/accounts/models.py
--- a/apps/accounts/models.py
+++ b/apps/accounts/models.py
@@ -33,29 +33,6 @@ class Meta:
         app_label = 'accounts'
 
 
-class Affiliation(TimeStampedModel):
-    """
-    Model to store the Affiliations
-    """
-    name = models.TextField()
-
-    class Meta:
-        app_label = 'accounts'
-        db_table = 'affliation'
-
-
-class UserAffliation(TimeStampedModel):
-    """
-    Model to relate the affiliations to a particular user
-    """
-    affiliation = models.ForeignKey(Affiliation)
-    user = models.ForeignKey(User)
-
-    class Meta:
-        app_label = 'accounts'
-        db_table = 'user_affiliation'
-
-
 class Profile(TimeStampedModel):
     """
     Model to store profile of a user


Test patch:
Repository: Cloud-CV/EvalAI

Issue:
Add docs precompiled libraries in challenge evaluation scripts
Some of the challenge evaluation scripts use precompiled libraries such as MSCOCO (https://github.com/pdollar/coco/). We want to add a section in the documentation where the challenge hosts should be guided to compile those libraries against `Ubuntu 14.04` ONLY since all the EvalAI servers use `Ubuntu 14.04` so it might not work with libraries that are compiled against OSx or Windows.
Add docs precompiled libraries in challenge evaluation scripts
Some of the challenge evaluation scripts use precompiled libraries such as MSCOCO (https://github.com/pdollar/coco/). We want to add a section in the documentation where the challenge hosts should be guided to compile those libraries against `Ubuntu 14.04` ONLY since all the EvalAI servers use `Ubuntu 14.04` so it might not work with libraries that are compiled against OSx or Windows.


Discussion:

Resolving patch:
diff --git a/docs/source/conf.py b/docs/source/conf.py
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -61,7 +61,7 @@
 
 # General information about the project.
 project = u'EvalAI'
-copyright = u'2017, CloudCV Team'
+copyright = u'2018, CloudCV Team'
 author = u'CloudCV Team'
 
 # The version info for the project you're documenting, acts as replacement for
@@ -69,9 +69,9 @@
 # built documents.
 #
 # The short X.Y version.
-version = u'1.0'
+version = u'1.1'
 # The full version, including alpha/beta/rc tags.
-release = u'1.0'
+release = u'1.1'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
@@ -329,7 +329,7 @@
 #  dir menu entry, description, category)
 texinfo_documents = [
     (master_doc, 'EvalAI', u'EvalAI Documentation',
-     author, 'EvalAI', 'One line description of project.',
+     author, 'EvalAI', 'Evaluating state of the art in AI',
      'Miscellaneous'),
 ]
 


Test patch:
Repository: Cloud-CV/EvalAI

Issue:
Add field submitted_at in leaderboard
In the leaderboard, add support for showing the field `submitted_at` for each entry on the leaderboard. This will help the participants to keep track of the challenge submissions. 


Discussion:

Resolving patch:
diff --git a/apps/jobs/views.py b/apps/jobs/views.py
--- a/apps/jobs/views.py
+++ b/apps/jobs/views.py
@@ -222,7 +222,7 @@ def leaderboard(request, challenge_phase_split_id):
     leaderboard_data = leaderboard_data.annotate(
         filtering_score=RawSQL('result->>%s', (default_order_by, ), output_field=FloatField())).values(
             'id', 'submission__participant_team__team_name',
-            'challenge_phase_split', 'result', 'filtering_score', 'leaderboard__schema')
+            'challenge_phase_split', 'result', 'filtering_score', 'leaderboard__schema', 'submission__submitted_at')
 
     sorted_leaderboard_data = sorted(leaderboard_data, key=lambda k: float(k['filtering_score']), reverse=True)
 


Test patch:
Repository: Cloud-CV/EvalAI

Issue:
Add support to create multiple dataset splits with same codename

Add support to create multiple dataset splits with same codename



Discussion:

Resolving patch:
diff --git a/apps/challenges/migrations/0033_delete_unique_constraint_from_datasetsplit_table.py b/apps/challenges/migrations/0033_delete_unique_constraint_from_datasetsplit_table.py
new file mode 100644
--- /dev/null
+++ b/apps/challenges/migrations/0033_delete_unique_constraint_from_datasetsplit_table.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10.2 on 2018-03-16 20:43
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('challenges', '0032_adds_featured_field_in_challenge'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='datasetsplit',
+            name='codename',
+            field=models.CharField(max_length=100),
+        ),
+    ]
diff --git a/apps/challenges/models.py b/apps/challenges/models.py
--- a/apps/challenges/models.py
+++ b/apps/challenges/models.py
@@ -88,7 +88,7 @@ def is_active(self):
 
 class DatasetSplit(TimeStampedModel):
     name = models.CharField(max_length=100)
-    codename = models.CharField(max_length=100, unique=True)
+    codename = models.CharField(max_length=100)
 
     def __unicode__(self):
         return self.name


Test patch:
Repository: Cloud-CV/EvalAI

Issue:
Remove RabbitMQ config settings
Since we have removed RabbitMQ as a message broker, we would also like to remove the settings for it in the `settings/common.py`.


Discussion:

Resolving patch:
diff --git a/settings/common.py b/settings/common.py
--- a/settings/common.py
+++ b/settings/common.py
@@ -269,15 +269,6 @@
     }
 }
 
-RABBITMQ_PARAMETERS = {
-    'HOST': os.environ.get("RABBITMQ_HOST", 'localhost'),
-    'EVALAI_EXCHANGE': {
-        'NAME': 'evalai_submissions',
-        'TYPE': 'topic',
-    },
-    'SUBMISSION_QUEUE': 'submission_task_queue',
-}
-
 # The maximum size in bytes for request body
 # https://docs.djangoproject.com/en/1.10/ref/settings/#data-upload-max-memory-size
 FILE_UPLOAD_MAX_MEMORY_SIZE = 524288000  # 500 MB


Test patch:
Repository: Cloud-CV/EvalAI

Issue:
Improve challenge creation pipeline
## Current Scenario

If you directly zip the challenge configuration and upload it on the server, then you see an error saying `zip file has more than one .yaml files` which is mainly the case due to temporary files added to the zip while zipping.

## Deliverables

- [ ] Handle the case where temp files are ignored while unzipping in challenge creation API
- [ ] Show a meaningful error rather than showing `zip file has more than one .yaml` files

## How to reproduce

You can reproduce this error by uploading the following challenge zip file to create a challenge. 
[challenge.zip](https://github.com/Cloud-CV/EvalAI/files/2642344/challenge.zip)



Discussion:
Can I work on this issue?
Sure @vkartik97 :) 

Resolving patch:
diff --git a/apps/challenges/views.py b/apps/challenges/views.py
--- a/apps/challenges/views.py
+++ b/apps/challenges/views.py
@@ -540,7 +540,8 @@ def create_challenge_using_zip_file(request, challenge_host_team_pk):
     # Search for yaml file
     yaml_file_count = 0
     for name in zip_ref.namelist():
-        if name.endswith('.yaml') or name.endswith('.yml'):
+        if (name.endswith('.yaml') or name.endswith('.yml')) and (
+                not name.startswith('__MACOSX')):  # Ignore YAML File in __MACOSX Directory
             yaml_file = name
             extracted_folder_name = yaml_file.split(basename(yaml_file))[0]
             yaml_file_count += 1
@@ -554,7 +555,7 @@ def create_challenge_using_zip_file(request, challenge_host_team_pk):
         return Response(response_data, status=status.HTTP_406_NOT_ACCEPTABLE)
 
     if yaml_file_count > 1:
-        message = 'There are more than one YAML files in zip folder!'
+        message = 'There are {0} YAML files instead of one in zip folder!'.format(yaml_file_count)
         response_data = {
             'error': message
         }


Test patch:
Repository: Cloud-CV/EvalAI

Issue:
Viewing challenge stars should not require logging in
Without logging in:
<img width="287" alt="screen shot 2018-12-16 at 1 35 10 pm" src="https://user-images.githubusercontent.com/1156489/50057373-6f153280-0137-11e9-9bf8-cf6e3db93f84.png">

After logging in:
<img width="339" alt="screen shot 2018-12-16 at 1 35 00 pm" src="https://user-images.githubusercontent.com/1156489/50057372-6f153280-0137-11e9-8af0-3593377706a7.png">
Viewing challenge stars should not require logging in
Without logging in:
<img width="287" alt="screen shot 2018-12-16 at 1 35 10 pm" src="https://user-images.githubusercontent.com/1156489/50057373-6f153280-0137-11e9-9bf8-cf6e3db93f84.png">

After logging in:
<img width="339" alt="screen shot 2018-12-16 at 1 35 00 pm" src="https://user-images.githubusercontent.com/1156489/50057372-6f153280-0137-11e9-8af0-3593377706a7.png">


Discussion:
@abhshkdz can I work on this issue?
Sure! go ahead.
@abhshkdz can I work on this issue?
Sure! go ahead.

Resolving patch:
diff --git a/apps/challenges/views.py b/apps/challenges/views.py
--- a/apps/challenges/views.py
+++ b/apps/challenges/views.py
@@ -1274,7 +1274,7 @@ def get_or_update_challenge_phase_split(request, challenge_phase_split_pk):
 
 @throttle_classes([UserRateThrottle])
 @api_view(['GET', 'POST'])
-@permission_classes((permissions.IsAuthenticated, HasVerifiedEmail))
+@permission_classes((permissions.IsAuthenticatedOrReadOnly, HasVerifiedEmail))
 @authentication_classes((ExpiringTokenAuthentication,))
 def star_challenge(request, challenge_pk):
     """


Test patch:
Repository: Cloud-CV/EvalAI

Issue:
Search submissions by challenge name in submissions table
Currently, we support searching the submissions by the `participant team name, challenge phase name, created by name and submission status`. We would like to add searching the submissions by `challenge name` and also add the same to default list filtering options.
Search submissions by challenge name in submissions table
Currently, we support searching the submissions by the `participant team name, challenge phase name, created by name and submission status`. We would like to add searching the submissions by `challenge name` and also add the same to default list filtering options.


Discussion:
Can I work on this issue?
sure! you can work on it!
Can I work on this issue?
sure! you can work on it!

Resolving patch:
diff --git a/apps/jobs/admin.py b/apps/jobs/admin.py
--- a/apps/jobs/admin.py
+++ b/apps/jobs/admin.py
@@ -18,10 +18,9 @@ class SubmissionAdmin(ImportExportTimeStampedAdmin):
                     'created_by', 'status', 'is_public', 'submission_number', 'submitted_at',
                     'execution_time', 'input_file', 'stdout_file', 'stderr_file',
                     'submission_result_file', 'submission_metadata_file',)
-    list_filter = ('participant_team', 'challenge_phase',
-                   'status', 'is_public',)
+    list_filter = ('challenge_phase__challenge', 'challenge_phase', 'status', 'is_public',)
     search_fields = ('participant_team__team_name', 'challenge_phase__name',
-                     'created_by__username', 'status',)
+                     'challenge_phase__challenge__title', 'created_by__username', 'status',)
 
     def get_challenge_name_and_id(self, obj):
         """Return challenge name corresponding to phase"""


Test patch:
Repository: Cloud-CV/EvalAI

Issue:
Add support for Editing Host Team name
### Observed Behaviour
Currently , there is no option to edit Host Team name.

### Expected Behaviour
Add support for editing challenge host team name.

### Would you like to work on this?
Yes.

@deshraj @RishabhJain2018 
![img_20181108_004200](https://user-images.githubusercontent.com/24366008/48154645-258f2780-e2ef-11e8-9067-35280d55aa2e.jpg)




Discussion:
I want to work on this..... Please assign this issue to me.
Thank you.

Resolving patch:
diff --git a/apps/hosts/migrations/Add_blank_in_host_team_URL.py b/apps/hosts/migrations/Add_blank_in_host_team_URL.py
new file mode 100644
--- /dev/null
+++ b/apps/hosts/migrations/Add_blank_in_host_team_URL.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.15 on 2019-01-10 18:37
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('hosts', '0003_challengehostteam_team_url'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='challengehostteam',
+            name='team_url',
+            field=models.CharField(blank=True, default='', max_length=1000),
+        ),
+    ]
diff --git a/apps/hosts/models.py b/apps/hosts/models.py
--- a/apps/hosts/models.py
+++ b/apps/hosts/models.py
@@ -13,7 +13,7 @@ class ChallengeHostTeam(TimeStampedModel):
     """
     team_name = models.CharField(max_length=100, unique=True)
     created_by = models.ForeignKey(User, related_name='challenge_host_team_creator')
-    team_url = models.CharField(max_length=1000, default="", null=True)
+    team_url = models.CharField(max_length=1000, default="", blank=True)
 
     def __str__(self):
         return '{0}: {1}'.format(self.team_name, self.created_by)


Test patch:
Repository: Cloud-CV/EvalAI

Issue:
Incorrect Fields in Jobs serializer
*Observed code:* [here](https://github.com/Cloud-CV/EvalAI/blob/master/apps/jobs/serializers.py/#L54)
```
class Meta:
        model = LeaderboardData
        fields = "__all__"
        fields = ('id', 'participant_team_name', 'challenge_phase_split', 'leaderboard_schema', 'result')
```
*Expected Code:*
```
class Meta:
        model = LeaderboardData
        fields = ('id', 'participant_team_name', 'challenge_phase_split', 'leaderboard_schema', 'result')
```


Discussion:
@Ayukha thanks for reporting this issue. Can you please create a PR for the same? 

Resolving patch:
diff --git a/apps/jobs/serializers.py b/apps/jobs/serializers.py
--- a/apps/jobs/serializers.py
+++ b/apps/jobs/serializers.py
@@ -51,7 +51,6 @@ def __init__(self, *args, **kwargs):
 
     class Meta:
         model = LeaderboardData
-        fields = "__all__"
         fields = ('id', 'participant_team_name', 'challenge_phase_split', 'leaderboard_schema', 'result')
 
     def get_participant_team_name(self, obj):


Test patch:
Repository: Cloud-CV/EvalAI

Issue:
Update seed script to add broker url in challenge
## Current Behaviour:

Currently, when the challenge is created using the seed script, the `queue` field is not populated.

## Expected Behaviour:
When the seed script is run, the `queue` field must be populated with the random string of 75 characters in length.


Discussion:
I'd like to take this up @RishabhJain2018 
Sure! You can work on it.

Resolving patch:
diff --git a/scripts/seed.py b/scripts/seed.py
--- a/scripts/seed.py
+++ b/scripts/seed.py
@@ -1,5 +1,7 @@
 # Command to run : python manage.py shell  < scripts/seed.py
 import os
+import random
+import string
 
 from datetime import timedelta
 
@@ -134,6 +136,7 @@ def create_challenge(title, start_date, end_date, host_team):
     """
     evaluation_script = open(
         os.path.join(settings.BASE_DIR, 'examples', 'example1', 'sample_evaluation_script.zip'), 'rb')
+    queue = ''.join(random.choice(string.ascii_letters) for _ in range(75))
     Challenge.objects.create(
         title=title,
         short_description=fake.paragraph(),
@@ -149,6 +152,7 @@ def create_challenge(title, start_date, end_date, host_team):
         anonymous_leaderboard=False,
         start_date=start_date,
         end_date=end_date,
+        queue=queue,
     )
     print("Challenge created with title: {} creator: {} start_date: {} end_date: {}".format(title,
                                                                                             host_team.team_name,


Test patch: