This work describes a unified method to treat model and general flux-surface shape in gyrokinetic and neoclassical transport calculations. In both cases the associated equilibria are constructed to be solutions of the Grad-Shafranov equation on each flux surface. Included is a systematic calculation and cataloging of the set of functions required to implement the method numerically. In the case where model equilibria (defined by shape parameters such as elongation and triangularity) are considered, we provide a modest extension of the original method usually attributed to Miller, whereas for general equilibria, a Fourier method is developed. The unified formulation makes use of and extends the intuitively appealing concepts of a midplane minor radius and effective field, originally introduced by Waltz (Waltz and Miller 1999 Phys. Plasmas 6 4265). In the limit that the model and general flux-surface shapes approach one another, the two methods give identical results. Although the Miller model approach has been widely implemented over the past decade, variations or errors in the implementations can vary to the extent that code-code comparisons are difficult or ambiguous. This work should serve to standardize such implementations. Finally, it is shown that for N = 12 Fourier harmonics in the general expansion, the accuracy of the present approach likely exceeds that of, and is thus limited by, the original equilibrium data.