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

394 fix structdict copy #400

Merged
merged 28 commits into from
Dec 22, 2022
Merged

394 fix structdict copy #400

merged 28 commits into from
Dec 22, 2022

Conversation

dfsp-spirit
Copy link
Collaborator

Author Guidelines

  • Is the change set < 600 lines?
  • Was the code checked for memory leaks/performance bottlenecks?
  • Is the code running locally and on the ESI cluster?
  • Is the code running on all supported platforms?

Reviewer Checklist

  • Are testing routines present?
  • Do parallel loops have a set length and correct termination conditions?
  • Do objects in the global package namespace perform proper parsing of their input?
  • Do code-blocks provide novel functionality, i.e., no re-factoring using builtin/external packages possible?
  • Code layout
    • Is the code PEP8 compliant?
    • Does the code adhere to agreed-upon naming conventions?
    • Are keywords clearly named and easy to understand?
    • No commented-out code?
  • Are all docstrings complete and accurate?
  • Is the CHANGELOG.md up to date?

@codecov
Copy link

codecov bot commented Dec 16, 2022

Codecov Report

Base: 68.66% // Head: 68.48% // Decreases project coverage by -0.18% ⚠️

Coverage data is based on head (eb56f83) compared to base (82daca9).
Patch coverage: 96.42% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #400      +/-   ##
==========================================
- Coverage   68.66%   68.48%   -0.19%     
==========================================
  Files          79       79              
  Lines        9567     9588      +21     
  Branches     1952     1954       +2     
==========================================
- Hits         6569     6566       -3     
- Misses       2499     2514      +15     
- Partials      499      508       +9     
Impacted Files Coverage Δ
syncopy/statistics/timelockanalysis.py 67.30% <66.66%> (+0.96%) ⬆️
syncopy/plotting/_helpers.py 91.54% <100.00%> (+2.97%) ⬆️
syncopy/shared/latency.py 77.02% <100.00%> (+0.31%) ⬆️
syncopy/shared/tools.py 82.82% <100.00%> (+2.82%) ⬆️
syncopy/statistics/spike_psth.py 95.40% <100.00%> (+0.05%) ⬆️
syncopy/tests/helpers.py 100.00% <100.00%> (ø)
syncopy/specest/stft.py 72.97% <0.00%> (-8.11%) ⬇️
syncopy/specest/mtmconvol.py 85.18% <0.00%> (-7.41%) ⬇️
syncopy/specest/freqanalysis.py 65.34% <0.00%> (-3.65%) ⬇️
syncopy/specest/compRoutines.py 90.10% <0.00%> (-2.39%) ⬇️
... and 2 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@dfsp-spirit dfsp-spirit marked this pull request as ready for review December 16, 2022 16:11
Copy link
Contributor

@tensionhead tensionhead left a comment

Choose a reason for hiding this comment

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

Great, this will make the StructDict behavior more consistent.. just one question, how can we make deep copies? The default shallow copies seem quite dangerous from a user perspective?!

CHANGELOG.md Show resolved Hide resolved
syncopy/shared/tools.py Outdated Show resolved Hide resolved
syncopy/tests/test_tools.py Outdated Show resolved Hide resolved
syncopy/tests/test_welch.py Show resolved Hide resolved
@dfsp-spirit
Copy link
Collaborator Author

dfsp-spirit commented Dec 20, 2022

I have implemented a .deepcopy() method in 9560672.

I have also implemented __deepcopy__, so one can also use:

import copy
my_cfg_cp = copy.deepcopy(my_cfg)

Copy link
Contributor

@tensionhead tensionhead left a comment

Choose a reason for hiding this comment

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

Ok great, now ppl can safely throw around .copy() on their cfg's 👍

- only relevant if selection get reapplied from Selector.select dict

Changes to be committed:
	modified:   syncopy/plotting/_helpers.py
	modified:   syncopy/shared/latency.py
	modified:   syncopy/statistics/spike_psth.py
	modified:   syncopy/statistics/timelockanalysis.py
@dfsp-spirit dfsp-spirit merged commit 6c89e27 into dev Dec 22, 2022
@tensionhead tensionhead deleted the 394_fix_structdict_copy branch December 23, 2022 09:29
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.

2 participants