From 459cbc3ce7456184868a66c5b07ba878176c177d Mon Sep 17 00:00:00 2001 From: Shreyash-work-em Date: Mon, 30 Jun 2025 12:26:29 +0530 Subject: [PATCH 1/2] Feature/dmp 2025 (#66) * 1. Added year param in fetching issues * Removed submodule * Readded submodule --------- Co-authored-by: Srijan Srivastava Co-authored-by: jaanbaaz <106968030+jaanbaaz@users.noreply.github.com> --- .dockerignore | 1 + app.py | 8 ++++++-- shared_migrations | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.dockerignore b/.dockerignore index 4c49bd7..0311a10 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1 +1,2 @@ .env +!.git diff --git a/app.py b/app.py index 6cc73c5..7f099f7 100644 --- a/app.py +++ b/app.py @@ -90,9 +90,13 @@ async def get_issues(): type: string """ try: + # Get year from query parameters + year = request.args.get('year') + year = int(year) if year and year.isdigit() else None + # Fetch all issues with their details - print('inside get all issues') - data = await DmpAPIQueries.get_issue_query(async_session) + print(f'inside get all issues for year: {year}' if year else 'inside get all issues (all years)') + data = await DmpAPIQueries.get_issue_query(async_session, year=year) response = [] for result in data: diff --git a/shared_migrations b/shared_migrations index ec465a2..f22bad9 160000 --- a/shared_migrations +++ b/shared_migrations @@ -1 +1 @@ -Subproject commit ec465a29357edf78b2727d31e50a6f6d3b4d57dc +Subproject commit f22bad965438497715d4ac0959a135f5af161cf7 From 46aadb6618e92bc1ccbd1f89a88a594bef7ca0d5 Mon Sep 17 00:00:00 2001 From: Praveen Kumar Palaboyina <113330666+praveenkumar911@users.noreply.github.com> Date: Thu, 28 Aug 2025 18:17:24 +0530 Subject: [PATCH 2/2] 27/alpha (#68) * Update .dockerignore * Feature/dmp 2025 (#66) (#67) * 1. Added year param in fetching issues * Removed submodule * Readded submodule --------- Co-authored-by: Srijan Srivastava Co-authored-by: jaanbaaz <106968030+jaanbaaz@users.noreply.github.com> * added alphabetical order --------- Co-authored-by: Srijan Srivastava Co-authored-by: jaanbaaz <106968030+jaanbaaz@users.noreply.github.com> Co-authored-by: Shreyash-work-em Co-authored-by: praveenkumar911 --- app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 7f099f7..ab6b96f 100644 --- a/app.py +++ b/app.py @@ -105,7 +105,8 @@ async def get_issues(): 'org_name': result.org_name, 'issues': result.issues }) - + # Sort response by org_name alphabetically + response.sort(key=lambda x: x['org_name'].lower()) return jsonify({"issues": response}) except Exception as e: