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

oatmeal: init at 0.12.3 #277622

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dustinblackman
Copy link

@dustinblackman dustinblackman commented Dec 29, 2023

Description of changes

Works towards solving dustinblackman/oatmeal#7

Adds Oatmeal, a terminal UI chat application that speaks with LLMs, complete with slash commands and fancy chat bubbles. It features agnostic backends to allow switching between the powerhouse of ChatGPT, or keeping things private with Ollama. While Oatmeal works great as a stand alone terminal application, it works even better paired with an editor like Neovim!

This file is originally from my NUR generated by GoReleaser, ported here with the addition of adding myself as a maintainer.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

Copy link
Contributor

@WolfangAukang WolfangAukang left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution. Please keep the maintainer addition and the package addition commits separate.

pkgs/by-name/oa/oatmeal/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/oa/oatmeal/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/oa/oatmeal/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/oa/oatmeal/package.nix Outdated Show resolved Hide resolved
@onemoresuza
Copy link
Contributor

@dustinblackman, I've made some changes based on your branch to make oatmeal build from source on nixpkgs. It's on this branch.

I've had to patch the build.rs file to remove network access from within the build process, since the nix sandbox does not allow it; thus, both the themes and the syntaxes are now downloaded by nix.

@dustinblackman
Copy link
Author

dustinblackman commented Dec 30, 2023

Thank you for your contribution. Please keep the maintainer addition and the package addition commits separate.

@WolfangAukang I appreciate the feedback! With the comment from @onemoresuza, I'm going to rework this to play nice with buildRustPackage

I've made some changes based on your branch

@onemoresuza This is great stuff, thanks a lot! The patch file you've put in is quite large, I think I can make changes to make this better! Let's keep chatting in dustinblackman/oatmeal#7

@dustinblackman dustinblackman force-pushed the oatmeal-0.12.1 branch 3 times, most recently from b32b2cc to 5b6d1ad Compare January 1, 2024 21:04
@dustinblackman dustinblackman changed the title oatmeal: init at 0.12.1 oatmeal: init at 0.12.3 Jan 1, 2024
@dustinblackman
Copy link
Author

dustinblackman commented Jan 1, 2024

This is ready for review again! Huge shoutout to @onemoresuza for helping me understand all the pieces needed to put this together. Testing locally this builds and runs as expected.

@onemoresuza
Copy link
Contributor

rustPlatform.buildRustPackage runs cargo test by default. The following tests are failing:

[user@hostname:~/oatmeal]$ nix-build -A oatmeal
failures:
    domain::services::app_state::tests::init::it_inits_and_reloads_from_session
    infrastructure::backends::langchain::tests::it_fails_health_checks
    infrastructure::backends::langchain::tests::it_gets_completions
    infrastructure::backends::langchain::tests::it_lists_models
    infrastructure::backends::langchain::tests::it_successfully_health_checks
    infrastructure::backends::ollama::tests::it_fails_health_checks
    infrastructure::backends::ollama::tests::it_gets_completions
    infrastructure::backends::ollama::tests::it_lists_models
    infrastructure::backends::ollama::tests::it_successfully_health_checks
    infrastructure::backends::openai::tests::it_fails_health_checks
    infrastructure::backends::openai::tests::it_gets_completions
    infrastructure::backends::openai::tests::it_lists_models
    infrastructure::backends::openai::tests::it_successfully_health_checks

test result: FAILED. 76 passed; 13 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s

@dustinblackman, do these tests rely on behaviors not allowed on the sandbox, for example, network access?

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.

8 participants