UI icon indicating copy to clipboard operation
UI copied to clipboard

Updated `config.py` more platform independent (Win32)

Open phreed opened this issue 2 years ago • 4 comments

Issues to discuss:

Use of platformdirs

platformdirs makes some decisions that differ from those in the config.py. https://platformdirs.readthedocs.io/en/latest/

Use of sysconfig

sysconfig can be used to identify the site-packages (or equivalent). The use of MAIN_PATH = Path(sysconfig.get_path('purelib')) may be more reliable; than, searching based on knowing the location of __file__.

Using python Paths rather than strings

The place where this is most likely is config.py. Are there other source files that should be considered?

phreed avatar Nov 30 '23 16:11 phreed

we need to extensive test this. In general we want to host all user configurations in the YAML file. see the priorty of configuration image

brothercorvo avatar Nov 30 '23 17:11 brothercorvo

we need to extensive test this. In general we want to host all user configurations in the YAML file. see the priorty of configuration

Yes indeed. I see FTSConfig.yaml as used in development. I see in FTS Docs the two files described being edited to configure FTS are <site-packages>/FreeTAKServer-UI/config.py and <site-packages>/FreeTAKServer/controllers/configuration/MainConfig.py.

Those files are:

  • https://github.com/FreeTAKTeam/FreeTAKServer-User-Docs/docs/docs/FreeTAKHub/WebMap/Installation.md
  • https://github.com/FreeTAKTeam/FreeTAKServer-User-Docs/docs/docs/Installation/Android/installUIOnAndroid.md
  • https://github.com/FreeTAKTeam/FreeTAKServer-User-Docs/docs/docs/Installation/Windows/FreeTAKServer_Windows_Install_Tutorial.md
  • https://github.com/FreeTAKTeam/FreeTAKServer-User-Docs/docs/docs/Installation/RaspberryPie/Installation.md
  • https://github.com/FreeTAKTeam/FreeTAKServer-User-Docs/docs/docs/Installation/Linux/Installation.md
  • https://github.com/FreeTAKTeam/FreeTAKServer-User-Docs/docs/docs/Installation/Cloud/AWS.md

Is it appropriate for these documents to recommend modifying config.py?

phreed avatar Nov 30 '23 18:11 phreed

@naman108 please review this and see if we can approve

brothercorvo avatar Jan 28 '24 20:01 brothercorvo

@naman108 ping

brothercorvo avatar Feb 28 '24 16:02 brothercorvo