Should I file as a California resident or non-resident?

I'm trying to figure out if I should be filing the 540 or 540NR.


I arrived in California (from Canada) on August 1, 2019 to start at my new job. I also worked in California for 8 months in 2018 on internships, before I moved back to Canada at the end of the year. As a result, for my federal return, based on the substantial presence test I'm filing as a full-year tax resident for 2019, and thus a filing a 1040 rather than 1040NR. 

In January 2019, before I started my job, I also received a signing bonus from the company (based in California) for accepting the job offer. Thus, all of my income sources in 2019 are from California sources.