-
Notifications
You must be signed in to change notification settings - Fork 81
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
Adding Retest #1052
Adding Retest #1052
Conversation
test/PowerSystemsTests.jl
Outdated
end | ||
end | ||
|
||
|
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.
[JuliaFormatter] reported by reviewdog 🐶
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.
@tengis-nrl you should learn how to invoke the formatter set up in each Sienna repository so you can deal with these issues proactively. I can help you with that sometime if you need
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.
How about during the next time we meet? Thanks!
test/PowerSystemsTests.jl
Outdated
|
||
end | ||
|
||
using .PowerSystemsTests |
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.
[JuliaFormatter] reported by reviewdog 🐶
using .PowerSystemsTests | |
using .PowerSystemsTests |
test/load_tests.jl
Outdated
end | ||
end | ||
|
||
recursive_includet("PowerSystemsTests.jl") |
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.
[JuliaFormatter] reported by reviewdog 🐶
recursive_includet("PowerSystemsTests.jl") | |
recursive_includet("PowerSystemsTests.jl") |
test/runtests.jl
Outdated
nothing | ||
end | ||
include("PowerSystemsTests.jl") | ||
run_tests() |
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.
[JuliaFormatter] reported by reviewdog 🐶
run_tests() | |
run_tests() |
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.
Hi @GabrielKS, this file was added to use ReTest instead of the current testing package. There is a file called InfrastructureSystemsTests.jl in IS that has almost the same code as this one. @daniel-thom was wondering how we can avoid code duplication. Specifically, he asked "Is there a way to avoid that without making the ReTest.jl package a dependency of PSY? Keep in mind that there are dozens of Sienna packages that should use this test pattern." Any suggestion?
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.
Dan and I talked about this a while ago and the options I see are:
- Put the stuff that would be duplicated into InfrastructureSystems.jl. Advantage: no massive code duplication across Sienna repos, just call the relevant thing from IS. Disadvantage: ReTest.jl would need to be a non-test dependency of IS (and therefore, transitively, of all the other Sienna packages)
- Current approach: reimplement for every repository. Advantage: ReTest.jl can be just a test dependency. Disadvantage: massive code duplication.
- Create a new package that is just for testing, put the stuff that would be duplicated there. Advantages: no massive duplication and ReTest is just a test dependency. Disadvantage: we have to maintain a whole separate package for this.
- Same as 3 but with a submodule or something instead of a package. Same advantages as 3. Disadvantage: it's really annoying to work with submodules.
I don't think we're going to come up with anything that doesn't have some of those disadvantages. I might not fully appreciate the costs of maintaining a whole separate package, but option 3 looks the most attractive to me. We could also do something like this to remove the duplication of all our formatting scripts.
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.
For the time being we will keep 2. as the option since it also creates a headache to maintain package dependencies to do any of the others.
@@ -0,0 +1,13 @@ | |||
using Revise |
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.
Copied from the IS PR: Seems like even if the best practice is to install Revise globally, if our tests are going to depend it we ought to have it in test/Project.toml
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.
remove, we need to remove from IS too.
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.
This file is optional. Users don’t have to call it. I say leave it the way it is. The instructions should advise you to install TestEnv.jl and Revise.jl globally.
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.
Okay, that works for me
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.
Dan and I talked about this a while ago and the options I see are:
- Put the stuff that would be duplicated into InfrastructureSystems.jl. Advantage: no massive code duplication across Sienna repos, just call the relevant thing from IS. Disadvantage: ReTest.jl would need to be a non-test dependency of IS (and therefore, transitively, of all the other Sienna packages)
- Current approach: reimplement for every repository. Advantage: ReTest.jl can be just a test dependency. Disadvantage: massive code duplication.
- Create a new package that is just for testing, put the stuff that would be duplicated there. Advantages: no massive duplication and ReTest is just a test dependency. Disadvantage: we have to maintain a whole separate package for this.
- Same as 3 but with a submodule or something instead of a package. Same advantages as 3. Disadvantage: it's really annoying to work with submodules.
I don't think we're going to come up with anything that doesn't have some of those disadvantages. I might not fully appreciate the costs of maintaining a whole separate package, but option 3 looks the most attractive to me. We could also do something like this to remove the duplication of all our formatting scripts.
test/PowerSystemsTests.jl
Outdated
end | ||
end | ||
|
||
|
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.
@tengis-nrl you should learn how to invoke the formatter set up in each Sienna repository so you can deal with these issues proactively. I can help you with that sometime if you need
I like option 3 the best. Good point about the formatter scripts. Hopefully, this won’t change often. Also, the formatter version would be fixed in this package. |
@pesap suggested adding a modified GitHub action that can commit the required formatter changes. |
@daniel-thom do you want to merge this or go ahead with the creation of the testing package? |
I think we should create |
closing since the preferred solution of creating a testing package will be implemented. |
Thanks for opening a PR to PowerSystems.jl, please take note of the following when making a PR:
Check the contributor guidelines