Coder Social home page Coder Social logo

pst_handler / #comments about pyemu HOT 7 CLOSED

pypest avatar pypest commented on July 3, 2024
pst_handler / #comments

from pyemu.

Comments (7)

jtwhite79 avatar jtwhite79 commented on July 3, 2024

def wanna support comments in the control file! Are your comments entire lines mixed in the DataFramed'd sections or extra things at the end of the lines? Can you upload you control file so I can add it to the tests?

from pyemu.

cnicol-gwlogic avatar cnicol-gwlogic commented on July 3, 2024

Awesome, thanks a lot. Comments are all end of line in my case, within the parameter and/or obs sections - I tested adding comment='#' to pd.read_csv() in _read_df() and it works fine with my file:
dualss_csgtrans_regwtsadj_v8_hp_dataworth_noregV3_base.zip
I guess it might be safest to add a parameter for users' comment character in calls to Pst()?

from pyemu.

jtwhite79 avatar jtwhite79 commented on July 3, 2024

Thanks for the file. I'll work on this - I was thinking it would be good to carry the comments through so that when you write a new control file it keeps them. This will take some more work but I think its important: I'm planning to start using the comments at the end of the lines to store metadata like spatial and temporal things...

from pyemu.

cnicol-gwlogic avatar cnicol-gwlogic commented on July 3, 2024

Ah good point, hadn't thought about re-writes, but yeah esp for monster files like this it is a nice touch.

from pyemu.

jtwhite79 avatar jtwhite79 commented on July 3, 2024

Ok, I think I got this going on the develop branch. By default, if comments are found during read, then they are repeated in a write. Let me know what you think.

from pyemu.

cnicol-gwlogic avatar cnicol-gwlogic commented on July 3, 2024

That works great - thanks a lot for implementing so quickly.

As an aside, I have noticed a couple of other issues with re-writes, probably quite specific to my setup. I'll have a stab at sorting them out in the next day or so and send you my suggested changes for consideration (let me know if that's not the easiest way to get these to you - I'm new to github).

Cheers,
Chris.

from pyemu.

jtwhite79 avatar jtwhite79 commented on July 3, 2024

I'm keen to hear any issues you have. Any contributions are welcome - pull request would be best.

from pyemu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.