Skip to content

Weather helper - #1041

Closed
pgrawehr wants to merge 137 commits into
dotnet:masterfrom
pgrawehr:WeatherHelper
Closed

pgrawehr wants to merge 137 commits into
dotnet:masterfrom
pgrawehr:WeatherHelper

Conversation

@pgrawehr

Copy link
Copy Markdown
Contributor

Superseedes #783

Changes with respect to that PR:

  • Updated some StyleCop issues
  • Provided new free sources for formulas (Wikipedia and NOAA)
  • Slightly adapted the formulas according to those sources
  • Added more precise pressure reduction formula
  • Added comparison and formatting members to Temperature and Pressure units

I did remove the "summer simmer index" calculation, as I could not find a reliable source for that one. A web search returned only non-scientific pages. I suggest to add the wind chill temperature instead.

Comment thread README.md Resolved
@joperezr

Copy link
Copy Markdown
Member

cc: @MarkCiliaVincenti as FYI since he did most of the work. @pgrawehr did you try pushing changes directly to @MarkCiliaVincenti PR?

@@ -0,0 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">

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.

cc: @joperezr can you validate this is correct?

_previousCulture = CultureInfo.CurrentCulture;
_previousUiCulture = CultureInfo.CurrentUICulture;
var culture = new CultureInfo(cultureName, false);
Thread.CurrentThread.CurrentCulture = culture;

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.

while these will work for this project because we disabled parallelization I'd prefer we removed these tests or only tested it with explicit culture - this will be a time bomb - will start blowing when we start running tests in parallel (one way to do it reliably is to use RemoteExecutor, i.e.: https://github.com/dotnet/runtime/blob/master/src/libraries/System.Diagnostics.Process/tests/ProcessTestBase.cs#L55)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't think parallelization will cause problems here, since the culture is per Thread. Even if parallelization is active, no two tests will run simultaneously on the same thread.

@krwq

krwq commented Apr 17, 2020

Copy link
Copy Markdown
Member

LGTM after fixing minor comments and @joperezr sign-off on the csproj file. Thanks @MarkCiliaVincenti and @pgrawehr!

@MarkCiliaVincenti

Copy link
Copy Markdown
Contributor

What, this will actually get merged at last? Had lost hope! :)

@pgrawehr

Copy link
Copy Markdown
Contributor Author

cc: @MarkCiliaVincenti as FYI since he did most of the work. @pgrawehr did you try pushing changes directly to @MarkCiliaVincenti PR?

By default, it's not possible to push to somebody else's repository, this is also true for forks. I could have asked @MarkCiliaVincenti for permission, but I wasn't sure he would react.

@MarkCiliaVincenti

MarkCiliaVincenti commented Apr 18, 2020 •

Copy link
Copy Markdown
Contributor

To be honest I would like the credit to my work, especially at a time when I'm laid off due to Coronavirus and need to spice up my CV :)

Perhaps my pull request can be merged first?

@joperezr

Copy link
Copy Markdown
Member

You would still get “credit” in the sense that he cherry picked your commits so they would still show you as author, but that said I agree with you that your PR deserves to be the one that gets merged, specially because it wasn’t really blocked by you, but instead blocked by us checking with legal about the source of those formulas. We can’t merge your PR for that same reason even if it is temporary but can you change your branch settings in your fork so you allow @pgrawehr to push to it so he would also get the credit for his work? I believe all you have to do is add him as a contributor but I’m not 100% sure. Then he’ll be able to push to your branch his fixes and we can go ahead and merge.

I’m really sorry for this whole situation guys, I totally take the blame here.

@MarkCiliaVincenti

MarkCiliaVincenti commented Apr 18, 2020 •

Copy link
Copy Markdown
Contributor

You would still get “credit” in the sense that he cherry picked your commits so they would still show you as author, but that said I agree with you that your PR deserves to be the one that gets merged, specially because it wasn’t really blocked by you, but instead blocked by us checking with legal about the source of those formulas. We can’t merge your PR for that same reason even if it is temporary but can you change your branch settings in your fork so you allow @pgrawehr to push to it so he would also get the credit for his work? I believe all you have to do is add him as a contributor but I’m not 100% sure. Then he’ll be able to push to your branch his fixes and we can go ahead and merge.

I’m really sorry for this whole situation guys, I totally take the blame here.

Cool! I've invited @pgrawehr and @joperezr as contributors on my branch.

@pgrawehr

Copy link
Copy Markdown
Contributor Author

@MarkCiliaVincenti Not sure what you did, but it didn't do the trick... I think you need to go to the repository settings of your fork and add me as a contributor. joperezr is trying to work around it, as he should have access to your fork.

@MarkCiliaVincenti

Copy link
Copy Markdown
Contributor

@MarkCiliaVincenti Not sure what you did, but it didn't do the trick... I think you need to go to the repository settings of your fork and add me as a contributor. joperezr is trying to work around it, as he should have access to your fork.

That's exactly what I did but it says it's awaiting your response.

image

@joperezr

Copy link
Copy Markdown
Member

Closing this one since the original PR is now merged

@joperezr joperezr closed this Apr 18, 2020
@pgrawehr

Copy link
Copy Markdown
Contributor Author

@MarkCiliaVincenti Not sure what you did, but it didn't do the trick... I think you need to go to the repository settings of your fork and add me as a contributor. joperezr is trying to work around it, as he should have access to your fork.

That's exactly what I did but it says it's awaiting your response.

image

That's weird... I now found an E-Mail with the invitation, but when I click the link there, it says the invitation couldn't be found. But never mind, it's merged now ;-)

@MarkCiliaVincenti

Copy link
Copy Markdown
Contributor

Yep sorry, by which time I deleted the fork and started afresh. Would have worked had I didn't.

@MarkCiliaVincenti

Copy link
Copy Markdown
Contributor

By the way, thanks for your work, @pgrawehr, without your work it would probably never have been merged!

@github-actions github-actions Bot locked and limited conversation to collaborators Dec 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants