Skip to content

Add manual sorter tests in singularity - #1373

Merged
h-mayorquin merged 29 commits into
masterfrom
singularity-tests
Mar 2, 2023
Merged

h-mayorquin merged 29 commits into
masterfrom
singularity-tests

Conversation

@alejoe91

Copy link
Copy Markdown
Member

@alejoe91 alejoe91 added sorters Related to sorters module testing Related to test routines continuous integration Related to CI labels Feb 28, 2023
@h-mayorquin

Copy link
Copy Markdown
Contributor

I don't understand why the the last commit is marked as checks completed but all the actions of the new tests are marked as failed:

https://github.com/SpikeInterface/spikeinterface/actions/workflows/test_containers_singularity.yml

@samuelgarcia

Copy link
Copy Markdown
Member

This looks like a big fight!
Thanks camarade.

@alejoe91

alejoe91 commented Mar 1, 2023

Copy link
Copy Markdown
Member Author

Ehehehe it is!

@h-mayorquin

h-mayorquin commented Mar 1, 2023 •

Copy link
Copy Markdown
Contributor

@alejoe91
I think that the current iteration should work. I also changed the fixture scope so the binary version of the recorder is generated only once instead of once per test.

That said, I find the current approach to decide which version of spikeinterface to install in the container confusing. My view is that the defaults should like this:

  • When users call containers it should the stable version from which they are calling [I think this is happening].
  • When we call it from local it should install the local repository as it is [Does not happen by default, needs the env variable trick].
  • When we call it from CI it should install the local repository as it is [What we are doing here through the env variable].

What I am missing is one case it makes sense to me that the current default is the right approach. The current default is to that you install the latest version in the repo. Maybe I just lack imagination and this makes sense, but I still feel that the defaults above make more sense.

Besides this point, I think that there must be a better way of doing this than using an implicit definition through an environment variable (the zen of python "explicit is better than implicit").

@alejoe91

alejoe91 commented Mar 2, 2023

Copy link
Copy Markdown
Member Author

@alejoe91 I think that the current iteration should work. I also changed the fixture scope so the binary version of the recorder is generated only once instead of once per test.

That said, I find the current approach to decide which version of spikeinterface to install in the container confusing. My view is that the defaults should like this:

  • When users call containers it should the stable version from which they are calling [I think this is happening].
  • When we call it from local it should install the local repository as it is [Does not happen by default, needs the env variable trick].
  • When we call it from CI it should install the local repository as it is [What we are doing here through the env variable].

What I am missing is one case it makes sense to me that the current default is the right approach. The current default is to that you install the latest version in the repo. Maybe I just lack imagination and this makes sense, but I still feel that the defaults above make more sense.

Besides this point, I think that there must be a better way of doing this than using an implicit definition through an environment variable (the zen of python "explicit is better than implicit").

Thanks for the feedback @h-mayorquin

So basically in your opinion we should always installed from local if the SpikeInterface installation is from sources. Is that correct? What if someone installs SI from git, but not from sources (e.g. pip install git+http ...)?

@alejoe91

alejoe91 commented Mar 2, 2023

Copy link
Copy Markdown
Member Author

Success!!!! @h-mayorquin can you merge this one? :) Thanks for the help!

@h-mayorquin h-mayorquin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is great.

Concerning useres installing directly from git that is one instance where maybe it would make sense to use the latest dev version. We are making the assumption that they have not modified their own repo after installing which is OK. That said, I think that I would like to stick that edge case under the general default of running the local repo. In fact, now that I think about it, this also works for users installing older versions as they will have a local old version in their machines.

I think this might be harder to do than just installing on git and is not working. I will open an issue ot discuss this and maybe put is a low-priority to-do.

@h-mayorquin

Copy link
Copy Markdown
Contributor

One final thing, it seems that the tridesclous container is missing some packages?

Error Message: To use the TridesclousSortingExtractor install tridesclous: 

 pip install tridesclous

So it goes back to run the format as npy extractor.

@h-mayorquin
h-mayorquin merged commit 5c3d484 into master Mar 2, 2023
@h-mayorquin
h-mayorquin deleted the singularity-tests branch March 2, 2023 12:35
Comment on lines +437 to +443
running_on_github_actions = os.getenv("CI")
si_dev_path = None
if running_on_github_actions:
print(si_version)
si_dev_path = os.getenv('SPIKEINTERFACE_DEV_PATH')
print(si_dev_path)
assert si_dev_path is not None

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What is this ? This looks like debuging stuff.
This GH specific stuff should not be the code I think but in the test files only no ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Oups! you are right! I thought this was on the test side. Will push a fix!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That was my mistake, I added when I was debugging and then did not removed then.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No worries guys.
I just feel that you are sometimes a bit too imptatient for merges :)
Maybe the the priviliedge of youg people.

Comment on lines +485 to +487
print("******")
print("Container started with the following paths")
print(si_dev_path_unix, si_source_folder)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Inside a verbose would be better.

@samuelgarcia

Copy link
Copy Markdown
Member

Camarades. Could you wait some external feedback before merges ?
I did not have chance to read it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

continuous integration Related to CI sorters Related to sorters module testing Related to test routines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants