overthesun / simoc

A scalable model of an interactive, off-world community
https://ngs.simoc.space/
GNU General Public License v3.0
2 stars 2 forks source link

Add local path to `simoc_abm` in Development #413

Open granawkins opened 1 year ago

granawkins commented 1 year ago

I'm realizing that now, when we make changes to simoc-abm, you can't preview them in the frontend locally.

  1. When you run locally (is there an environment flag? where should we check?)
  2. Check for a sibling-directory called simoc-abm (just like simoc-web)
  3. If so, add it to the front of sys.path

This should cause the existing import statements (e.g. from simoc_abm.agent_model import AgentModel) to pull from the local instance instead of pip.

granawkins commented 1 year ago

From meeting discussion:

ezio-melotti commented 1 year ago

See https://pip.pypa.io/en/stable/topics/local-project-installs/ If you use -e edits will be reflected in real-time without having to reinstall after each change.