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

pip install does not actually install package sources #4

Closed
yaccos opened this issue Oct 8, 2020 · 4 comments
Closed

pip install does not actually install package sources #4

yaccos opened this issue Oct 8, 2020 · 4 comments

Comments

@yaccos
Copy link
Contributor

yaccos commented Oct 8, 2020

When running pip install autopacmen-Paulocracy, all dependencies are installed as well as the package metadata. However, none of the actual scripts in the package are installed. When checking the Pypi index and downloading the sources, it turns out that the sources from Pypi do not include the scripts, only the package metadata. The same problem appears when cloning this repository and using pip to install the package locally.

Paulocracy added a commit that referenced this issue Oct 13, 2020
@Paulocracy
Copy link
Member

Hello yaccos and first of all thank you for all your helpful issues :D
You're right that the pip command doesn't work properly D:, as I found out I forgot to add an argument for setuptools.setup() in setup.py so that the files where not included. I just pushed a commit which should fix the issue, and the next release (in a few minutes) should have this issue fixed. If not or if other issues arise, you may gladly let me know!

@yaccos
Copy link
Contributor Author

yaccos commented Oct 21, 2020

I am sorry that your patch does not work properly. Adding the argument for setuptools.setup() does indeed make the package include the scripts. However, the autopacmen package does still not export any of its functions. These functions must be explictly specified in the __init__.py file using import directories. For instance, if you want to export the function parse_bigg_metabolites_file, you must specify from .submodules.parse_bigg_metabolites_file import parse_bigg_metabolites_file (note the leading dot). In addition you must add a leading dot on line 24 in submodules/parse_bigg_metabolites_file.py, making it read: from .helper_general import json_write, standardize_folder .helper_general import json_write, standardize_folder. Rince and repeat for all the other function and variables (including examples) you want to be public by the package.

@Paulocracy
Copy link
Member

Hello again \o/ After several tries and reconsiderations, I just released a new version of AutoPACMEN (0.6.0) in which the repository's code is reorganized so that it should work better as a pip package. Importantly, the internal referencing for AutoPACMEN's modules should work now.
However, I did not make any functions "public" since I wanted to keep the repository's structure transparent in the module, i.e., autopacmen.submodules has still to be called.
If you find any new or still existing issues, you may - as always - gladly let me know!

@yaccos
Copy link
Contributor Author

yaccos commented Nov 11, 2020

Thank you very much for your help and effort. Now it seems like the pip package finally works. Personally, I have no problems with the decision to keep the repository structure transparant in the package. However, I might assume that somebody will find it a bit user-hostile to write statements such as from autopacmen.submodules.create_smoment_model_reaction_wise import create_smoment_model_reaction_wise_with_sbml. Again, this is not a problem for me.

@yaccos yaccos closed this as completed Nov 11, 2020
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

No branches or pull requests

2 participants