Skip to content

Conversation

@CBroz1
Copy link
Contributor

@CBroz1 CBroz1 commented May 4, 2022

  • PEP8
  • Draft integration tests from element-calcium-imaging
  • Update 05-explore Jupyter notebook #20
  • adjusted docker to resolve
    1. permissions issues declaring schemas on the db
    2. issues when connecting to paired docker container bad handshake
  • Remaining issue: Built result has python 3.10 (thus encountering collections.Mapping error), even when installing from datajoint/djbase:py3.7-debian-8eb1715

@CBroz1 CBroz1 added this to the NIH U24 Year 3 milestone May 4, 2022
@CBroz1 CBroz1 self-assigned this May 4, 2022
@CBroz1 CBroz1 changed the title WIP Standard integration tests, PEP8, docker adjustments May 5, 2022
@CBroz1 CBroz1 added the CI/CD label May 6, 2022
@CBroz1 CBroz1 requested a review from kabilar May 6, 2022 21:30
@CBroz1 CBroz1 marked this pull request as ready for review May 6, 2022 21:30
@CBroz1 CBroz1 assigned kabilar and unassigned CBroz1 May 7, 2022
tests/test_ingest.py::test_ingest_subjects PASSED
tests/test_ingest.py::test_ingest_sessions PASSED
tests/test_ingest.py::test_paramset_insert ERROR
tests/test_pipeline_generation.py::test_generate_pipeline PASSED
tests/test_populate.py::test_recording_info_populate PASSED
tests/test_populate.py::test_processing_populate ERROR

ERRORs because AttributeError: module 'collections' has no attribute 'Mapping'
@CBroz1
Copy link
Contributor Author

CBroz1 commented May 13, 2022

@kabilar - After a lot of debugging, I looped back around to the same python 3.10 problem, even when installing from a 3.9 image. I think CaImAn's installation process upgrades python. Wait for datajoint-python PR 1002

With @iamamutt's help, the docker file more user-friendly to pick specific forks. Maybe before Q3, we'll be able to standardize across the elements dockers. Get all CI/CD up-to snuff before major dev on the Y3 additions?

@CBroz1 CBroz1 assigned CBroz1 and unassigned kabilar May 17, 2022
@CBroz1
Copy link
Contributor Author

CBroz1 commented May 23, 2022

If I run the docker compose in detached mode, the log shows passing all tests. If I run without this flag, I see bad connection errors. @kabilar - what do you want to do?

docker-compose -f ./docker/docker-compose-test.yaml up --build --force-recreate --detached # success
docker-compose -f ./docker/docker-compose-test.yaml up --build --force-recreate # errors as ...
pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on 'db' ([Errno 111] Connection refused)")

@CBroz1 CBroz1 assigned kabilar and unassigned CBroz1 May 23, 2022
@kabilar
Copy link
Collaborator

kabilar commented May 24, 2022

If I run the docker compose in detached mode, the log shows passing all tests. If I run without this flag, I see bad connection errors. @kabilar - what do you want to do?

Thanks for looking into this @CBroz1! Let's just run in the --detached mode for the pytests. I will review this pull request.

@CBroz1 CBroz1 requested a review from kabilar July 8, 2022 17:26
@CBroz1 CBroz1 linked an issue Jul 8, 2022 that may be closed by this pull request
@kabilar
Copy link
Collaborator

kabilar commented Jul 11, 2022

Hi @CBroz1, are the items from the first comment above now addressed?

  • Draft integration tests from element-calcium-imaging, needs testing
  • pytests succeeded locally, encountered issues with docker containers

    1. permissions issues declaring schemas on the db
    2. issues when connecting to paired docker containter bad handshake, which @iamamutt recommends setting the following config to fix "database.use_tls": false
    3. Built result has python 3.10 (thus encountering collections.Mapping error), even when installing from datajoint/djbase:py3.7-debian-8eb1715

@kabilar
Copy link
Collaborator

kabilar commented Jul 11, 2022

I made adjustments to this notebook to provide the plots below. Maybe not the most elegant solution in each case? np arrays needed some reworking. Maybe that's an issue with how we're storing them?

Thanks! I am not sure why this would be the case, but I don't see an issue with reshaping the arrays. Perhaps add any details to Issue #25 and we can address in the future.

Copy link
Collaborator

@kabilar kabilar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @CBroz1! A few minor comments above.

@kabilar kabilar assigned CBroz1 and unassigned kabilar Jul 11, 2022
CBroz1 and others added 4 commits July 12, 2022 09:05
Co-authored-by: Kabilar Gunalan <[email protected]>
Co-authored-by: Dimitri Yatsenko <[email protected]>
notebooks: Run Jupytext sync
tests/__init__ : set conditional verbose context in constants, remove numpy
workflow_mini/paths: list->abc.Sequence
docker/docker-compose-test: uncomment volumes
Co-authored-by: Kabilar Gunalan <[email protected]>
@CBroz1 CBroz1 assigned kabilar and unassigned CBroz1 Jul 12, 2022
@CBroz1
Copy link
Contributor Author

CBroz1 commented Jul 12, 2022

Thanks for your review @kabilar - I've opened the issue we discussed (#26) and updated notebooks to revert the black formatting corruption

Copy link
Collaborator

@kabilar kabilar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @CBroz1! Great work.

@kabilar kabilar merged commit 9975d8a into datajoint:main Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update 05-explore Jupyter notebook Create integration tests with pytest

5 participants