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

Implement install command #38

Merged
merged 5 commits into from
May 4, 2023
Merged

Implement install command #38

merged 5 commits into from
May 4, 2023

Conversation

unflxw
Copy link
Contributor

@unflxw unflxw commented May 3, 2023

Implement an installation command that asks the user to input the necessary information to generate an appsignal_config.py file.

Closes #18. [skip changeset]

The installer is functional, but it's missing "flair" -- emojis, links to the docs, friendliness, that sort of stuff. Suggestions welcome. I could also just copy what some other integration's installer does.

@backlog-helper
Copy link

backlog-helper bot commented May 3, 2023

✔️ All good!

New issue guide | Backlog management | Rules | Feedback

src/appsignal/cli.py Outdated Show resolved Hide resolved
tests/test_cli.py Outdated Show resolved Hide resolved
src/appsignal/cli.py Outdated Show resolved Hide resolved
src/appsignal/cli.py Show resolved Hide resolved
@tombruijn
Copy link
Member

Figured out how to test it locally: hatch run appsignal install

Is the package configured through the same method to expose an "appsignal" executable when the package is installed?

The installer is functional, but it's missing "flair" -- emojis, links to the docs, friendliness, that sort of stuff. Suggestions welcome. I could also just copy what some other integration's installer does.

I do not mind the lack of flair or emojis. I don't need a circus of emoji and colorized output when running an installer.

src/appsignal/cli.py Outdated Show resolved Hide resolved
@unflxw
Copy link
Contributor Author

unflxw commented May 4, 2023

@tombruijn Figured out how to test it locally: hatch run appsignal install
Is the package configured through the same method to expose an "appsignal" executable when the package is installed?

Sorry, forgot to mention how to test it locally 🙃 And, well, today I learned! The way I've been testing it myself is by running hatch shell, which drops you in a Python virtualenv with your package installed, and then running appsignal install. I like the way you found better.

So, yes, it exposes an "appsignal" executable when the package is installed, like the Ruby gem does.

Implement an installation command that asks the user to input the
necessary information to generate an `appsignal_config.py` file.
unflxw added 2 commits May 4, 2023 16:51
It's short, it's not as ugly as `appsignal_config.py`, it's vaguely
Pythonic and it doesn't lead to circular imports like `appsignal.py`.
Instead, make it part of the default config.
unflxw added 2 commits May 4, 2023 17:15
If the user presses CTRL+C to close the current process, don't
throw an exception in their face.
Added the instructions as suggested by @tombruijn, as well as some
"next step" instructions on how to actually use the file that was
just created. Also some emojis.
@unflxw unflxw merged commit 8386364 into main May 4, 2023
1 check passed
@tombruijn tombruijn deleted the install-command branch May 15, 2023 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Install command
3 participants