iotaledger / iota-sdk

The IOTA SDK provides developers with a seamless experience to develop on IOTA by providing account abstractions and clients to interact with node APIs.
Apache License 2.0
54 stars 39 forks source link

Use the `.env` file consistently in SDK getting started guides #2190

Open jlvandenhout opened 3 months ago

jlvandenhout commented 3 months ago

Description

Use the .env file for setting environment variables consistently for all applicable variables and for all supported languages.

For example the Rust wallet guide currently uses the .env file only for the node URL, but not for Stronghold password and path. Python uses .env for the node URL and Stronghold password with defaults, but not for the Stronghold path. etc.

Motivation

It would benefit both maintaining the getting started examples themselves, and maintaining the Wiki guides, if we would use the .env file for setting environment variables consistently for all required variables and for all languages.

Are you planning to do it yourself in a pull request?

No

Thoralf-M commented 3 months ago

Didn't we don't want to use .env at all for the getting started examples? I know for Rust it was changed here https://github.com/iotaledger/iota-sdk/commit/69c695b7396ea3fd052462fd2dd3454cb1f773c2#diff-bafc1c2f478b5b7c62dfa933ff5930af67f2bf938ff7dfb4fd375a2a499db864 but we can just undo this

jlvandenhout commented 3 months ago

Correct. But seeing we keep getting back to the .env file, I'd say we stop fighting the system. The sole reason for moving away from .env for getting started guides was so we could make them as "copy-paste" as possible. But seeing this results in unmaintained or incorrect guides quite easily, I say let's move back to using .env like all the rest of the examples and we'll make sure to explain the use of .env and list the proper dependencies on the Wiki side.