-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make it work on recent Python #53
Conversation
Not working |
@sergiopoppi how did you install it? |
A clean shell improved... Runbasie now works. Other problems: runbasie |
This comment was marked as resolved.
This comment was marked as resolved.
Current status:
When running tests, I found that they were a little unmaintained. For example, some tests were requiring old versions of configuration test files. I copied an old test file to verify everything worked, and I now only have these two failures, which I frankly don't know how to address.
|
Just for the sake of understanding if always the same two tests don't pass, I marked them as |
Read from beamsize_table the nearest frequency value. | ||
If freq is None defauls to self.fmin | ||
@param freq: frequency (MHz) | ||
@type freq: Quantity | ||
@return: beamsize at given frequency | ||
""" | ||
if not freq: | ||
if freq is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This did not work anymore when freq was a quantity, so I explicitly used the test for None
.
@@ -10,13 +10,16 @@ | |||
from basie import target_parser | |||
|
|||
BASE_PATH = ".basie_test" | |||
curdir = os.path.abspath(os.path.dirname(__file__)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed all paths to data files to be relative to the current directory but without needing soft links (which would not work on Windows, by the way)
@@ -0,0 +1,10 @@ | |||
Alpha EqCross1_3 TP EQ 12:00:00h +45:00:00 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this file reproducing the test cases that were needed for some tests but were removed in some recent version of the example files.
@@ -43,9 +43,15 @@ | |||
|
|||
class VAngle(Angle): | |||
def __new__(cls, angle, unit=u.deg, wrap_angle=360 * u.deg, **kwargs): | |||
was_tuple=False | |||
if isinstance(angle, tuple) and unit in (u.deg, u.hour): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tuple of values does not work anymore with astropy's Angle in recent versions, due to its ambiguous behavior when the degree/hour value is 0. So, I reformatted the angle as a single number in degrees when it is given as a tuple, but kept the representation as sexagesimal so that the output does not change.
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
I arrived up to installing (now with
pip install .
) and runningrunbasie out -c configuration_SR.txt -d
.Feel free to suggest any further tests you would like to run to make sure it works!
User-facing changes:
To run tests, you can now do
pytest basie/tests
or
tox -e py{38,39,310,311,312}-tests
to test locally on any of those Python versionsInternal changes:
I moved around directories, eliminating soft links and giving the package a standard astropy-affiliated package structure. It seems like I changed a thousand things, but the diff is mostly the result of changing directory names.
I think it is now easier to follow where things actually are. The script
runbasie
is automatically generated during installation, the version is automatically tracked from the git tags.