Added OSGEO4W path setups and OS agnostic URL joins #251
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added windows compatibility for native deployment/development
Additional notes for setting up on Windows:
Setting up native development in windows for RD WATCH
docker compose -f ./docker-compose.yaml up -d
pip install psycopg2-binary
You might have to install Visual C++ build tools 14.0+
Just follow the link in the error message and make sure you check off the build tools
Make sure
.py
files are associated with python interpreter. Cannot be conda.or
Set poetry interpreter in pycharm. This is what I am doing.
The intent is to just set the variables present in the
.env
anddev/.env.docker-compose-native
files. Do it any way you see fit, including manually via the windows UI.The following is a scripted way
Run this
.ps1
script to set environment variables in windows powershellYou have to remove empty lines and comments from the
.env
files, or else you will get an error about 0 length variables.Also make sure there are no quotation marks!!
Also, need to install gdal via this method. Conda will not work
https://trac.osgeo.org/osgeo4w/
Select advanced installation and ensure
gdal
and thegdal303-runtime
are selected. The dependencies should automatically be installed after.or
run
manage.py
in pycharm after setting up interpreter. Make sure to restart pycharm if you are using it to updateos.environ
and environment variables.Run, in a separate terminal,
poetry run --directory django celery --app rdwatch.celery worker --loglevel INFO --without-heartbeat
If you get an error about finding some
gdal304.dll
, go to the location and rename it togdal304.dll.orig
, and do the same for any other potential environments on the PATH. For me, I found one in the base anaconda environment.Run, in a separate terminal,
poetry run --directory django celery --app rdwatch.celery beat --loglevel INFO
Run, in a separate terminal,
cd vue
npm run dev
to spin up the front end