-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add ImportCommand #126
Add ImportCommand #126
Conversation
✅ Deploy Preview for shiny-daffodil-45f25f ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov Report
@@ Coverage Diff @@
## master #126 +/- ##
============================================
- Coverage 69.78% 66.35% -3.43%
- Complexity 559 560 +1
============================================
Files 89 93 +4
Lines 2002 2107 +105
Branches 216 235 +19
============================================
+ Hits 1397 1398 +1
- Misses 534 637 +103
- Partials 71 72 +1
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
# Conflicts: # src/main/java/seedu/staffsnap/logic/commands/AddInterviewCommand.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work adding the import command! 🥇 I like how you provided a sample csv file applicants.csv
for users to import 😄
Perhaps can include the format of the csv file to be imported into the ug, such as:
- including the header row (since the parser currently skips the first row in the csv file)
- adding applicant details in the correct order
name
,phone
,email
,position
(since the details of an applicant is currently extracted in that order, and any other order would result in an error) 😊
*/ | ||
model.updateFilteredApplicantList(PREDICATE_HIDE_ALL_APPLICANTS); | ||
model.updateFilteredApplicantList(PREDICATE_SHOW_ALL_APPLICANTS); | ||
model.refreshApplicantList(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for refactoring 😄
+ "already in Staff-Snap: %s"; | ||
public static final String MESSAGE_CSV_CONTAINS_DUPLICATE = "The csv file contains duplicate applicants: %s"; | ||
public static final String MESSAGE_FILE_NOT_FOUND = "File not found: %s"; | ||
public static final String FILENAME_VALIDATION_REGEX = "[-_. A-Za-z0-9]+\\.csv"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice regex! 🤩
@@ -14,8 +14,7 @@ | |||
*/ | |||
public class Interview implements Comparable<Interview> { | |||
|
|||
public static final String MESSAGE_CONSTRAINTS = "Interview types should be alphanumeric"; | |||
public static final String VALIDATION_REGEX = "\\p{Alnum}+"; | |||
public static final String MESSAGE_CONSTRAINTS = "Interview types should not be empty"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that a non-empty interview type is a better constraint 👍
Closes #96