Skip to content
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

Fix for "Reader argument to ascii.read was deprecated" warning #165

Merged
merged 2 commits into from
Feb 2, 2024

Conversation

javierggt
Copy link
Contributor

@javierggt javierggt commented Jan 31, 2024

Description

This fixes the Reader argument to ascii.read was deprecated warning.

Fixes #164

Interface impacts

Testing

Unit tests

  • HEAD
  • Mac

Functional tests

I specifically ran pytest agasc/tests/test_agasc_2.py::test_against_ds_agasc on HEAD, both on the branch and on master, to verify that the master version gives the warning and the reader-deprecated branch does not.

@taldcroft
Copy link
Member

taldcroft commented Feb 2, 2024

@javierggt - testing needs to be done on HEAD linux since it depends on the ASCDS mp_get_agasc tool running. Also the linting CI is failing.

@javierggt
Copy link
Contributor Author

@taldcroft I did notice the linting CI is failing, but it is failing in a file I did not touch in this PR. Not only that, the file is in the dev directory. And on top of that, the linting is not reporting all the failures I saw offline when I ran black, after checking the details of the workflow.

Still, I can fix that if you want. I just thought this was a trivial PR.

@javierggt
Copy link
Contributor Author

@taldcroft, I fixed the linting issue.

I do not think it is reasonable in general to require fixing linting issues in code unrelated to the PRs. In this case it is simple enough, but I'm guessing the failure was related to a newer black version since that file's last commit.

@jeanconn
Copy link
Contributor

jeanconn commented Feb 2, 2024

Yeah, it has annoyed me in the past -- I thought github now had some hooks to try to run formatting checks only on the areas that have changed for the PR but it looked to me like it that wasn't worth it. I'm not sure if the way forward is to just fix formatting issues in the unrelated PR as you've done.

@taldcroft
Copy link
Member

@jeanconn - there exist kludgy ways to lint only changed code, but we don't (and won't) do that.

@javierggt - I agree with the principle that your PR is not responsible for cleaning linting problems. But in practice it needs to be fixed somewhere. The other option is to fix it in another PR and then rebase your PR on the fixed one. Your choice but I think just fixing it one PR is a little easier.

BTW, I did not look at the CI report but rather just noted that as a blocker before I would approve. I'd like to stick with our CI rules though and not merge anything that doesn't pass.

Copy link
Member

@taldcroft taldcroft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@javierggt javierggt merged commit 1d6dd75 into master Feb 2, 2024
1 check passed
@javierggt javierggt deleted the reader-deprecated branch February 21, 2024 14:44
This was referenced Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reader argument to ascii.read was deprecated
3 participants