avogadroapp icon indicating copy to clipboard operation
avogadroapp copied to clipboard

Auto save feature

Open ghutchis opened this issue 3 years ago • 28 comments

Avogadro should support an auto-save feature, eg something like https://github.com/faiszalkhan/SimpleAutosave

Save unsaved molecules to the auto save directory every 5 minutes.

ghutchis avatar Jul 28 '21 02:07 ghutchis

@ghutchis Is this still open? Can I work on this?

harxish avatar Jul 17 '22 13:07 harxish

Thanks, yes, it's still open - would certainly love to see some help. Do you need more tips / mentoring?

ghutchis avatar Jul 18 '22 03:07 ghutchis

Yea, that would be really great.

Cloud you tell me where to start ?

harxish avatar Jul 23 '22 07:07 harxish

Is this open ? I want to work on this

Abhisharma85 avatar Jan 04 '23 14:01 Abhisharma85

@Abhisharma85 yup this is open. You can work on this.

harxish avatar Jan 04 '23 14:01 harxish

I wanna work on this issue. Please assign this to me and since I'm new to this repo so I request you to please guide me through.

VARUN-009 avatar Jan 21 '23 23:01 VARUN-009

hi i would love to work on it kindly assign

Aadijindal07 avatar Feb 01 '23 00:02 Aadijindal07

In this project, we do not assign issues except to indicate that a core developer is currently working on something. If you would like to start, please do. There's an example repo linked above.

ghutchis avatar Feb 01 '23 01:02 ghutchis

@ghutchis where can I find the piece of code that saves the code on clicking save?

ShubhamKumar977 avatar Jun 14 '23 03:06 ShubhamKumar977

@ShubhamKumar977 - I'm not quite sure what you're asking. Do you want to see the example AutoSave code (see my first comment in the thread) or how Avogadro currently implements a save signal?

ghutchis avatar Jun 14 '23 13:06 ghutchis

@ShubhamKumar977 - I'm not quite sure what you're asking. Do you want to see the example AutoSave code (see my first comment in the thread) or how Avogadro currently implements a save signal?

@ghutchis I want to know how Avogadro currently implements a save signal?

ShubhamKumar977 avatar Jun 14 '23 14:06 ShubhamKumar977

You'll either want: https://github.com/OpenChemistry/avogadroapp/blob/f1b42f00ba19adcd02f1328df3dac5d6f16933c6/avogadro/mainwindow.cpp#L1330

Or https://github.com/OpenChemistry/avogadroapp/blob/f1b42f00ba19adcd02f1328df3dac5d6f16933c6/avogadro/mainwindow.cpp#L1460

ghutchis avatar Jun 20 '23 19:06 ghutchis

I would suggest saving as .cjson, e.g. writer = new Io::CjsonFormat;

ghutchis avatar Jun 20 '23 19:06 ghutchis

is it still open for me to work on ?

Aenk-Singhal avatar Jul 19 '23 11:07 Aenk-Singhal

I still haven't seen a pull request, so yes.

ghutchis avatar Jul 19 '23 12:07 ghutchis

This issue has been mentioned on Avogadro Discussion. There might be relevant details there:

https://discuss.avogadro.cc/t/how-to-contribute/4569/12

avo-bot avatar Sep 09 '23 19:09 avo-bot

The issue seems open. But it's very old, so is it open until now? @ghutchis If yes, i'd like to start working on it. The progress would be a little slow as my exams are going on, but will sure move ahead.

Atharva-Kanherkar avatar Oct 28 '23 12:10 Atharva-Kanherkar

@Atharva-Kanherkar - it's definitely still open. As I mention above, I'm happy to help / mentor.

ghutchis avatar Oct 28 '23 17:10 ghutchis

@Atharva-Kanherkar - it's definitely still open. As I mention above, I'm happy to help / mentor.

Thank you! For starters, ive been understanding the codebase. I will say ill spend one or two days on understanding the code base, and then start working on this. Can you provide me some more information about how i can start, itd be much helpful:)

Atharva-Kanherkar avatar Oct 28 '23 19:10 Atharva-Kanherkar

Until then, @ghutchis , if there are any documentation and translation tasks (I know hindi pretty well for starters) I can do it while studying the codebase.

Atharva-Kanherkar avatar Oct 28 '23 19:10 Atharva-Kanherkar

@Atharva-Kanherkar - any work on Hindi would be greatly appreciated: https://hosted.weblate.org/engage/avogadro/

That's all automatically synced - it will show up in avogadroapp and avogadrolibs as pull requests.

ghutchis avatar Oct 28 '23 20:10 ghutchis

@Atharva-Kanherkar - any work on Hindi would be greatly appreciated: https://hosted.weblate.org/engage/avogadro/

That's all automatically synced - it will show up in avogadroapp and avogadrolibs as pull requests.

Sure! Ill start working.

Atharva-Kanherkar avatar Oct 29 '23 06:10 Atharva-Kanherkar

Hi, @ghutchis. I have prepared a google doc to make a roadmap - task bar kind of thing for the future of the implementation. Can you please review the doc and tell me if everything's correct so i start working on it? This is just a simple list of tasks id need to do. Thank you! Here is the link : https://docs.google.com/document/d/1yA0rhWgOiO00GeKlP8gpGtTGhAV7YYryjLGmjCTkBt8/edit?usp=sharing

Atharva-Kanherkar avatar Oct 29 '23 07:10 Atharva-Kanherkar

Hi, @ghutchis may i start working?

Atharva-Kanherkar avatar Oct 31 '23 06:10 Atharva-Kanherkar

Sure, of course.

A few notes, since I cannot comment on that Google doc:

  • For the temporary auto-save file, you will want to use https://doc.qt.io/qt-6/qtemporaryfile.html
  • For example, here is related code that saves to a temporary file (line 78-97) https://github.com/OpenChemistry/avogadrolibs/blob/bcf2b3dcf8f7d715b8d2e5ef597a5398bf20d6b8/avogadro/qtplugins/forcefield/scriptenergy.cpp#L78
  • Unlike that code, you will want to use the ".cjson" format (Io::CjsonFormat)
  • There is already code for manual saves, e.g. https://github.com/OpenChemistry/avogadroapp/blob/3456a09d885dfbd5c3488156c5bcda1459b334c6/avogadro/mainwindow.cpp#L1367 and related methods

As you said, we're happy to help with advice and testing - submit a pull request and mark it as "WIP" for work in progress to get code review, run the auto builds, etc.

ghutchis avatar Oct 31 '23 12:10 ghutchis

Hi, @ghutchis do you have any resources (videos/documentation) to brush up my knowledge of QT?

Atharva-Kanherkar avatar Nov 01 '23 18:11 Atharva-Kanherkar

https://www.qt.io/academy https://doc.qt.io/qt-5/classes.html

In reality, I suggest you start by looking at the "SimpleAutosave" example and consider what it does.

You can also start by making sure you can build Open Chemistry.

ghutchis avatar Nov 01 '23 19:11 ghutchis

This issue has been mentioned on Avogadro Discussion. There might be relevant details there:

https://discuss.avogadro.cc/t/help-finding-teaching-materials/4993/8

avo-bot avatar Nov 24 '23 16:11 avo-bot