Open renan-souza opened 7 months ago
One thing you need to do is put the sample_settings.yaml
file in the flowcept package itself. So move resources/sample_settings.yaml
to flowcept/sample_settings.yaml
. This will make sure the file is in the built package that is pushed up to PyPI. That way when a user does a pip install
it will include the yaml file. The next step is to move the yaml file from the installed package to a location where the user can easily edit it.
Something to consider is that a user may already have a settings file. Maybe they got it from someone else or have one from installing a previous version of the package. So when that user installs flowcept in a new environment, they don't want flowcept to overwrite their existing settings file. They just want to point flowcept to their existing settings file.
Providing a settings file for users feels like the installation process for the sphinx package. After you pip install sphinx, you run a sphinx command from the terminal to create a config file which is later used to generate documentation. How about doing a similar thing for flowcept? A user pip installs flowcept then they run a command like flowcept config
which would create the settings file in a default location or in the same directory where the command is run. If the settings file already exists in that location then abort creating the file.
There was no description so I added one.
The title for this issue is about to be invalid because the setup.py file will be gone soon. Actually, this issue should be closed and issue #147 should be reopened to take its place.
When you pip install flowcept in a Python environment, then import the package with
import flowcept
, it gives the following exception:Obviously it's looking for a settings file in my home directory but the implementation of this is a poor user experience. The user should not be required to create such a file just to use the package. Some options to fix this are: