[PATCH] scripts: add developer script validate-commits

Thomas De Schampheleire patrickdepinguin at gmail.com
Wed Jan 2 20:21:27 UTC 2019


El mié., 2 ene. 2019 a las 21:08, Mads Kiilerich
(<mads at kiilerich.com>) escribió:
>
> On 1/2/19 7:52 PM, Thomas De Schampheleire wrote:
> > El lun., 31 dic. 2018 a las 1:53, Mads Kiilerich
> > (<mads at kiilerich.com>) escribió:
> >
> >>> +    hg log -r "$rev"
> >>> +    hg update "$rev"
> >>> +
> >>> +    cleanup
> >>> +    virtualenv -p "$(command -v python2)" "$venv"
> >>> +    source "$venv/bin/activate"
> >>> +    pip install --upgrade pip setuptools
> >>> +    pip install -e .
> >>> +    pip install -r dev_requirements.txt
> >>
> >> I have found that in case of "different but compatible constraints", it
> >> is more stable to install both the app and dev requirements at once: pip
> >> install --upgrade -e . -r dev_requirements.txt
> >>
> >> We should perhaps change to recommend that everywhere?
> > 'everywhere' would be in this script and in docs/contributing.rst, right?
> > In other places there is no installation of dev_requirements?
>
>
> Yes, and scripts/make-release .
>
>
> >>> +    pip install python-ldap python-pam
> >>
> >> Should we just include these in dev_requirements.txt ?
> > I think both of these packages have dependencies expected on the host
> > system. python-ldap requires the ldap.h header file, normally provided
> > by the host system.
> > For 'core' developers like you and me, we could reasonably expect them
> > to 'sacrifice' their host system and install stuff they would not
> > otherwise need, but for casual developers it may be a bit too much.
> > (just my thoughts)
>
>
> Yeah. Just an annoying extra step I often forget when testing in a new
> virtualenv.
>
> I can solve it by keeping
> pip install --upgrade -e . -r dev_requirements.txt python-ldap python-pam
> in my hash history ;-)
>

But this is exactly why I made this script, so now you can happily use it too :)

I have another script that sets up a test kallithea instance from a
repository, creating an ini file, creating a database and setting a
random port so that multiple instances can run next to each other.
That script is more for 'live' usage, unlike validate-commits.

/Thomas


More information about the kallithea-general mailing list