client: support optional date in Revision and Release
From the model specification, the date attribute in Revision and Release objects is optional. This commit handles the date attribute set to the None value.
It also tests the "typification" of a minimal Revision object to avoid regressions on this usecase.
Migrated from D2958 (view on Phabricator)
Merge request reports
Activity
Build has FAILED
Patch application report for D2958 (id=10533)
Could not rebase; Attempt merge onto 492be567...
Updating 492be56..cbdab1f Fast-forward swh/web/client/__init__.py | 2 +- swh/web/client/client.py | 55 +++++++- swh/web/client/tests/api_data.py | 210 ++++++++++++++++++++++++++++ swh/web/client/tests/conftest.py | 10 +- swh/web/client/tests/gen-api-data.sh | 2 + swh/web/client/tests/test_web_api_client.py | 31 ++++ 6 files changed, 304 insertions(+), 6 deletions(-)
Changes applied before test
commit cbdab1f549e21975e1923a4e874c9635936b9442 Author: Antoine Eiche <lewo@abesis.fr> Date: Fri Apr 3 16:44:44 2020 +0200 client: support optional date in Revision and Release From the model specification, the date attribute in Revision and Release objects is optional. This commit handles the date attribute set to the None value. It also tests the "typification" of a minimal Revision object to avoid regressions on this usecase. commit 8d47566785824aa219ddb44e51e7b364b2fca54c Author: Antoine Eiche <lewo@abesis.fr> Date: Wed Mar 25 17:52:19 2020 +0100 client: add `visits` method to get the list of an origin visits A test is added to ensure the pagination and the data typing are working as expected.
Link to build: https://jenkins.softwareheritage.org/job/DWCLI/job/tests-on-diff/5/ See console output for more information: https://jenkins.softwareheritage.org/job/DWCLI/job/tests-on-diff/5/console
Build is green
Patch application report for D2958 (id=10534)
Could not rebase; Attempt merge onto 492be567...
Updating 492be56..64fa0f3 Fast-forward swh/web/client/__init__.py | 2 +- swh/web/client/client.py | 55 +++++++- swh/web/client/tests/api_data.py | 210 ++++++++++++++++++++++++++++ swh/web/client/tests/conftest.py | 10 +- swh/web/client/tests/gen-api-data.sh | 2 + swh/web/client/tests/test_web_api_client.py | 32 +++++ 6 files changed, 305 insertions(+), 6 deletions(-)
Changes applied before test
commit 64fa0f34079e4597ca98d265d36047bd8e421b55 Author: Antoine Eiche <lewo@abesis.fr> Date: Fri Apr 3 16:44:44 2020 +0200 client: support optional date in Revision and Release From the model specification, the date attribute in Revision and Release objects is optional. This commit handles the date attribute set to the None value. It also tests the "typification" of a minimal Revision object to avoid regressions on this usecase. commit 8d47566785824aa219ddb44e51e7b364b2fca54c Author: Antoine Eiche <lewo@abesis.fr> Date: Wed Mar 25 17:52:19 2020 +0100 client: add `visits` method to get the list of an origin visits A test is added to ensure the pagination and the data typing are working as expected.
See https://jenkins.softwareheritage.org/job/DWCLI/job/tests-on-diff/6/ for more details.
Build has FAILED
Patch application report for D2958 (id=11446)
Rebasing onto bbf8d237...
Current branch diff-target is up to date.
Changes applied before test
commit 3e42d0c70216af958c6a0f75c8b6dd53f8f3ef1a Author: Antoine Eiche <lewo@abesis.fr> Date: Fri Apr 3 16:44:44 2020 +0200 client: support optional date in Revision and Release From the model specification, the date attribute in Revision and Release objects is optional. This commit handles the date attribute set to the None value. It also tests the "typification" of a minimal Revision object to avoid regressions on this usecase.
Link to build: https://jenkins.softwareheritage.org/job/DWCLI/job/tests-on-diff/9/ See console output for more information: https://jenkins.softwareheritage.org/job/DWCLI/job/tests-on-diff/9/console
Build has FAILED
because mypy is unhappy about the current types:
09:59:31 swh/web/client/client.py:73: error: Incompatible return value type (got "None", expected "datetime") 09:59:31 swh/web/client/client.py:74: error: Argument 1 to "parse" has incompatible type "Optional[str]"; expected "Union[bytes, str, IO[str], IO[Any]]"
I've added comment in related line for the respective fix ;)
Cheers,
Build is green
Patch application report for D2958 (id=15074)
Rebasing onto 5d04bc97...
Current branch diff-target is up to date.
Changes applied before test
commit 0d962ea355439689ce6247f1efb9bbaee947d82c Author: Antoine Eiche <lewo@abesis.fr> Date: Thu Oct 15 11:06:57 2020 +0200 client: support optional date in Revision and Release From the model specification, the date attribute in Revision and Release objects is optional. This commit handles the date attribute set to the None value. It also tests the "typification" of a minimal Revision object to avoid regressions on this usecase.
See https://jenkins.softwareheritage.org/job/DWCLI/job/tests-on-diff/24/ for more details.