amuse icon indicating copy to clipboard operation
amuse copied to clipboard

separate standalone amuse-units package

Open rieder opened this issue 5 years ago • 15 comments

rieder avatar Jun 02 '20 12:06 rieder

installing amuse-units and then amuse-framework seems to work for me, as does installing just amuse-units.

rieder avatar Jun 02 '20 12:06 rieder

ok, but I think amuse units component themselves need some work to remove e.g. the amuse exceptions etc

ipelupessy avatar Jun 02 '20 13:06 ipelupessy

I think the exceptions can be converted to normal exceptions, however there is also some support utilities used (late, memoization

ipelupessy avatar Jun 02 '20 13:06 ipelupessy

I'll check. For many of those I don't think I know what they do...

rieder avatar Jun 02 '20 13:06 rieder

i think late does what functools cached_property (introduced in 3.8) does and the memoization is lru_cache (3.3 or so)

ipelupessy avatar Jun 02 '20 13:06 ipelupessy

Ok. I'm not yet happy with a 3.8 dependency but 3.3 is certainly fine.

rieder avatar Jun 02 '20 13:06 rieder

memoization speeds up the unit module considerably, the late stuff I have never really seen what it adds though

ipelupessy avatar Jun 02 '20 13:06 ipelupessy

memoization speeds up the unit module considerably

Ah, I see. I guess it should have been memorize :). I'll see if I can replace that.

rieder avatar Jun 02 '20 13:06 rieder

lru_cache is not a simple drop-in replacement unfortunately... needs a bit more work.

rieder avatar Jun 02 '20 13:06 rieder

here's a description of how lru_cache could work for methods... not sure I like this. https://stackoverflow.com/questions/33672412/python-functools-lru-cache-with-class-methods-release-object

rieder avatar Jun 02 '20 13:06 rieder

just copying the necessary bits is always an option...

ipelupessy avatar Jun 02 '20 14:06 ipelupessy

(ie just putting the late and memoization bits also in units) with a comment and view of replacing them with standard constructs...

ipelupessy avatar Jun 02 '20 14:06 ipelupessy

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Mar 04 '22 15:03 stale[bot]

keep open

ipelupessy avatar Mar 05 '22 19:03 ipelupessy

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 28 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 04 '22 19:05 stale[bot]