Skip to content

Conversation

@marcobarilari
Copy link

@marcobarilari marcobarilari commented Nov 20, 2022

I propose to implement the uninit dependencies implementing actions in the initEnv function. To me is cleaner in the whole picture of the experiment.

Though, @remi could you check yourself if you are able to uninit cpp-bids? on my computer, I can add it to the paths via this impementation but I cannot remove it cause (I think) here in `ccp_bids.m

function uninitCppBids()
    %
    % Removes the added folders from the path for a given session.
    %
    % USAGE::
    %
    %   uninitCppPtb()
    %

    % (C) Copyright 2021 CPP_BIDS developers
    
    global CPP_BIDS_INITIALIZED
    global CPP_BIDS_PATHS
    
    if isempty(CPP_BIDS_INITIALIZED) || ~CPP_BIDS_INITIALIZED
        fprintf('\n\nCPP_BIDS not initialized\n\n');
        return

    else
        rmpath(CPP_BIDS_PATHS);

        if isOctave
            clear -g CPP_BIDS_INITIALIZED CPP_BIDS_PATHS;
        else
            clearvars -GLOBAL CPP_BIDS_INITIALIZED CPP_BIDS_PATHS;
        end

    end

end

global CPP_BIDS_INITIALIZED and global CPP_BIDS_PATHS return respectively [] and [] while should return 1 and the paths in the matlab path

Thanks!

@marcobarilari marcobarilari added bug Something isn't working dependencies Pull requests that update a dependency file enhancement New feature or request help wanted Extra attention is needed submodules Pull requests that update Submodules code labels Nov 20, 2022
@codecov
Copy link

codecov bot commented Nov 20, 2022

Codecov Report

Merging #31 (1e74c75) into main (c052f96) will not change coverage.
The diff coverage is n/a.

❗ Current head 1e74c75 differs from pull request most recent head d031633. Consider uploading reports for the commit d031633 to get more accurate results

@@          Coverage Diff          @@
##            main     #31   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files          4       4           
  Lines         32      32           
=====================================
  Misses        32      32           
Flag Coverage Δ
unittests 0.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@marcobarilari marcobarilari linked an issue Nov 20, 2022 that may be closed by this pull request
1 task
@Remi-Gau
Copy link

Need to install psychtoolbox and then I will check

@Remi-Gau
Copy link

Remi-Gau commented Feb 1, 2023

had to update CPP PTB to make this work.

cpp-lln-lab/CPP_PTB@777e04a

uninitializing CPP PTB would clear all global variables including those from CPP BIDS that contain info about the CPP BIDS path.

it worked on my side.

will merge but feel free to reopen issue / PR if this is still an issue for you.

@Remi-Gau Remi-Gau merged commit dd1db09 into cpp-lln-lab:main Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working dependencies Pull requests that update a dependency file enhancement New feature or request help wanted Extra attention is needed submodules Pull requests that update Submodules code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENH] Implement cpp_ptb function for init an un-init

2 participants