Skip to content

Merge changes from dev to main#198

Open
hridyesh-gupta wants to merge 36 commits into
mainfrom
dev
Open

Merge changes from dev to main#198
hridyesh-gupta wants to merge 36 commits into
mainfrom
dev

Conversation

@hridyesh-gupta
Copy link
Copy Markdown
Collaborator

This PR contains the commits which were there in dev only, merging them into main to sync both the branches. To make the main branch 'Ready to deploy'.

avartirastogi and others added 25 commits March 16, 2026 16:14
Add database schema for automated scoring mode.
- New automated_settings JSON column on contests table for storing
eligibility criteria and evaluation point configuration
- Alembic migration to add the column
…193)

Add frontend support for configuring automated scoring mode.
- New "Automated Scoring" option in contest creation form
- Eligibility criteria settings (minimum edits, minimum outgoing links)
- Evaluation point settings (points per byte, link, reference, image,
etc.)
- Automated mode is mutually exclusive with simple/multi-parameter modes
Allow importing articles from Wikipedia categories as pending
submissions.
- Category selector with configurable import limit (up to 5000 articles)
- Automatic duplicate detection to skip already-submitted articles
- Import summary showing total imported and skipped counts
- Available only for automated scoring contests with configured
categories
- Restricted to jury members and superadmins
Automatically evaluate submissions based on configured scoring criteria.
- Eligibility checks (minimum edits, minimum outgoing links)
- Point-based scoring across multiple dimensions (bytes, links,
references, infoboxes, images)
- Clickable status badges and scores to view evaluation details
- Score breakdown modal showing points earned per component (for
accepted ones) or rejection reason (for rejected ones)
- Batch evaluation triggered via "Refresh Metadata" button
…omated scoring (#196)

Dashboard and editing improvements for automated scoring contests.
- Filter tabs (All | Accepted | Rejected | Pending) with count badges
above the submissions table
- Hide multi-parameter scoring toggle when in automated scoring mode
- Show editable eligibility and evaluation criteria in the edit modal
for automated scoring contests
- Non-automated contests remain completely unaffected
GauriGupta21 and others added 4 commits April 17, 2026 19:31
…con (#200)

- Removed filter functionality from leaderboard
- Replaced ranking system with alphabetical sorting
- Fixed trusted members icon display

This improves UI clarity and simplifies user experience.
Updated dashboard UI and improved contest behavior:
- Added Pagination to the dashboard
- Implemented scrolling on the dashboard
- Updated contest section to show participated contests instead of
created ones
- Removed jury review label from feedback forms
- Fixed z-index issue to ensure alerts/notifications appear above the
modal
- Improved layout and alignment issues in contest view UI
@Agamya-Samuel
Copy link
Copy Markdown
Collaborator

The only inconsistency I found is not in the migrations themselves, but in the code alignment itself:
the backend's evaluate_automated_submission() method expects min_bytes and min_references in the eligibility criteria,

but the frontend doesn't provide input fields for these values.

The database schema (via automated_settings JSON column) can store these values, but the UI doesn't expose them.

Comment thread backend/app/routes/contest_routes.py Outdated
current_app.logger.warning(
"Failed to fetch infobox count: %s", str(ibx_error)
)
except Exception: # pylint: disable=broad-exception-caught
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Comment thread backend/app/routes/contest_routes.py Outdated
# validation or scoring yet.
try:
image_count = get_article_image_count(article_link)
except Exception as img_error: # pylint: disable=broad-exception-caught
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

disabling pylint is not a good practice.
pylint warings are there for a reason.
and they should be handled properly.

Comment thread backend/app/routes/contest_routes.py Outdated
current_app.logger.warning(
"Failed to fetch image count: %s", str(img_error)
)
except Exception: # pylint: disable=broad-exception-caught
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Comment thread backend/app/routes/contest_routes.py Outdated

try:
infobox_count = get_article_infobox_count(article_link)
except Exception as ibx_error: # pylint: disable=broad-exception-caught
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

from flask import current_app

current_app.logger.warning("%s: %s", message, str(error))
except Exception: # pylint: disable=broad-exception-caught
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same in this file

Comment thread frontend/src/views/ContestView.vue
Comment thread backend/app/routes/contest_routes.py Outdated
Comment thread backend/app/models/contest.py
Comment thread backend/app/utils/__init__.py Outdated
Comment thread backend/app/routes/contest_routes.py
@Agamya-Samuel
Copy link
Copy Markdown
Collaborator

Please attach a video preview or some sort of reference point,
This greatly reduces the waiting time from the maintainer side,
and also gets a PR Merged quickly.

The reason why it took so much time to merge this PR,
I need to verify each new commit introduced, 32 commits in this case, are aligned with the Tool's proposed workflow.

cc @hridyesh-gupta @GauriGupta21

@GauriGupta21
Copy link
Copy Markdown
Collaborator

GauriGupta21 commented Apr 19, 2026

Screenshots of each PR are attached for reference, along with clear descriptions of the changes:

  1. Leaderboard Improvements
    Before:
    Leaderboard had multiple filters
    Rankings were displayed
    After:
    Removed all filters from the leaderboard
    Articles are now listed in alphabetical order only
    Ranking display has been removed for a cleaner and simpler view
image
  1. Trusted Member Icon in Profile
    Before:
    Trusted member icon was not visible on user profiles
    After:
    Trusted member icon is now displayed correctly on the profile
image
  1. Dashboard UI Enhancements
    Before:
    No pagination
    Long scrolling made it difficult to navigate
    After:
    Added pagination for better data handling
    Improved scrolling experience for smoother navigation
image
  1. Jury Feedback Form Update
    Before:
    Juror’s name was visible in the feedback form
    After:
    Removed juror’s name to maintain neutrality/anonymity
image
  1. Contest View UI Fixes
    Before:
    Inconsistent UI across sections
    Blue header was not properly aligned or visible in all sections
    After:
    Fixed UI inconsistencies across all sections
    Standardized the blue header for consistency
image
  1. Contest Create Page & Alert Fixes
    Before:
    Z-index issues on the contest create page
    Alerts appeared behind the contest modal
    After:
    Fixed z-index on the contest create page
    Alerts now appear above the contest modal, ensuring proper visibility
image

…_count column. The column 'article_word_count' stores the article's size in BYTES (from MediaWiki API 'size' field), not a word count. Add a property alias so new code can reference the semantically correct name without a risky Alembic migration.
… fields

The automated evaluation engine was reading min_bytes and min_references from automated_settings.eligibility, but those had no UI and always defaulted to 0. Now reads from the common contest fields (min_byte_count, min_reference_count) shared across all scoring modes.
Adds mwparserfromhell==0.6.6 to parse wikitext ASTs for reliable ref tag counting. Regex fallback is preserved for environments where the dependency is unavailable.
…ain validation

Metadata Refresh Pagination:
- Paginate metadata refresh for automated scoring contests using  offset/batch_size query params (default 10 articles per batch)
- Frontend loops through batches with persistent progress counter
- Simple/multi-parameter scoring modes unchanged
Category Crawler Rate-Limiting:
- Cap crawl imports per request (default 500, hard cap 2000 via MAX_CRAWL_LIMIT env var)
- Add cmcontinue-based pagination with 'Import Next Batch' support
- Upgrade reference counting to use mwparserfromhell with regex fallback
Others:
- Add DELETE /submission/<id> endpoint (fixes 405 METHOD NOT ALLOWED for reviewers trying to delete submissions)
- Add cross-wiki domain validation for automated scoring contests
- Fix pylint import-outside-toplevel suppressions
@hridyesh-gupta
Copy link
Copy Markdown
Collaborator Author

@Agamya-Samuel Mostly of the suggested optimizations have been done except the pylint warnings, it requires too much time and being a lil bit busy with my work I'm not able to do that currently but can work on it in near future.

Also checked the entire app pipeline end-to-end and all the functionalities are working fine as expected. Kindly review it again and let me know if any other changes are required.

@Agamya-Samuel
Copy link
Copy Markdown
Collaborator

Agamya-Samuel commented May 20, 2026

@Agamya-Samuel Mostly of the suggested optimizations have been done except the pylint warnings, it requires too much time and being a lil bit busy with my work I'm not able to do that currently but can work on it in near future.

Also checked the entire app pipeline end-to-end and all the functionalities are working fine as expected. Kindly review it again and let me know if any other changes are required.

thanks for the update @hridyesh-gupta, will review this by EoD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants