If we keep the spin degrees of freedom, which obviously leads to a more general code, we would need to flip spins as well and deal with the full Slater determinant. The above recipe is just a mere simplification to a case where we have identical particles, the same spatial single-particle functions and the same number of spin-up and spin-down fermions.