Sign convention for sources
Sign convention for ideal sources
Voltage sources
The voltage across an ideal voltage source is independent of the current flowing through it. An ideal voltage source can be defined by an equation like this: $v = \text V$, for example: $v = 1.5\,\text V$. The equation does not have a term related to the current $i$. If you need to label the current through a voltage source, it can be done a few ways. In general, the options are:

No current label. Usually you don’t need to label current through a voltage source. The surrounding circuit context determines the direction of the current, (illustration 1).

If you are doing power calculations, $v\cdot i$, you probably want the correct sign for power: $+$ sign for power dissipation and $$ sign for generation. Use the same convention we defined for passive components: Current points into the positive voltage terminal of a voltage source (illustration 2).
explanation 1
 If it is important (or comforting) for the sign of current in a voltage source to have a positive sign, then use a convention where the current arrow points out of the positive voltage terminal, (illustration 3).
explanation 2
In most cases, the current flows out of the positive terminal of a voltage source. If you apply the the passives sign convention to the voltage source, in most cases the current ends up with a negative sign. This current arrow direction may feel “wrong,” or you may find it annoying, but it is not technically an error. It just means the current has a $$ sign, which isn’t a big deal.
My preference for labeling voltage sources is the first option: no convention. Different textbooks teach all versions of this sign convention. Be tolerant of those who learned from a different book. Everyone gets the right answer in the end.
“explanation 1”: “benefits of this convention” “One of the benefits of this convention is that power calculations come out with the correct sign. If we say dissipated power has a $+$ sign, this convention makes the sign of power come out right for both passive components and sources. Think of it as: sources “dissipate” negative power, which means they generate power.
Suppose a voltage source $v_s = 5\,\text{volts}$ is providing $200\,\text{mA}$ to a circuit, with the current flowing out of the positive terminal. With this convention (current arrow pointing into the voltage source), $i_s$ would have a value of $200\,\text{mA}$. The actual current is flowing opposite of the current arrow.
The power “dissipated” by the voltage source is $v_s \, i_s$ or $5\,\text V \cdot 200 \,\text{mA} =  1\,\text{watt}$. The minus sign on the power “dissipation” means the voltage source is generating $+1$ watt.
explanation 2” “benefits of this convention” “Using this third convention means the current from a voltage source or battery will almost always end up with a positive sign. The exception is a rechargeable battery while it is being charged. In that case, current is forced to flow into the positive terminal, and will pick up a $$ sign.
The label does not have to match the actual voltage
The label on a voltage source is usually oriented with the polarity arrow going in the same direction as the actual voltage generated by the source (1a.), but there is no law that says it has to. The black $+$ and $$ signs inside the symbol circle show the actual orientation of the source voltage. It is acceptable to define the label on a voltage source with the opposite polarity of the source itself (1b.). It may look odd, but it is not broken.
A voltage source with two alternative labels,
For a battery symbol, the longer black line indicates the positive terminal of the battery. A battery with two alternative labels,
When might you want to point the voltage label “backwards”? When we learn about Kirchoff’s Voltage Law sometimes it is helpful to point all the voltage arrows in the same direction going around a loop, (to make it easier to get the signs in the equation right). If one of the elements in the loop is a battery or voltage source, the voltage arrow may point opposite the actual voltage polarity.
Remember, the voltage labels are just labels, they are there to establish a reference direction for voltage in the context of the overall circuit. The labels don’t determine the internal properties of the voltage source or battery; that’s the job of the black symbol.
In some ways, a voltage label is similar to a force vector in mechanics, if you assign a vector going up and then run through the math and find your answer is negative, it means it’s actually going down. The direction is so you have a clear idea of which way things are actually moving when all is said and done.
Current sources
The current through an ideal current source is independent of the voltage across it. The equation describing a current source is: $i = \text I$, for example: $i = 1 \,\text A$. Voltage $v$ does not appear in this equation.
Current sources are usually labeled with a current arrow matching the direction of the symbol arrow, and no voltage indication. The actual voltage across the current source will emerge from the analysis of the surrounding circuit. If you need to label the voltage for some reason, it is usually done as shown in option 2, similar to the sign convention for passive components.
image 3