-
Notifications
You must be signed in to change notification settings - Fork 10
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
Feature/pypi packaging #501
Conversation
Needs to wait that #511 is merged |
Not to forget this : #511 (comment) |
8919d90
to
07a4f4b
Compare
Based on the recommendations of pytest I think the following setup
Seems the best structure to make sure the tests run on the installed package while it fixes the now weird import rules (currently in a python terminal under virtual env, This would require to change If we do this, the code currently in This move has to be done before a release because it will change the code structure. I had not fully understood the pypi structure in the past when I introduced the |
07a4f4b
to
bab2dcb
Compare
bab2dcb
to
ceef227
Compare
The refactor also removed unused imports
Rename local_deploy to cli (command-line interface) Rename server_deploy to server
The -png and -pdf options are thus not usable
The requirements should be installed from install_require in setup.py, that way the tests are run as if someone would install mvs_eland as a pip package
28b2f55
to
eb178cb
Compare
Modify the README and readthedocs as well
@smartie2076, @SabineHaas, @Piranias, @mahendrark The files that were in |
I started with a fresh virtual environment and installed all requirements via
Did you test the new setup in a clean environment and do you have any idea what could be the problem @Bachibouzouk? These are all packages installed: packages.txt Using the command line, however, it works.. at least I get up to the point where my input files are not up-to-date:
|
@Bachibouzouk already solved - I show the solution here, in case any other ppl have the same issue: So, I'm using Pycharm as IDE and I needed to uncheck the box "Add content roots to PYTHONPATH" in the "run/debug configurations" (open by This wasn't needed before the changes and I think it has something to do with a specific folder being chosen as source now..? But actually I have no idea and I'd like to understand - so if you have an idea it would be cool if you could explain @Bachibouzouk :) |
I always run code within my terminal and not within PyCharm IDE. I did the tests in a fresh environment. I am not sure why this happened to you... |
Fix #423
Fix #545
Changes proposed in this pull request:
srv/mvs_eland
src/mvs_eland/utils
subpackage (containsconstants.py
,constants_json_string.py
,constants_output.py
.src/utils.py
module tosrc/mvs_eland/utils/__init__.py
tests/constants.py
-->tests/_constants.py
src.
is replaced bymvs_eland.
)tests/__init__.py
mvs_eland_tool
folder and move its content insrc/mvs_eland
install_requires
andextra_requires
insetup.py
requirements
folder and read the requirement from there forsetup.py
The following steps were realized, as well (if applies):
black . --exclude docs/
)EXECUTE_TESTS_ON=master pytest
)For more information on how to contribute check the CONTRIBUTING.md.