This is the respectable thing for a roommate to do and you should notify your neighbors too. This is something that you should probably discuss before moving in with someone. If you or your roommate are going to be throwing parties, you might also want to discuss individual locks on your bedroom doors and other situations that may arise from a party setting.
Visit Step 3: Roommates in our Rental Timeline to learn more about roommate agreements and other helpful strategies to form strong relationships and help avoid conflicts with your roommates.