Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add VS Code development environment #432

Merged
merged 8 commits into from
Oct 25, 2024

Conversation

Philippluca
Copy link
Contributor

@Philippluca Philippluca commented Sep 30, 2024

Closes: wapaAdmin#81

@cymed cymed requested a review from ponceta October 1, 2024 06:28
@Philippluca Philippluca requested a review from domi4484 October 2, 2024 08:16
@ponceta
Copy link
Member

ponceta commented Oct 2, 2024

I have a general remark on embedding visual code windows path to the environment, is that not a burden for linux devs @domi4484 ?

@@ -0,0 +1,4 @@
{
"qgis.installationRoot": "C:\\Program Files\\QGIS 3.34.10",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When using OSGEO4W installer which is recommended by TEKSI, the path will be different.
eg : C:\OSGeo4W\bin\qgis-ltr-bin.exe

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: Should this recommendation be placed within the README.md as well?
The settings.json was intended as a template. User can overwrite the settings in vscode. See also comment in README.md:

  1. Install QGIS in Version 3.34.10 or adapt qgis.installationRoot in '.vscode/settings.json'.

If QGIS & Shell would be found on PATH on all Plattform, the configuration would be much simpler. Alternatively, if the required version / distribution of QGIS could be specified we would have the option to write a platform aware launch.json without using the "hacky" settings.json.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we adapt .vscode/settings.json will it not always show as modified in git status?

If QGIS & Shell would be found on PATH on all Plattform, the configuration would be much simpler.

Maybe the needed path could be defined in system variables. If not set, just use the most common variant (porbably windows/OSGeo4w ?).
Or providing the file as a settings.json.default to be renamed?

But I am not used to this kind of vscode configuration I don't now what's the best way.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I propose to use OSGeo4w as default in settings.json and adapting it to qgis.installationRoot.windows. If we run int in vscode the value either is correct, or the developer will get a message like "C:\OSGeo4w\qgis.bar was not found." I assume every developer will get a hint of what to do. OSGeo4w, in the optimal case, defines a link for the lates installed QGIS version to use. Corresponding linux variant can then be added as well.

The approuch should not depend on any environment variables defined from outside of VSCode as this break the whole concept of "no setup needed launch configuration".

Philippluca and others added 2 commits October 2, 2024 15:31
Co-authored-by: Arnaud Poncet-Montanges <ponceta@users.noreply.github.com>
@domi4484
Copy link
Contributor

domi4484 commented Oct 2, 2024

I have a general remark on embedding visual code windows path to the environment, is that not a burden for linux devs @domi4484 ?

@ponceta I think it should not disturb if we don't use those task. It seems all a bit system/installation dependent but if it helps other I have nothing against

@Philippluca Philippluca marked this pull request as draft October 4, 2024 15:24
@Philippluca Philippluca requested a review from ponceta October 15, 2024 17:35
@Philippluca Philippluca marked this pull request as ready for review October 15, 2024 17:35
Co-authored-by: Damiano Lombardi <lombardi.damiano@gmail.com>
@ponceta ponceta merged commit e1e6cca into teksi:main Oct 25, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

separate vsconfig to separate PR on teksi/wastewater
3 participants