Cook the pasta in boiling water salted until done but still firm, al dente. Drain and keep warm.
Drain the artichokes, reserving the liquid, and coarsely chop.
Heat the olive oil in a heavy sauce pan, add the onions and saute until the onions are soft, about 3 to 4 minutes. Add the reserved artichoke liquid, chiles, chopped artichokes, and basil. Reduce the heat and simmer the sauce for an additional 5 minutes.
Remove from the heat and stir in the ricotta cheese. Toss the pasta in the sauce to coat, top with the nuts, olives, and grated cheese. Garnish with the parsley and serve.