Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poetry dependency manager #2704

Closed
wants to merge 55 commits into from
Closed

Conversation

mikejhuang
Copy link
Contributor

@mikejhuang mikejhuang commented Jul 21, 2023

Use Poetry's dependency resolver to solve dependency cross compatible versioning.

Steps

  1. Use poetry to setup pyproject.toml file with python = ">=3.8,<3.12"
  2. Create a copy of requirements.txt without explicit versions at poetry_py38-311.txt
  3. poetry add `cat poetry_py38-311.txt`
  4. poetry does not resolve python version requirements and this needs to be adjusted manually
  5. xarray, scipy, and numpy versions adjusted to meet python version requirements
  6. poetry add `cat poetry_py38-311.txt` completed successfully and created solution of valid dependency ranges in pyproject.toml
  7. All dependencies are installed, poetry.lock file stores the actual installed versions for reproducibility
  8. Run tests by creating virtualenv with 3.8, 3.9, 3.10, 3.11
  9. For failing tests, either fix code or revert package version
    Final explicitly defined requirements

Fixes for compatibility

  1. pandas 1.1.5 -> 2.0.3
  2. numpy 1.23.5
    • np.bool, np.float, np.int are deprecated. Use 'bool', 'float', or 'int' instead.

Reverting versions instead of fixing

  1. hdmf=<3.4.7
  2. pandas<2.0.0
    • padas==2.0.3: VisualBehaviorProjectCache.get_ophys_session_table( index_column="ophys_experiment_id").index is type 'object', expected int64
      All the values in this index are int64 so I'm not sure why it was loaded as an object type.

@mikejhuang mikejhuang force-pushed the poetry_dependency_manager branch 2 times, most recently from 29af88a to fca9216 Compare July 24, 2023 22:59
@mikejhuang
Copy link
Contributor Author

Not going to lint this one since the changes made are all single-line edits that did not change the lint.

morriscb and others added 23 commits August 1, 2023 23:58
Modify Stimfile to add additional properties.
Modify BS UUID from stimulus file method.
Add timezone to behavior metdata table cloud api.
Add datetime conversion.
Change age_in_days to pandas.Int64 type.
Fix imaging_plane_group typing.
Input dummy time stamps for r and RMSE values.
Enforce typing on image_plane_group_count.
Add new Unittests
Update existing unittests
Add optional to stim file return.
Add new NWBWiter subclass.
Modify ophys nwb creation script.
Add metadata table schema file.
Add update function for targeted_imaging_depth
Add new _update_session functino to nwb writer.
Remove old writers and tests.
Move base behavior schema
Add parser unittests.
Move add_experience_level from vbn_2022
Add VBO project codes and stimulus_block maps
Add project code to stimulus file processing.
Add gray screen block at start of stimulus.
Update write_nwb schemas for dir output.
Add dummy trials object to testing.
Update presentations.pkl file.
Update docstrings.
update test pickle data.
Update tested python versions to 3.8 - 3.10
Modify output path
Add full output dict.
Properly use output schema.
Add behavior_session and ophys_experiment prefix.
LEFT JOIN on container due to potential missing container
Ahad-Allen and others added 28 commits August 2, 2023 00:01
Add link to issue with histogram.
Add _enforce typing function to enforce int types.
remove fillna from image_plane_count
Rename add_experince_level.
Generalize experience_level calculation for edge cases.
Add experience_level to all tables.
Rename targeted_areas -> num_targeted_structures
Fix typo in num_depths_per_area
Enforce metadata table column order
Add column ordering and integer type fixing.
Generalize ordering and typing across metadata and other tables.
Change null values to -99 and use int type.
Better enforce typing for calculated values in stimulus_processing.
Update stimulus_block_name to properly handle training sessions.
Fix bug in trials_id being added for grey screen stimulus
Add blank stimulus to start of stimulus presentations where needed.
Don't add trials_id if stimulus_block isn't there.
Add calculation to templates
Modify templates to take/return list.
Make movie loading optional.
Move metadata_parsers
Add index type to output dataframe of StimulusTemplates.
Change Templates input to dictionary.
Add default image and movie template keys.
Add raise for illformed template input.
Add/update docs.
Update unittests.

Add unittest for templates exception,
Debug dropping first omitted row.

Debug for unittest and data without omitted.
Unpeg scikit-learn in test_requirements.txt
Remove scikit-learn from testing.
Debug dropping first omitted row.

Debug for unittest and data without omitted.
Unpeg scikit-learn in test_requirements.txt
Remove scikit-learn from testing.
@mikejhuang mikejhuang force-pushed the poetry_dependency_manager branch from 407f5a5 to 3fefc44 Compare August 2, 2023 08:21
@mikejhuang mikejhuang closed this Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants