If you were a resident of NY for 7 months, then you will file your return as a NY Part Year Resident, only claiming the income on the return that you earned while a resident of the state. When you start the NY return you will be asked about your residency, enter the dates you lived there.
Since you moved to Puerto Rico, if you are a Bona fide resident, the only income that is entered on your return should be income earned while a resident of NY, this means all of the income should be taxed and there will not be any type of income allocation necessary.
If you are NOT a Bona fide resident of Puerto Rico, then you would need to include ALL income from ALL sources worldwide on your return. In this situation, you would need to walk through the income allocation steps in the NY return to have the income that you earned while not a resident of the state not be taxed by the state.
**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"