Skip to content

feat(dc): Add seeders for daily challenge and add get route for daily challenges#6

Merged
Ram-20062003 merged 16 commits intomainfrom
daily_challenges
Jan 12, 2023
Merged

feat(dc): Add seeders for daily challenge and add get route for daily challenges#6
Ram-20062003 merged 16 commits intomainfrom
daily_challenges

Conversation

@ZaBarudo
Copy link
Copy Markdown

@ZaBarudo ZaBarudo commented Dec 31, 2022

Done

  • Made a Repository, Entity, Service and controller for Getting Daily Challenges
  • Made a seed.py for initially populating db with daily challenges (Not included in the commit)
  • Made sure /dc/get route is working

Todo

  • Use a proper seeder to seed the data initially
  • Do proper index calculation to get the correct daily challenge after we put the hosted date in .env
  • Add getdc function to interface

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Dec 31, 2022

Codecov Report

Merging #6 (7c47afe) into main (e571a09) will decrease coverage by 1.29%.
The diff coverage is 20.33%.

@@             Coverage Diff              @@
##               main       #6      +/-   ##
============================================
- Coverage     51.07%   49.77%   -1.30%     
- Complexity      251      255       +4     
============================================
  Files            75       79       +4     
  Lines          1300     1358      +58     
  Branches        101      104       +3     
============================================
+ Hits            664      676      +12     
- Misses          613      656      +43     
- Partials         23       26       +3     
Impacted Files Coverage Δ
...ter/server/daily_challenge/DailyChallengeEntity.kt 0.00% <0.00%> (ø)
...ter/server/daily_challenge/DailyChallengeObject.kt 0.00% <0.00%> (ø)
...er/server/daily_challenge/DailyChallengeService.kt 23.52% <23.52%> (ø)
...decharacter/server/seeders/DailyChallengeSeeder.kt 24.00% <24.00%> (ø)
...server/daily_challenge/DailyChallengeController.kt 66.66% <66.66%> (ø)
...lin/delta/codecharacter/server/game/GameService.kt 95.65% <0.00%> (+2.17%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Copy Markdown
Collaborator

@Ram-20062003 Ram-20062003 left a comment

Choose a reason for hiding this comment

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

Changes Requested

  • Remove the script for db-seeders and add seeders in spring-boot.
  • Revert all the un-necessary changes.
  • Configure your .gitignore properly.
  • Get event_start_date from application.yml and find the day for allocating the daily challenge.

Comment thread docker-compose.dev.yml Outdated
Comment thread .gitignore Outdated
Comment thread docker-compose.dev.yml Outdated
Comment thread server/src/main/resources/META-INF/application.docker.yml Outdated
Copy link
Copy Markdown
Collaborator

@Ram-20062003 Ram-20062003 left a comment

Choose a reason for hiding this comment

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

Changes Requested

  1. Remove start_date from docker env. Get the start_date from application.yml
  2. Replace the hardcoded dcConstants filepath.
  3. Removeprint statements. Instead use logger.
     // example
     private val logger : Logger = LoggerFactory.getLogger(DailyChallengeSeeder::class.java)
     logger.info("Your Log Statemnent")
  1. Seed the database only when needed
  2. Store the start_date in format YYYY-mm-ddHH:MM:ssZ , so we can get the exact 24 hr count for posting daily challenge
  3. Pull the recent commits from main and update PR accordingly.
  4. /dc/get route will be returning the status of the chall which says whether the user has completed or not. So make it as a protected route . The route already accepts jwt as Bearer token
  5. Do remove seed.js from .gitignore and harcoded values

Comment thread docker-compose.dev.yml Outdated
Comment thread server/src/main/kotlin/delta/codecharacter/server/ServerApplication.kt Outdated
Comment thread .gitignore Outdated
Comment thread server/src/main/resources/dcConstants.example.json Outdated
Comment thread server/src/main/resources/application.docker.example.yml Outdated
Comment thread server/src/main/resources/application.example.yml
Comment thread server/src/main/kotlin/delta/codecharacter/server/seeders/DailyChallengeSeeder.kt Outdated
@Ram-20062003
Copy link
Copy Markdown
Collaborator

Run format and fix lint-issues

@Ram-20062003 Ram-20062003 changed the title Daily challenges feat(dc): Add seeders for daily challenge and add get route for daily challenges Jan 12, 2023
@Ram-20062003 Ram-20062003 merged commit 82edb0e into main Jan 12, 2023
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.

4 participants