Skip to content

Kennahh/tp

 
 

Repository files navigation

ASTRA

This is a project template for a greenfield Java project. It's named after the Java mascot Duke. Given below are instructions on how to use it.

What is ASTRA

ASTRA is your Academic Scheduler, Tasks, Reminders Assistant. It helps track tasks, lectures, tutorials and exams, and now includes a GPA tracker that computes your current GPA from your modules and grades.

Quick start (CLI)

  • Build and run tests:
    • Windows (cmd):
      • gradlew.bat test
    • macOS/Linux:
      • ./gradlew test
  • Run the app (prints the ASTRA logo and intro):
    • Windows (cmd):
      • gradlew.bat run
    • Or run the packaged jar (if built):
      • java -jar build/libs/Astra.jar

GPA Tracker (new)

  • Add an entry
    • add gpa
    • Example: add gpa CS2040C A+ 4mc
  • List entries
    • list gpa
  • Compute current GPA
    • gpa
    • Printed to 2 decimal places; S/U entries are excluded
  • Delete an entry by index
    • delete gpa

Notes

  • Inputs are case-insensitive for the first word; subject and grade are uppercased on storage.
  • Allowed grades: A+, A, A-, B+, B, B-, C+, C, D+, D, F; S or U are stored but excluded from GPA.
  • Storage
    • Activities: data/tasks.txt
    • GPA: data/gpa.txt (pipe format) and data/gpa.csv (CSV)

Setting up in Intellij

Prerequisites: JDK 17 (use the exact version), update Intellij to the most recent version.

  1. Ensure Intellij JDK 17 is defined as an SDK, as described here -- this step is not needed if you have used JDK 17 in a previous Intellij project.
  2. Import the project as a Gradle project, as described here.
  3. Verify the setup: After the importing is complete, locate the src/main/java/seedu/duke/Duke.java file, right-click it, and choose Run Duke.main(). If the setup is correct, you should see something like the below:
    > Task :compileJava
    > Task :processResources NO-SOURCE
    > Task :classes
    
    > Task :Duke.main()
    Hello from
     ____        _        
    |  _ \ _   _| | _____ 
    | | | | | | | |/ / _ \
    | |_| | |_| |   <  __/
    |____/ \__,_|_|\_\___|
    
    What is your name?
    
    Type some word and press enter to let the execution proceed to the end.

Warning: Keep the src\main\java folder as the root folder for Java files (i.e., don't rename those folders or move Java files to another folder outside of this folder path), as this is the default location some tools (e.g., Gradle) expect to find Java files.

Build automation using Gradle

  • This project uses Gradle for build automation and dependency management. It includes a basic build script as well (i.e. the build.gradle file).
  • If you are new to Gradle, refer to the Gradle Tutorial at se-education.org/guides.

Testing

I/O redirection tests

  • To run I/O redirection tests (aka Text UI tests), navigate to the text-ui-test and run the runtest(.bat/.sh) script.

JUnit tests

Checkstyle

CI using GitHub Actions

The project uses GitHub actions for CI. When you push a commit to this repo or PR against it, GitHub actions will run automatically to build and verify the code as updated by the commit/PR.

Documentation

/docs folder contains a skeleton version of the project documentation.

Steps for publishing documentation to the public:

  1. If you are using this project template for an individual project, go your fork on GitHub.
    If you are using this project template for a team project, go to the team fork on GitHub.
  2. Click on the settings tab.
  3. Scroll down to the GitHub Pages section.
  4. Set the source as master branch /docs folder.
  5. Optionally, use the choose a theme button to choose a theme for your documentation.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 99.4%
  • Other 0.6%