Trouble installing app?

65 views
Skip to first unread message

David Jones

unread,
Jan 26, 2023, 4:07:41 PM1/26/23
to nemo, David Barth
We here at UPenn are looking at potentially switching our lab management system over to NEMO, and we're starting to play w/ NEMO and try to develop some apps for it that we would use.  We developed a little "stockroom" app, and we're having trouble getting it to makemigrations on our new app.  We have the name of the app listed in the INSTALLED_APPS in settings.py, and we installed it as a python package in PyCharm (tried to do it the way suggested in the example on the wiki, kept getting an ImportError when running makemigrations).  Now, when we run makemigrations on our new app, we keep getting an error "ModuleNotFoundError:  No module named 'NEMO_stockroomcart'" (of course, "NEMO_stockroomcart" is what we named the app).

Do you have any suggestions on what else we can try to get the makemigrations for the app to work?

mathieu...@gmail.com

unread,
Jan 26, 2023, 4:49:25 PM1/26/23
to nemo, dav...@seas.upenn.edu, dsb...@seas.upenn.edu
Hi David,
It's hard without being able to look at the code, but here are a few things I can think of:

When moving your plugin from "inside" NEMO to "outside" of NEMO, you might have to fix some imports:
"from NEMO.apps.NEMO_stockroomcart" -> "from NEMO_stockroomcart"

Also, check if you have the apps.py file in your plugin and what the actual app name is in there

Even without running the migrations, you should be able to do "python -m pip install ./" from your plugin project and run NEMO

You can also take a look at the structure and configuration of the plugins in this repository as an example (mostly in Prometheus Computing group but there is also one in the 4DLabs group):
This is meant to be a place to host open source NEMO plugins, so in case you are interested, let me know and I'll make sure you can add your code there.

Thanks,
Mathieu

David Jones

unread,
Jan 27, 2023, 3:35:12 PM1/27/23
to mathieu...@gmail.com, nemo, dsb...@seas.upenn.edu
Hello Mathieu,
     Thank you for your help here.  We tried to do the pip install, and were running into the same issue.

Can we try this:  I've attached a .zip file of our plugin - could that be posted to the nemo-community gitlab (at least temporarily), so we can try pip installing it from there?
--
Thank you,

David J. Jones
Sr. Nanofabrication Engineer
Quattrone Nanofabrication Facility
Singh Center for Nanotechnology
University of Pennsylvania
3205 Walnut St. Room 115
Philadelphia, PA 19104
NEMO_stockroomcart.zip

Mathieu Rampant

unread,
Jan 27, 2023, 5:08:28 PM1/27/23
to David Jones, nemo, dsb...@seas.upenn.edu
Hi David,
I see what some of the issues are:
After moving your plugin outside of NEMO.apps, you need to follow the instructions about packaging the app:

This includes having a parent directory and creating a minimal setup.py in it (that parent directory part should be fine now if you clone the new repository)

If you have any trouble
 
Do you have a gitlab account so I can make you the owner of the group and repository?

Thanks,
Mathieu

Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
Message has been deleted
0 new messages