openfisca / openfisca-core

OpenFisca core engine. See other repositories for countries-specific code & data.
https://openfisca.org
GNU Affero General Public License v3.0
168 stars 75 forks source link

Documentation testing broken since flake8 upgrade #1140

Closed bonjourmauko closed 2 years ago

bonjourmauko commented 2 years ago

Hi there!

I really enjoy OpenFisca, but I recently encountered an issue.

Here is what I did:

I created a PR #1138

Here is what I expected to happen:

All tests to pass.

Here is what actually happened:

Doc tests are failing since the merging of #1137 .

Here is data (or links to it) that can help you reproduce this issue:

It sems to me that #1137 did not create the problem, but solved it partially.

Context

I identify more as a:

MattiSG commented 2 years ago

Thank you for reporting this issue!

To be more precise, it is the install step of the doc tests that fails. This explains why the tests passed in #1137 and failed afterwards.

Indeed, the test-doc-install task executes:

    @pip install --requirement doc/requirements.txt 1> /dev/null
    @pip install --editable .[dev] --upgrade 1> /dev/null

And doc/requirements.txt contains:

--editable git+https://github.com/openfisca/openfisca-core.git@master#egg=OpenFisca-Core[dev]

There is thus an inconsistency where the Core is installed both from the local version and the production version, leading to the clear error:

ERROR: Cannot install -r doc/requirements.txt (line 6), OpenFisca-Core and flake8==4.0.1 because these package versions have conflicting dependencies.

Thus, the fix proposed in #1141 cannot be tested properly as the setup will always be inconsistent between testing on master and testing on a feature branch, as dependencies will be pulled from master.

I cannot reproduce the issue in #1136 anymore, nor can reproduce failing tests locally with make test-doc.

Could you please attach to this issue a description of how to reproduce the failure?