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

Add ImportCommand #126

Merged

Conversation

craigtonlian
Copy link

Closes #96

@craigtonlian craigtonlian added this to the v1.3 milestone Oct 27, 2023
@netlify
Copy link

netlify bot commented Oct 27, 2023

Deploy Preview for shiny-daffodil-45f25f ready!

Name Link
🔨 Latest commit c276ede
🔍 Latest deploy log https://app.netlify.com/sites/shiny-daffodil-45f25f/deploys/653ca41a93d6e80008226e36
😎 Deploy Preview https://deploy-preview-126--shiny-daffodil-45f25f.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov
Copy link

codecov bot commented Oct 27, 2023

Codecov Report

Merging #126 (c276ede) into master (74a51e7) will decrease coverage by 3.43%.
The diff coverage is 1.75%.

@@             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     
Files Coverage Δ
...n/java/seedu/staffsnap/logic/parser/CliSyntax.java 92.30% <100.00%> (+0.64%) ⬆️
...ava/seedu/staffsnap/model/interview/Interview.java 95.65% <100.00%> (ø)
src/main/java/seedu/staffsnap/MainApp.java 0.00% <0.00%> (ø)
.../staffsnap/logic/commands/AddInterviewCommand.java 50.00% <0.00%> (+1.72%) ⬆️
...affsnap/logic/commands/DeleteInterviewCommand.java 41.37% <0.00%> (+1.37%) ⬆️
...staffsnap/logic/commands/EditInterviewCommand.java 32.83% <0.00%> (+0.48%) ⬆️
...du/staffsnap/logic/parser/ApplicantBookParser.java 69.44% <0.00%> (-1.99%) ⬇️
...du/staffsnap/logic/parser/ImportCommandParser.java 0.00% <0.00%> (ø)
...edu/staffsnap/logic/parser/CsvApplicantParser.java 0.00% <0.00%> (ø)
.../java/seedu/staffsnap/logic/parser/ParserUtil.java 72.63% <0.00%> (-13.62%) ⬇️
... and 2 more

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@craigtonlian craigtonlian modified the milestones: v1.3, v1.3b Oct 27, 2023
# Conflicts:
#	src/main/java/seedu/staffsnap/logic/commands/AddInterviewCommand.java
Copy link

@CelestineTan03 CelestineTan03 left a 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();

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";

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";

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 👍

@craigtonlian craigtonlian merged commit d585d44 into AY2324S1-CS2103T-W08-1:master Oct 28, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Add import CSV feature
2 participants