Getting started with Forked Repo

33 views
Skip to first unread message

Chandni Joshi

unread,
Jun 16, 2020, 6:31:05 PM6/16/20
to OHC-OPAL
Hi everyone, 

I have a very basic question about how to get the forked Opal repo running on my local machine. I have used the pip install and got opal working but now I want to make changes and see if that reflects in the application. 

I have worked in Django python before, but here I am nor sure how to get the application started, I do see a setup file which I am not sure how to use.

Would we glad to receive any pointers on this. Please excuse me for such a basic question. 

Thanks

David Miller

unread,
Jun 17, 2020, 7:50:35 AM6/17/20
to Chandni Joshi, OHC-OPAL
Hi, 

If I understand you correctly you have a working application and a local copy of the Opal git repository, and you would like your application to use this local version rather than a version installed from pypi via pip?

The steps would be:
In the python virtual environment that your application runs in

pip uninstall opal
python /path/to/your/local/copy/opal/setup.py develop

Your application should then be using the local copy of the git repo rather than a version from pip.
You can test it easily by running the Django runserver command, making a simple edit to a file in opal (for instance adding a blank line) and checking to see that the code reloader picks this up.

Best

David


--
You received this message because you are subscribed to the Google Groups "OHC-OPAL" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ohc-opal+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/ohc-opal/830a1f8f-f3d2-43b9-ba61-c55b89cca02bo%40googlegroups.com.


--
David Miller
Open Health Care

Chandni Joshi

unread,
Jun 17, 2020, 8:16:14 PM6/17/20
to OHC-OPAL

I used the python setup.py develop command but I don't see a manage.py. So when I run this command - python manage.py runserver .. this is what I get - -

Screen Shot 2020-06-17 at 5.13.54 PM.png

David Miller

unread,
Jun 18, 2020, 3:26:36 AM6/18/20
to Chandni Joshi, OHC-OPAL
Impossible to tell from that image what's going on - for instance the following is the general setup - this creates a new project:

cd /tmp
mkvirtualenv application
pip install opal
opal startproject newapplication
git clone https://github.com/openhealthcare/opal
cd newapplication
pip uninstall opal
python ../opal/setup.py develop
python manage.py shell
echo "print('hello world')" >> ../opal/opal/__init__.py
python manage.py shell

Chandni Joshi

unread,
Jun 22, 2020, 2:04:02 AM6/22/20
to OHC-OPAL
Thanks David. 

I got it up working. 

David Miller

unread,
Jun 22, 2020, 3:56:56 AM6/22/20
to Chandni Joshi, OHC-OPAL
Great - good to hear !

--
You received this message because you are subscribed to the Google Groups "OHC-OPAL" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ohc-opal+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages