-
Notifications
You must be signed in to change notification settings - Fork 17
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
Merge changes from develop-specact into develop #155
Conversation
added state path initialization for hydr
… sort out state paths since ACTIONS dont give module aka HYDR, PERLND etc.
Develop specact 1
Recent develop changes into develop-specact branch
…') for now, may reconsider later.
added partial code support for specl counter and date to begin
…torage of siminfo in model_props_parsed
fix incorrect hand off creation to base class ModelObject to enable s…
om_special_action.py -- handle simple dated special actions
…rough constants and other non-executables to improve performance
io.py -- output aver in addition to sum and last
…itching of modes by setting ModelObject.ops_data_type
changed to fixed width integer array for tokens and do not iterate th…
make state float64 instead of float32
merge minor changes to setup.py from tim cera into develop-specact branch
…entation in SEDTRN
…entation in SEDTRN
push contributing.md to develop-specact
Develop specact depend
@PaulDudaRESPEC this PR has huge diffs, and changes whitespace and line-endings in many files. Is there any way to break this up into smaller changes? I suspect that there's an errant commit in here that pulls in code that was re-saved on a machine without a correctly configured .gitconfig, which changed all the line endings in a few files. This can be tricky to fix, maybe @timcera knows some helpful git wizardry that can help isolate the intended changes in here from all the whitespace and line-ending chatter. |
@austinorr , yeah, I see what you mean. These changes are almost entirely authored by @rburghol ... I wonder if we could revert to earlier versions of some of these files. |
@rburghol, there's important new features and capabilities in here, but some of them appear to be for your local testing/verification rather than belonging in the library e.g., the new contents of the /tests you've added are labeled as scripts that must be run from the home directory of the repo, and load h5 files that don't exist until after other things are run to create them. Also, throughout this PR there are imports that use the "*" like If you'd like, I could help support you in making a few of these changes. Some of this refactoring effort seems hard, like changing file line endings but doesn't have to be with certain tools (vscode has a button along the bottom to toggle these, other editors might be similarly helpful). To move this forward safely, we should probably rebase this on whatever the current 'develop' branch state is so we can avoid those merge conflicts that appear to come from this originally being a branch off of main. Let me know if you'd like support with that process too! |
Maybe, however does anyone remember a meme before there were memes, where someone dressed as a doctor says, "I'm not a doctor, but I play one on TV." That is me with git. "I don't know anything about git, but I pretend like I do on Github." I'll take a look and maybe something will occur to me that could help, but I am not promising "wizardry". |
Hey @austinorr, thanks for the offers to help and yes please!
|
If we have proper test coverage, we should have no fears of large changes :) -- and once whitespace is no longer showing, the changes can be seen to relatively small in terms of affecting prior function. But if we did want to split them up, file changes can be grouped as follows:
|
@rburghol whitespace fixes with vs code can be really simple, there's a little symbol at the bottom of the window that says either 'LF' or 'CRLF'. Clicking it will actually toggle it for the current file. As for the "*" imports, we really should avoid this practice. As you say, it's vague and it clobbers the namespace and risks bugs. A good linter will call this out every time as something that needs to be fixed, including flake8. From PEP8, "Wildcard imports (from import *) should be avoided, as they make it unclear which names are present in the namespace, confusing both readers and many automated tools. There is one defensible use case for a wildcard import, which is to republish an internal interface as part of a public API." To move this forward, let's open a new PR with just your changes to files within the HSP2 directory with a clean diff on the current 'develop' branch of the project. The workflow could be as follows assuming you have this git repo set as your upstream remote. To get the name of your upstream remote, do 'git remote -v' :
I could do the above steps for you, but then you'd lose credit for the changes since I'd become the author. I like to avoid workflows that hide the true contributors, but it means a bit more work for you to resolve the merge conflicts. |
Awesome @austinorr thanks! I have no problems separating files out with branches, do that all the time. Quick question, since I live in linux world half the time, which should our line endings be? |
RFC @PaulDudaRESPEC @austinorr @timcera I believe that we can enforce universal translation to CRLF using a
Or we could be a but less ham-fisted and do:
This would make my life easier since I am doing a bunch of work on linux here. Does anyone see a drawback to git managing our line endings in this way? |
I worried that the recipe might be tmi -- didn't mean to imply otherwise, just wanted to unblock the path forward.
Which ever gives the least diff after the hard reset from the recipe above. I'm not actually sure what I recommend, I don't think i want my local checkout to be CRLF since that'll cause lots of problems. I think it's better to leave it as is and just be careful with checking for big unintended diffs before merging PRs. |
^ Aah, not this! Here's what big projects do -- they leave it up to the developer because the project doesn't know if you're contributing from linux of from windows. e.g., here's the extent that
|
Totally cool, though it seems like for this project the .py files really are gonna cause diff problems if they are not in CRLF -- at least until we get more linux peeps in the house. Looks like I will need to add something to my workflow to make these conversions as I go. |
Let’s keep an eye on this to see if any other contributors run into this problem with their py files. I’m developing on Linux too have not yet had a problem (all my line endings are correctly set to LF for py files). I think @timcera is also on Linux |
@PaulDudaRESPEC and @rburghol we can probably close this PR and work from #161 instead. |
No description provided.