Page MenuHomePhabricator

Reduce duplicate dependency specifications and unnecessary installations
Open, LowPublic

Description

As discussed in I574a92dd and I0d889513, the dependencies are specified on many places making their management harder. The work should aim to make deps specification on one place and install only those necessary in the specific case.

Original analysis:

Ufff. Okay, let's consolidate dependencies a little: what do we really need?

    User requirement file for users
    Devs requirement file (also for testing) for developers
    Pypi setup.py requirements - should be same as user, let's merge them to one file and load the file contents by setup.py?
    Zuul reqs - user + devs (testing) - do we need all the files to contain them: in tox.ini, in requirements files and also in setup.py and who knows where else?
    Zuul post-merge reqs
    Travis reqs - probably user + devs (testing) - the same question as for Zuul
    AppVeyor reqs - same as Travis
    what else? (coverage, docker, climate)

Let's get serious: What if we would have two files, reqs.txt and dev-reqs.txt. First one loaded by setup.py, second one loaded by setup.py if --test-reqs parametr given (by running setup.py --test-reqs in tox.ini, .travis.yml, .appveyor.yml), no requirements lists present in tox.ini, .travis.yml, .appveyor.yml and setup.py at all? Am I correct?

Do we really need .travis.yml, .appveyor.yml if we have tox.ini?

What else from these files could be consolidated to make the growing requirements lists as small as possible?

Ideas:

  • Remove requirements.txt and create a special extra category in setup.py: Users would then install extra deps like: pip install pywikibot[deps], the same for dev-requirements.txt and docs/py3-requirements.txt
  • Replace deps in tox.ini, requirements.txt, dev-requirements.txt and docs/py3-requirements.txt by categories in setup.py: mwparserfromhell>=0.3.3 --> .[patrol.py]
  • Possibly rethink dep categories in setup.py: [basic], [security], [test], [devel], [doc], [flake8], ...
  • any other?

Related Objects

Event Timeline

Dvorapa updated the task description. (Show Details)
Dvorapa updated the task description. (Show Details)
Dvorapa updated the task description. (Show Details)
Dvorapa updated the task description. (Show Details)
Xqt triaged this task as Low priority.May 1 2018, 3:09 PM

Change 430021 had a related patch set uploaded (by Dalba; owner: Dalba):
[pywikibot/core@master] Deprecate requests-requirements.txt

https://gerrit.wikimedia.org/r/430021

Change 430021 merged by jenkins-bot:
[pywikibot/core@master] Deprecate requests-requirements.txt

https://gerrit.wikimedia.org/r/430021

Change 434317 had a related patch set uploaded (by Dalba; owner: Dalba):
[pywikibot/core@master] Move flake8 dependencies to setup.py

https://gerrit.wikimedia.org/r/434317

Change 434317 merged by jenkins-bot:
[pywikibot/core@master] Move flake8 dependencies to setup.py

https://gerrit.wikimedia.org/r/434317

Change 434356 had a related patch set uploaded (by Dvorapa; owner: Dvorapa):
[pywikibot/core@master] [WIP][IMPR] Get rid of requirements files

https://gerrit.wikimedia.org/r/434356

Vvjjkkii renamed this task from Reduce duplicate dependency specifications and unnecessary installations to zwdaaaaaaa.Jul 1 2018, 1:12 AM
Vvjjkkii raised the priority of this task from Low to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed subscribers: gerritbot, Aklapper.
CommunityTechBot renamed this task from zwdaaaaaaa to Reduce duplicate dependency specifications and unnecessary installations.Jul 2 2018, 7:21 AM
CommunityTechBot lowered the priority of this task from High to Low.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added subscribers: gerritbot, Aklapper.

Change 515189 had a related patch set uploaded (by Dvorapa; owner: Dvorapa):
[pywikibot/core@master] [IMPR] Move docs requirements to the setup.py

https://gerrit.wikimedia.org/r/515189

Change 515189 abandoned by Dvorapa:
[IMPR] Move docs requirements to the setup.py

Reason:
I can not detach anything from that patch :(

https://gerrit.wikimedia.org/r/515189

Change 515204 had a related patch set uploaded (by Dvorapa; owner: Dvorapa):
[pywikibot/core@master] [IMPR] Organize setup.py dependencies

https://gerrit.wikimedia.org/r/515204

Change 516460 had a related patch set uploaded (by Dvorapa; owner: Dvorapa):
[pywikibot/core@master] [IMPR] Reduce deprecated stuff in requests-requirements.txt

https://gerrit.wikimedia.org/r/516460

Change 516460 merged by jenkins-bot:
[pywikibot/core@master] [IMPR] Reduce deprecated stuff in requests-requirements.txt

https://gerrit.wikimedia.org/r/516460

Change 516476 had a related patch set uploaded (by Dvorapa; owner: Dvorapa):
[pywikibot/core@master] [IMPR] Deprecate requirements.txt

https://gerrit.wikimedia.org/r/516476

Not actively working on it

Change 515204 abandoned by Xqt:
[pywikibot/core@master] [IMPR] Get rid of requirements files

Reason:
Duplicate of https://gerrit.wikimedia.org/r/c/pywikibot/core/ /434356

https://gerrit.wikimedia.org/r/515204

Change 515204 restored by Dvorapa:

[pywikibot/core@master] [IMPR] Get rid of requirements files

https://gerrit.wikimedia.org/r/515204

Change 434356 abandoned by Xqt:

[pywikibot/core@master] [IMPR] Get rid of requirements files

Reason:

Duplicate of https://gerrit.wikimedia.org/r/c/pywikibot/core/+/515204

https://gerrit.wikimedia.org/r/434356