econ-ark / HARK

Heterogenous Agents Resources & toolKit
Apache License 2.0
315 stars 195 forks source link

MAINT: Bump up min python version to 3.10 to align with SPEC 0 #1415

Closed MridulS closed 3 weeks ago

MridulS commented 3 weeks ago

We should probably look into loosely following https://scientific-python.org/specs/spec-0000

Numba supports python 3.12 too, so hopefully we should be able to bump up things all around.

The coverage action is broken, it doesn't really upload anything (returns a 404 error), we should probably remove it unless someone is actively monitoring it?

MridulS commented 3 weeks ago

The test failures are coming from the changes in interpolation.py

alanlujan91 commented 3 weeks ago

So we still can't bump up to 3.12? Do we know if these are fixable errors or does interpolation.py still not allow us to move up?

alanlujan91 commented 3 weeks ago

can you take a look at this when you have time @Mv77?

Mv77 commented 3 weeks ago

I'd be happy to.

But to make sure I have the right version of everything, is there any yaml file with the environment that I should use while checking the tests?

alanlujan91 commented 3 weeks ago

pip install -e . should install all the dependencies, we got rid of environment.yml files

Mv77 commented 3 weeks ago

I'll run that in a clean python 3.12 env and report back.

Mv77 commented 3 weeks ago

Can confirm all econforge tests fail locally. Debugging.

Mv77 commented 3 weeks ago

Here's a PR to @MridulS 's branch that fixes the issue. https://github.com/econ-ark/HARK/pull/1419

Pablo changed the name of a parameter in one of the main functions.

All tests pass locally except for an unrelated one, @sbenthall

File "/home/mvg/GitHub/HARK/HARK/tests/test_model.py", line 39, in test_init
    self.assertEquals(self.test_block_A.name, "test block A")
    ^^^^^^^^^^^^^^^^^
AttributeError: 'test_DBlock' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?
Mv77 commented 3 weeks ago

It looks like there are now unrelated errors having to do with assertions?

It is strange that I did not get those locally.

Mv77 commented 3 weeks ago

https://github.com/econ-ark/HARK/pull/1420 fixes a typo that is making the 3.12 versions fail.

What I can't figure out is why 3.11 is failing. There are some failures related to properties of numpy arrays that I can not reproduce locally on a fresh 3.11 env.

Mv77 commented 3 weeks ago

Do they fail locally for you @alanlujan91 ?

alanlujan91 commented 3 weeks ago

Do they fail locally for you @alanlujan91 ?

no, but they are failing on the mac tests and I have a windows, so I am trying to "guess" what a mac would like, we'll see if it passes!

Mv77 commented 3 weeks ago

MAC: It just doesn't work^{TM}

(works fine in my local ubuntu too)

alanlujan91 commented 3 weeks ago

@Mv77 I think i'm getting close, only 1 failing test on mac now!

alanlujan91 commented 3 weeks ago

UGHHH everything is passing except for coverage

I agree with @MridulS that we should remove it

alanlujan91 commented 3 weeks ago

I think this will let us finally bump to python 3.12!

Thank you @MridulS and @Mv77!

@mnwhite please review and merge when appropriate