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

Resolving #143 #202

Merged
merged 4 commits into from
Oct 24, 2021
Merged

Conversation

Abelarm
Copy link
Contributor

@Abelarm Abelarm commented Oct 15, 2021

Created a function that "install" the latest version of numpy before running the setup, so no code change is needed and no external packages are needed.

The installation of numpy is not completed until the whole setup is complete. (even though you can use it during setup)
If the installation fails the numpy is not installed.

Todo:

  • prevent the installation when using with --help
  • If merged documentation needs to be updated
  • Change the CI

@codecov
Copy link

codecov bot commented Oct 15, 2021

Codecov Report

Merging #202 (fa3d95e) into develop (760eddb) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #202   +/-   ##
========================================
  Coverage    45.47%   45.47%           
========================================
  Files           84       84           
  Lines         9029     9029           
========================================
  Hits          4106     4106           
  Misses        4923     4923           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 760eddb...fa3d95e. Read the comment docs.

@Abelarm
Copy link
Contributor Author

Abelarm commented Oct 15, 2021

I am mad at the Codacy Static Code Analysis! otherwise would have been everything green

@dalonsoa
Copy link
Collaborator

This is quite neat! Many thanks.

I'm sorting out the Codacy stuff. That import is perfectly legit to check if the package is available so that error should be ignored. You could add # noqa at the end of that line, so it is ignored by the linter, so:

import numpy  # noqa

@Abelarm
Copy link
Contributor Author

Abelarm commented Oct 18, 2021

Regarding the three points of the todo,

the first one is really hard, but the other two are easy, should I add them to this PR or separates ones?

@dalonsoa
Copy link
Collaborator

I would add them as part of the PR. They are, in the end, consequence of this change, so should be merged together.

Why is the first point so complicated?

@Abelarm
Copy link
Contributor Author

Abelarm commented Oct 18, 2021

I would add them as part of the PR. They are, in the end, consequence of this change, so should be merged together.

Why is the first point so complicated?

because the --help is provided by the Setup function of numpy which is not installed...
so probably it's a kind of non-problem because also in the case of running with --help to print the output we need numpy

A kind of side effect

@dalonsoa
Copy link
Collaborator

Well, it is undesirable to have numpy installed just for running --help, but I would say it is a minor issue and the benefits outweigh that inconvenience. I would suggest to just ignore that and - if it bothers you - open an issue to sort that out in the future.

@Abelarm
Copy link
Contributor Author

Abelarm commented Oct 18, 2021

Cool the test passes also by removing the pip install numpy (so my PR works in all the envs)
should I remove the pip install numpy also from deploy.yml and build_deploy_wheels.yml?

@dalonsoa
Copy link
Collaborator

dalonsoa commented Oct 18, 2021 via email

@Abelarm
Copy link
Contributor Author

Abelarm commented Oct 18, 2021

Leave those untouched. Your solution works absolutely fine, but it is specially beneficial for the end users. The ‘deploy’ workflows really affect no one. As they are working fine now, let’s leave them. On 18 Oct 2021, at 12:13, Luigi Giugliano @.***> wrote:  Cool the test passes also by removing the pip install numpy (so my PR works in all the envs) should I remove the pipi install numpy also from deploy.yml and build_deploy_wheels.yml? — You are receiving this because you commented. Reply to this email directly, view it on GitHub<#202 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABOQHLU3W6MO5MPB2CFO4B3UHP6NHANCNFSM5GC3UW3A.

but it's ok to remove the installation from the tests? or do I revert that commit?

@dalonsoa
Copy link
Collaborator

No, no, that's fine. The CI system is there to test that everything works, including the installation process. So it is good that you changed that. As you said, it is good to prove that your solution works in all environments. It is just in the CD system where that is not needed.

@Abelarm
Copy link
Contributor Author

Abelarm commented Oct 18, 2021

All the TODOs are done! (the --help left)

Ps: it documented how to generated the docs locally? ( I will use it for the next Issue)

@Abelarm
Copy link
Contributor Author

Abelarm commented Oct 23, 2021

@dalonsoa if you are planning to merge it after the end of October could you add the label hacktoberfest-accepted, thank you :)

@dalonsoa
Copy link
Collaborator

Actually, I was waiting for you to "request my review", then I'd prove it and merge.

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.

None yet

2 participants