Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#727 add a command to add all pipx binary directories to PATH. #728

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/source/development/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ to install ``nox`` in its own isolated environment.
.. code-block:: console

$ python -m pip install pipx
$ python -m pipx ensurepath
$ pipx install nox

You will need to have a working Redis server on your system. You may
Expand Down
5 changes: 4 additions & 1 deletion junction/base/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ class TimeAuditAdmin(admin.ModelAdmin):


class AuditAdmin(TimeAuditAdmin):
list_display = ("created_by", "modified_by",) + TimeAuditAdmin.list_display
list_display = (
"created_by",
"modified_by",
) + TimeAuditAdmin.list_display
exclude = (
"created_by",
"modified_by",
Expand Down
6 changes: 2 additions & 4 deletions junction/base/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@


class TimeAuditModel(models.Model):
"""To track when the record was created and last modified
"""
"""To track when the record was created and last modified"""

created_at = models.DateTimeField(auto_now_add=True, verbose_name="Created At")
modified_at = models.DateTimeField(auto_now=True, verbose_name="Last Modified At")
Expand All @@ -17,8 +16,7 @@ class Meta:


class UserAuditModel(models.Model):
""" To track who created and last modified the record
"""
"""To track who created and last modified the record"""

created_by = models.ForeignKey(
User,
Expand Down
12 changes: 8 additions & 4 deletions junction/conferences/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ class Migration(migrations.Migration):
(
"conference",
models.ForeignKey(
to="conferences.Conference", on_delete=models.deletion.CASCADE,
to="conferences.Conference",
on_delete=models.deletion.CASCADE,
),
),
(
Expand All @@ -140,7 +141,8 @@ class Migration(migrations.Migration):
(
"moderator",
models.ForeignKey(
to=settings.AUTH_USER_MODEL, on_delete=models.deletion.CASCADE,
to=settings.AUTH_USER_MODEL,
on_delete=models.deletion.CASCADE,
),
),
(
Expand Down Expand Up @@ -187,7 +189,8 @@ class Migration(migrations.Migration):
(
"conference",
models.ForeignKey(
to="conferences.Conference", on_delete=models.deletion.CASCADE,
to="conferences.Conference",
on_delete=models.deletion.CASCADE,
),
),
(
Expand Down Expand Up @@ -215,7 +218,8 @@ class Migration(migrations.Migration):
(
"reviewer",
models.ForeignKey(
to=settings.AUTH_USER_MODEL, on_delete=models.deletion.CASCADE,
to=settings.AUTH_USER_MODEL,
on_delete=models.deletion.CASCADE,
),
),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ class Migration(migrations.Migration):
(
"proposal_type",
models.ForeignKey(
to="proposals.ProposalType", on_delete=models.deletion.CASCADE,
to="proposals.ProposalType",
on_delete=models.deletion.CASCADE,
),
),
],
Expand Down
19 changes: 13 additions & 6 deletions junction/conferences/migrations/0006_auto_20150216_1929.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,26 @@ class Migration(migrations.Migration):

operations = [
migrations.RemoveField(
model_name="emailreviewernotificationsetting", name="conference_reviewer",
model_name="emailreviewernotificationsetting",
name="conference_reviewer",
),
migrations.RemoveField(
model_name="emailreviewernotificationsetting", name="created_by",
model_name="emailreviewernotificationsetting",
name="created_by",
),
migrations.RemoveField(
model_name="emailreviewernotificationsetting", name="modified_by",
model_name="emailreviewernotificationsetting",
name="modified_by",
),
migrations.RemoveField(
model_name="emailreviewernotificationsetting", name="proposal_section",
model_name="emailreviewernotificationsetting",
name="proposal_section",
),
migrations.RemoveField(
model_name="emailreviewernotificationsetting", name="proposal_type",
model_name="emailreviewernotificationsetting",
name="proposal_type",
),
migrations.DeleteModel(
name="EmailReviewerNotificationSetting",
),
migrations.DeleteModel(name="EmailReviewerNotificationSetting",),
]
6 changes: 3 additions & 3 deletions junction/conferences/migrations/0014_conferencesettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@


def add_default_values(apps, schema_editor):
"""Add all default values
"""
"""Add all default values"""
ConferenceSetting = apps.get_model("conferences", "ConferenceSetting")
public_voting = ConferenceSettingConstants.ALLOW_PUBLIC_VOTING_ON_PROPOSALS
display_propsals = ConferenceSettingConstants.DISPLAY_PROPOSALS_IN_PUBLIC
Expand Down Expand Up @@ -80,7 +79,8 @@ class Migration(migrations.Migration):
(
"conference",
models.ForeignKey(
to="conferences.Conference", on_delete=models.deletion.CASCADE,
to="conferences.Conference",
on_delete=models.deletion.CASCADE,
),
),
(
Expand Down
3 changes: 1 addition & 2 deletions junction/conferences/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ def save(self, *args, **kwargs):
super(Conference, self).save(*args, **kwargs)

def is_accepting_proposals(self):
"""Check if any one of the proposal section is accepting proposal.
"""
"""Check if any one of the proposal section is accepting proposal."""
if (
self.status == ConferenceStatus.CLOSED_CFP
or self.status == ConferenceStatus.SCHEDULE_PUBLISHED
Expand Down
3 changes: 1 addition & 2 deletions junction/conferences/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@


def is_reviewer(user, conference):
"""Returns a boolean indicating if a given user is a conference reviewer.
"""
"""Returns a boolean indicating if a given user is a conference reviewer."""
if not user.is_authenticated():
return False

Expand Down
12 changes: 8 additions & 4 deletions junction/feedback/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ class Migration(migrations.Migration):
(
"conference",
models.ForeignKey(
to="conferences.Conference", on_delete=models.deletion.CASCADE,
to="conferences.Conference",
on_delete=models.deletion.CASCADE,
),
),
(
Expand Down Expand Up @@ -142,7 +143,8 @@ class Migration(migrations.Migration):
(
"schedule_item",
models.ForeignKey(
to="schedule.ScheduleItem", on_delete=models.deletion.CASCADE,
to="schedule.ScheduleItem",
on_delete=models.deletion.CASCADE,
),
),
],
Expand Down Expand Up @@ -217,7 +219,8 @@ class Migration(migrations.Migration):
(
"conference",
models.ForeignKey(
to="conferences.Conference", on_delete=models.deletion.CASCADE,
to="conferences.Conference",
on_delete=models.deletion.CASCADE,
),
),
(
Expand All @@ -235,7 +238,8 @@ class Migration(migrations.Migration):
model_name="scheduleitemtextfeedback",
name="question",
field=models.ForeignKey(
to="feedback.TextFeedbackQuestion", on_delete=models.deletion.CASCADE,
to="feedback.TextFeedbackQuestion",
on_delete=models.deletion.CASCADE,
),
preserve_default=True,
),
Expand Down
9 changes: 3 additions & 6 deletions junction/feedback/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ class Meta:

@python_2_unicode_compatible
class TextFeedbackQuestion(BaseSessionQuestionMixin, TimeAuditModel):
"""Store details about text feedback type information.
"""
"""Store details about text feedback type information."""

title = models.CharField(max_length=255, verbose_name="Text Feedback Title")

Expand All @@ -44,8 +43,7 @@ def to_response(self):

@python_2_unicode_compatible
class ChoiceFeedbackQuestion(BaseSessionQuestionMixin, TimeAuditModel):
"""Store details about text feedback type information.
"""
"""Store details about text feedback type information."""

title = models.CharField(max_length=255, verbose_name="Choice Feedback Title")

Expand All @@ -71,8 +69,7 @@ def to_response(self):

@python_2_unicode_compatible
class ChoiceFeedbackQuestionValue(TimeAuditModel):
"""Store allowed values for each choice based question
"""
"""Store allowed values for each choice based question"""

question = models.ForeignKey(
ChoiceFeedbackQuestion, related_name="allowed_values", on_delete=models.CASCADE
Expand Down
3 changes: 1 addition & 2 deletions junction/feedback/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ def get_choice_feedback_questions(conference_id):


def has_submitted(feedback, device_uuid):
"""
"""
""""""
device = Device.objects.get(uuid=device_uuid)
text_feedback = ScheduleItemTextFeedback.objects.filter(
schedule_item_id=feedback.validated_data["schedule_item_id"], device=device
Expand Down
3 changes: 1 addition & 2 deletions junction/feedback/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ def post(self, request):


def view_feedback(request, schedule_item_id):
"""Show text/choice feedback for the schedule.
"""
"""Show text/choice feedback for the schedule."""
schedule_item = get_object_or_404(ScheduleItem, pk=schedule_item_id)
if not can_view_feedback(user=request.user, schedule_item=schedule_item):
return HttpResponseForbidden("Access Denied")
Expand Down
3 changes: 2 additions & 1 deletion junction/profiles/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ class Migration(migrations.Migration):
(
"user",
models.OneToOneField(
to=settings.AUTH_USER_MODEL, on_delete=models.deletion.CASCADE,
to=settings.AUTH_USER_MODEL,
on_delete=models.deletion.CASCADE,
),
),
],
Expand Down
23 changes: 18 additions & 5 deletions junction/proposals/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,10 @@ def reviewer_votes_dashboard(request, conference_slug):

proposal_sections = conference.proposal_sections.all()
proposals_qs = Proposal.objects.select_related(
"proposal_type", "proposal_section", "conference", "author",
"proposal_type",
"proposal_section",
"conference",
"author",
).filter(conference=conference, status=ProposalStatus.PUBLIC)

proposals = []
Expand Down Expand Up @@ -247,7 +250,10 @@ def second_phase_voting(request, conference_slug):

proposal_sections = conference.proposal_sections.all()
proposals_qs = Proposal.objects.select_related(
"proposal_type", "proposal_section", "conference", "author",
"proposal_type",
"proposal_section",
"conference",
"author",
).filter(conference=conference, review_status=ProposalReviewStatus.SELECTED)

proposals = []
Expand Down Expand Up @@ -298,7 +304,10 @@ def export_reviewer_votes(request, conference_slug):

proposal_sections = conference.proposal_sections.all()
proposals_qs = Proposal.objects.select_related(
"proposal_type", "proposal_section", "conference", "author",
"proposal_type",
"proposal_section",
"conference",
"author",
).filter(conference=conference, status=ProposalStatus.PUBLIC)
proposals_qs = sorted(
proposals_qs, key=lambda x: x.get_reviewer_votes_sum(), reverse=True
Expand Down Expand Up @@ -334,7 +343,8 @@ def export_reviewer_votes(request, conference_slug):
[
comment.comment
for comment in p.proposalcomment_set.filter(
vote=True, deleted=False,
vote=True,
deleted=False,
)
]
)
Expand All @@ -346,7 +356,10 @@ def export_reviewer_votes(request, conference_slug):
p.get_reviewer_votes_count(),
)
+ vote_details
+ (p.get_votes_count(), vote_comment,)
+ (
p.get_votes_count(),
vote_comment,
)
)
if (
p.get_reviewer_votes_count_by_value(
Expand Down
Loading