Coder Social home page Coder Social logo

Comments (12)

nkrah avatar nkrah commented on June 9, 2024 1

In any case, one could consider deleting old G4data when downloading new data upon the import statement after an update.

from opengate.

dsarrut avatar dsarrut commented on June 9, 2024

yes indeed! The way the g4 data is managed is not optimal.
However, a warning: the check is performed during the import, so if the check takes time, it may delay the starting phase of all scripts (currently, the import phase is already "slow", mainly due to itk I think).
Please, go with the PR ;) !

from opengate.

nkrah avatar nkrah commented on June 9, 2024

Agree, but don't think the check takes time. Downloading data is slow, but that only occurs once in a while after an update. I'll implement and check.

from opengate.

nkrah avatar nkrah commented on June 9, 2024

Is there any reason not to get the data from the Geant4 installation which is required anyhow? Does it need to be downloaded separately? By looking up the Geant4 install, one would automatically align G4 and opengate in terms of G4 data.
Opinions?

from opengate.

tbaudier avatar tbaudier commented on June 9, 2024

Hi @nkrah

You're right when you compile opengate. But when you install opengate on your compute with pip install opengate , Geant4 is not installed on your computer. You need to download the data.

from opengate.

nkrah avatar nkrah commented on June 9, 2024

I see. But don't you need Geant4 even if you install opengate via pip? Opengate uses Geant4 to run the simulation. Or does pip pull a pre-compiled Geant4?

from opengate.

tbaudier avatar tbaudier commented on June 9, 2024

Inside the wheel of opengate_core, you can find the compiled g4 librairies. But we cannot insert the data into the wheel because they are too big. This is why we prefer to download them at first import of opengate_core. It's not perfect because, the data are not removed correctly with pip uninstall opengate

from opengate.

nkrah avatar nkrah commented on June 9, 2024

OK, now I got the full picture.

Is it possible to write a "hook" for the uninstall to remove the data? Possibly also when running an update via pip?

from opengate.

tbaudier avatar tbaudier commented on June 9, 2024

I have a look and it seems not, eg:
https://stackoverflow.com/questions/70321823/deleting-associated-data-from-a-pip-package-when-uninstalling

The data has to be removed manually

from opengate.

nkrah avatar nkrah commented on June 9, 2024

I am finalizing a PR to solve this issue.

from opengate.

tbaudier avatar tbaudier commented on June 9, 2024

Done with #132

from opengate.

nkrah avatar nkrah commented on June 9, 2024

Sorry, I re-open this because I created another PR with some improvements over the previous one. Thomas was too efficient ... ;-)

from opengate.

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.