Skip to content

Make development easier! #34

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

Merged
merged 2 commits into from
Oct 31, 2024
Merged

Make development easier! #34

merged 2 commits into from
Oct 31, 2024

Conversation

FatBoyXPC
Copy link
Collaborator

Nix shells are neat, thanks @jfly!

We stole a page from mycli on how to run this entry point / script without having to pip install it.

Due to this, we just happened to notice a latent bug with this version variable because we only get a version when it's installed.

Nix shells are neat, thanks @jfly!

We stole a page from mycli on how to run this entry point / script
without having to pip install it.

Due to this, we just happened to notice a latent bug with this __version__
variable because we only get a version when it's installed.
Our nix build of shtuff was failing because it ran shtuff in a sandbox
that didn't have shtuff installed. We used to pip install it in the
Makefile but we opted out of doing that as it's unnecessary for Nix :)

Due to getting rid of the venv, we needed to invoke shtuff a bit
differently in the tests. That led to some interesting behavior.

As we no longer have access to `shtuff` (as it's not pip installed),
this meant the recursive `shtuff as` no longer works. Fixing this means
we no longer get two prompts (yay positive side effect!) which explains
the removal of the duplicate prompt assertion from some tests.

While we were debugging this, we made a few tests improvements. One of
these was moving from os.system() to subprocess.run() as os.system()
ignores the exit code, which made the test wait to timeout when looking
for output, as opposed to failing the test immediately.

We also moved from capture_output (which captures both stdout _and_
stderr) to only capturing stdout, which allows us to see the stderr when
debugging test failures.
@FatBoyXPC FatBoyXPC merged commit 986bef2 into jfly:main Oct 31, 2024
3 checks passed
@FatBoyXPC FatBoyXPC deleted the add-nix-devshell branch October 31, 2024 06:26
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.

2 participants