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

Import Export feature #166

Merged
merged 25 commits into from
Oct 29, 2018

Conversation

kr0stofa
Copy link

@kr0stofa kr0stofa commented Oct 29, 2018

Create a PortManager class to handle reading and writing of data to/from files. Uses XmlUtil
Anakin now contains a PortManager
The default location for export/import is the root folder normally called "main". (Same folder as README.adoc)

Includes PortManager, Commands, Parser, Unit Tests.

Todo: Integrated testing

@kr0stofa kr0stofa added this to the v1.3 milestone Oct 29, 2018
@kr0stofa
Copy link
Author

Resolves #57

And Formatting
@coveralls
Copy link

Pull Request Test Coverage Report for Build 363

  • 53 of 122 (43.44%) changed or added relevant lines in 10 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-2.8%) to 86.296%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/main/java/seedu/address/logic/commands/ImportDeckCommand.java 7 9 77.78%
src/main/java/seedu/address/logic/parser/Parser.java 0 2 0.0%
src/main/java/seedu/address/model/deck/anakinexceptions/DeckImportException.java 0 2 0.0%
src/main/java/seedu/address/model/ModelManager.java 0 4 0.0%
src/main/java/seedu/address/logic/parser/ExportDeckCommandParser.java 0 5 0.0%
src/main/java/seedu/address/logic/parser/ImportDeckCommandParser.java 0 8 0.0%
src/main/java/seedu/address/model/Anakin.java 1 9 11.11%
src/main/java/seedu/address/storage/XmlExportableDeck.java 24 32 75.0%
src/main/java/seedu/address/logic/commands/ExportDeckCommand.java 0 14 0.0%
src/main/java/seedu/address/storage/portmanager/PortManager.java 21 37 56.76%
Totals Coverage Status
Change from base Build 354: -2.8%
Covered Lines: 1694
Relevant Lines: 1963

💛 - Coveralls


Deck deckToExport = lastShownList.get(targetIndex.getZeroBased());
String exportPath = model.exportDeck(deckToExport);
System.out.println(exportPath);

Choose a reason for hiding this comment

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

Is this for debugging?

Suggested change
System.out.println(exportPath);

@@ -57,6 +57,10 @@

boolean isInsideDeck();

String exportDeck(Deck deck);

Deck importDeck (String filepath);

Choose a reason for hiding this comment

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

Suggested change
Deck importDeck (String filepath);
Deck importDeck(String filepath);

@thanh-ntt
Copy link

As you add some more methods to existing classes, it would be nice if you can change the test classes to cover those new methods

@kr0stofa kr0stofa merged commit 3a24530 into CS2103-AY1819S1-T09-2:master Oct 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants