-
Notifications
You must be signed in to change notification settings - Fork 224
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
rename test fixtures (test data) => test artifacts #4219
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #4219 +/- ##
===========================================
- Coverage 79.09% 79.08% -0.00%
===========================================
Files 468 468
Lines 34642 34642
===========================================
- Hits 27396 27394 -2
- Misses 7246 7248 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
I am not sure that the interpretation of artifacts is correct. An artifact is usually an object that is produced as the result of running a test. It is not the data that is required to run the test. Instead, fixture is exactly defined as "that what is necessary to construct the context in which a test should be run". This includes pieces of data that need to be loaded. |
I see, the Ruby definition you linked would certainly apply. As you mention, the more generic definition seems to be (wikipedia )
I.e. it applies directly to the pytest fixtures, and can also include test data. I agree that "artifacts" is probably not a good word for test data either, but I do feel that it would be useful to be able to differentiate between the pytest fixtures and test data (the reason I did not name the folder "data" was that this would again clash with AiiDA terminology), so that if somebody talks about "the fixtures" we know what they mean. Anyhow, if we aren't able to find a good, more specific name for the content of this folder, I'm also fine with closing this PR. |
You said your main reason for wanting to change the name is for searching reasons? If you are searching in the code, the filenames won't show up, no? And if you are looking in filenames: there are not that many files/folders that include the word fixture |
Have you had any feedback on this in person @ltalirz since the group meeting? If not, I would vote to close this. |
@sphuber The suggestions in the AiiDA meeting notes were Besides changing the name, the PR also added a variable for the path to the static resources, removing a couple of duplicated/hardcoded relative paths. |
I think |
I must admit that I am quite motivated to change the name of folder as well to not name clash with the That said, I will throw my vote behind changing it to |
I'll write to the guys involved in the coding days to give a vote to the three options - please vote with thumbs up/down |
Option 1: Keep name |
Option 2: Switch to |
What is the third option you mention? Personally, I don't mind either changing it to |
Sorry, I should have said two options. |
I'll just add option 3 (from the now closed #2817): |
I would not go with |
@ltalirz if you can change this to use |
The name "fixtures" is currently used both for the pytest fixtures and for test data in tests/fixtures, such as AiiDA export files. This is confusing and makes searching in the codebase unnecessarily difficult. Here, we rename the test data folder to "static", which indicates the static nature of the files residing there, while avoiding a clash of definition with the pytest fixures residing in aiida.manage.tests.
17b6435
to
6219600
Compare
@sphuber Ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good, thanks @ltalirz
The name "fixtures" is currently used both for the pytest fixtures and
for test data in tests/fixtures, such as AiiDA export files.
This is confusing and makes searching in the codebase unnecessarily
difficult.
Here, we rename the test data folder to "artifacts", which I believe is
a more common term for this type of data.