שמות לא, יז : וּבַיוֹם הַשְבִּיעִּי שָבַת וַיִּנָפַש
There are two verbs in this phrase שבת and וינפש (he ceased and he rested) which seem to ascribe anthropomorphic (human) attributes to HaShem. Rashi and others attempt to interpret these verbs in a manner which would not attribute the action to HaShem.
The Sforno in his interpretation anticipates this problem and explains the verse as follows: When HaShem completed His work of Creation it brought tranquility for any completion brings with it a great sense of peace and serenity. This is the sense of the word שבת.
As for the word וינפש Sforno explains it to mean that the Shabbos was given to expand one’s soul (נפש) and grant an added dimension to the soul so that one can be better prepared to realize the purpose meant for him and to reach the goal of serving HaShem.