Giter Site home page Giter Site logo

Tests are failing about scikit-rf HOT 11 CLOSED

Vinc0110 avatar Vinc0110 commented on June 21, 2024
Tests are failing

from scikit-rf.

Comments (11)

Ttl avatar Ttl commented on June 21, 2024 3

CI installs the newest packages of dependencies unless specified otherwise. It seems that this was changed in the latest scipy release.

from scikit-rf.

jhillairet avatar jhillairet commented on June 21, 2024 3

So then maybe a super quick version 0.30.1 release? We should probably take a bit more time to prepare v1.0.0. @jhillairet ?

Yeah, I think so. Will prepare the next release asap.

from scikit-rf.

FranzForstmayr avatar FranzForstmayr commented on June 21, 2024 2

The main problem is that a fresh skrf venv fails to import skrf now. We should make a new release asap IMO.

Is it because of my fix to import linspace from numpy instead of scipy in taper.py? My question is: was it a problem I merged this change so quickly? Do we need to undo it?

Your fix is perfectly fine, but unreleased. So when installing via pip you'll get the old version which tries to import linspace from scipy.

from scikit-rf.

Ttl avatar Ttl commented on June 21, 2024 1

It's caused by the new scipy version. linspace should be imported from numpy instead of scipy in taper.py.

from scikit-rf.

FranzForstmayr avatar FranzForstmayr commented on June 21, 2024 1

I don't think it was removed, at least it was able to import linspace from 1.11.4 without error or warning.

Python 3.12.1 (tags/v3.12.1:2305ca5, Dec  7 2023, 22:03:25) [MSC v.1937 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import scipy
>>> scipy.__version__
'1.11.4'
>>> from scipy import linspace
>>>
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from scipy import linspace
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'linspace' from 'scipy' (/home/franz/.cache/pypoetry/virtualenvs/test-OHDMMxWo-py3.10/lib/python3.10/site-packages/scipy/__init__.py)

There was no deprecation warning in 1.11, that's why we missed to change that earlier.
@jhillairet
The main problem is that a fresh skrf venv fails to import skrf now. We should make a new release asap IMO.

from scikit-rf.

Vinc0110 avatar Vinc0110 commented on June 21, 2024 1

So then maybe a super quick version 0.30.1 release? We should probably take a bit more time to prepare v1.0.0. @jhillairet ?

from scikit-rf.

pjg0707 avatar pjg0707 commented on June 21, 2024 1

Setting the scipy version to 1.11.4 instead of 1.12 also worked for me.
Something must have been allowing the linspace to be accessible up to that version and it was changed in the latest release. Good that it was soon identified 👍

from scikit-rf.

Vinc0110 avatar Vinc0110 commented on June 21, 2024

Wow, the tests are still a huge mess:

=========================== short test summary info ============================
  ERROR skrf/calibration/tests/test_calibration.py
  ERROR skrf/calibration/tests/test_calibrationSet.py
  ERROR skrf/calibration/tests/test_deembedding.py
  ERROR skrf/io/tests/test_citi.py
  ERROR skrf/io/tests/test_csv.py
  ERROR skrf/io/tests/test_io.py
  ERROR skrf/io/tests/test_mdif.py
  ERROR skrf/media/tests/test_all_construction.py
  ERROR skrf/media/tests/test_coaxial.py
  ERROR skrf/media/tests/test_cpw.py
  ERROR skrf/media/tests/test_mline.py
  ERROR skrf/tests/test_circuit.py
  ERROR skrf/tests/test_convenience.py
  ERROR skrf/tests/test_frequency.py
  ERROR skrf/tests/test_mathFunctions.py
  ERROR skrf/tests/test_network.py
  ERROR skrf/tests/test_network2.py
  ERROR skrf/tests/test_networkSet.py
  ERROR skrf/tests/test_plotting.py
  ERROR skrf/tests/test_qfactor.py
  ERROR skrf/tests/test_static_data.py
  ERROR skrf/tests/test_tlineFunctions.py
  ERROR skrf/tests/test_util.py
  ERROR skrf/tests/test_vectorfitting.py
  ERROR skrf/vi/tests/test_validators.py
  ERROR skrf/vi/vna/hp/tests/test_8510c.py
  ERROR skrf/vi/vna/keysight/tests/test_fieldfox.py
  ERROR skrf/vi/vna/keysight/tests/test_pna.py
  !!!!!!!!!!!!!!!!!!! Interrupted: 28 errors during collection !!!!!!!!!!!!!!!!!!!
  ============================== 28 errors in 8.99s ==============================
  py39: exit 2 (11.15 seconds) /home/runner/work/scikit-rf/scikit-rf> python -m pytest pid=2004

This does not seem related to my changes. It's more like a general issue.

______________ ERROR collecting skrf/tests/test_vectorfitting.py _______________
  ImportError while importing test module '/home/runner/work/scikit-rf/scikit-rf/skrf/tests/test_vectorfitting.py'.
  Hint: make sure your test modules/packages have valid Python names.
  Traceback:
  /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/importlib/__init__.py:127: in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
  skrf/tests/test_vectorfitting.py:3: in <module>
      import skrf
  skrf/__init__.py:20: in <module>
      from . import taper
  skrf/taper.py:31: in <module>
      from scipy  import linspace
  E   ImportError: cannot import name 'linspace' from 'scipy' (/home/runner/work/scikit-rf/scikit-rf/.tox/py39/lib/python3.9/site-packages/scipy/__init__.py)

@FranzForstmayr: Any ideas?

from scikit-rf.

Vinc0110 avatar Vinc0110 commented on June 21, 2024

That was it, thanks!
I did see that error message, but I could not believe this became an issue from one day to another. How is the scipy version changing? Does it depend on some random decision by the github servers?

from scikit-rf.

pjg0707 avatar pjg0707 commented on June 21, 2024

Seems that scipy had a from numpy import * which was removed after scipy v1.3.3.

What I don't understand is what has changed to make this issue appear now.
Pointing to scipy 1.3.3 is likely to cause many other issues.

from scikit-rf.

Vinc0110 avatar Vinc0110 commented on June 21, 2024

The main problem is that a fresh skrf venv fails to import skrf now. We should make a new release asap IMO.

Is it because of my fix to import linspace from numpy instead of scipy in taper.py? My question is: was it a problem I merged this change so quickly? Do we need to undo it?

from scikit-rf.

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.