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

BF: handle pre-2021.1 Slider styles in 2021.1.3+ #3665

Merged
merged 1 commit into from
Mar 5, 2021

Conversation

peircej
Copy link
Member

@peircej peircej commented Mar 4, 2021

Slider styles still not handling the old style specification correctly.

Fixes:

  1. to allow the experiment to load at all we need to check if we have
    a 'fixedList' valType with only a string rather than list, and convert
    to string if needed in Experiment._getParamFromXML()
  2. to allow the JS script to compile we need to handle either a list
    or a string at the compile step in SliderComponent.writeInitCodeJS()

Another approach would have been to make a conversion away from the
list (into the new format) in (1.) so that (2.) wasn't needed but that
would have broken compatibility more for experiments being shared back
to older studies

Slider styles still not handling the old style specification correctly.

Fixes:
1. to allow the experiment to load at all we need to check if we have
a 'fixedList' valType with only a string rather than list, and convert
to string if needed in `Experiment._getParamFromXML()`
2. to allow the JS script to compile we need to handle either a list
or a string at the compile step in `SliderComponent.writeInitCodeJS()`

Another approach would have been to make a conversion *away* from the
list (into the new format) in (1.) so that (2.) wasn't needed but that
would have broken compatibility more for experiments being shared back
to older studies
@codecov
Copy link

codecov bot commented Mar 4, 2021

Codecov Report

Merging #3665 (54d7079) into release (a0d478c) will increase coverage by 0.00%.
The diff coverage is 14.28%.

Impacted file tree graph

@@           Coverage Diff            @@
##           release    #3665   +/-   ##
========================================
  Coverage    43.24%   43.24%           
========================================
  Files          267      267           
  Lines        52795    52800    +5     
  Branches      9107     9108    +1     
========================================
+ Hits         22829    22832    +3     
- Misses       27646    27648    +2     
  Partials      2320     2320           
Impacted Files Coverage Δ
psychopy/experiment/_experiment.py 52.22% <0.00%> (-0.28%) ⬇️
psychopy/experiment/components/slider/__init__.py 74.46% <33.33%> (-1.08%) ⬇️
psychopy/tools/wizard.py 72.78% <0.00%> (+0.66%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a0d478c...54d7079. Read the comment docs.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.008%) to 47.076% when pulling 54d7079 on peircej:hotfix-sliderStylesCompat into a0d478c on psychopy:release.

@peircej peircej merged commit 23c9bdf into psychopy:release Mar 5, 2021
@peircej peircej deleted the hotfix-sliderStylesCompat branch June 9, 2021 19:42
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