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

[Technical debt] Avoid changing python path and write proper setup.py #14

Open
pkajaba opened this issue Sep 14, 2017 · 6 comments
Open

Comments

@pkajaba
Copy link
Contributor

pkajaba commented Sep 14, 2017

Here is changed Python path and it's considered for bad practice:

https://github.com/fabric8-analytics/fabric8-analytics-license-analysis/blob/master/scripts/entrypoint.sh#L4

@pkajaba
Copy link
Contributor Author

pkajaba commented Sep 14, 2017

cc: @harjinder-hari

@sara-02
Copy link
Contributor

sara-02 commented Oct 25, 2017

@pkajaba how to fix this?

@pkajaba
Copy link
Contributor Author

pkajaba commented Oct 25, 2017

@sara-02 you should remove where you mangle with python path, but it will stop working...

  1. remove python path mangling
  2. fix errors which were caused by this change.

@jpopelka
Copy link
Contributor

it's considered for bad practice:

Do you have any pointers to support your claim ?

remove python path mangling

You mean the --pythonpath /src/ ?

@pkajaba
Copy link
Contributor Author

pkajaba commented Oct 25, 2017

Do you have any pointers to support your claim?

I can give you a reason why not to do in this case. I might not be a bad idea to mangle PYTHONPATH in some cases but it's not really necessary in case of this project.

First of all, there is no setup.py, so there is no proper way how to install it through pip. That's why we copy it to root folder of a container and then change python path.

I have to apologize since I did not phrase it correctly. Changing python path, in this case, is hacking and completely unnecessary. We don't have to fix right away since it does not affect functionaly, but it's technical debt.

You mean the --pythonpath /src/ ?

Yes :-)

EDIT: I changed the title and added a label. Hopefully, it makes more sense now.

@pkajaba pkajaba changed the title Changing python path is bad practice [Technical debt] Avoid changing python path and write proper setup.py Oct 25, 2017
@tisnik
Copy link
Member

tisnik commented May 31, 2018

@sara-02 are you planning to add this issue to Planner and to the current sprint?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants