Git Product home page Git Product logo

Comments (8)

colindean avatar colindean commented on July 3, 2024 1

Another thought: something I see as a rough edge of the pre-commit workflow is having to either have a Rust setup or have installed ripsecrets through something else, e.g. Homebrew. Pre-commit knows how to setup a Python environment. What if there was a simple PyO3 wrapper around ripsecrets as a library, and ripsecrets published Python packages to PyPI? That would eliminate the Rust compile step and alleviate the prerequisite. The exchange would be more setup and care for ripsecrets, but automatable.

from ripsecrets.

bgianfo avatar bgianfo commented on July 3, 2024

Seems like there is some discussion about previous solutions: pre-commit/pre-commit#1453

from ripsecrets.

sanmai-NL avatar sanmai-NL commented on July 3, 2024

If @sirwart were to list this crate on crates.io, we could use cargo binstall and use a system language pre-commit hook. This would considerably reduce dev container image build time or complexity of fetching pre-build binaries.

  cargo binstall ripsecrets

 INFO resolve: Resolving package: 'ripsecrets'
ERROR Fatal error:

  × For crate ripsecrets: crates.io API error for ripsecrets: could not GET https://crates.io/api/v1/crates/ripsecrets: HTTP status client error (404 Not Found) for url (https://crates.io/api/v1/crates/ripsecrets)
  ├─▶ crates.io API error for ripsecrets: could not GET https://crates.io/api/v1/crates/ripsecrets: HTTP status client error (404 Not Found) for url (https://crates.io/api/v1/crates/ripsecrets)
  ├─▶ could not GET https://crates.io/api/v1/crates/ripsecrets: HTTP status client error (404 Not Found) for url (https://crates.io/api/v1/crates/ripsecrets)
  ╰─▶ HTTP status client error (404 Not Found) for url (https://crates.io/api/v1/crates/ripsecrets)

from ripsecrets.

sanmai-NL avatar sanmai-NL commented on July 3, 2024

See also: cargo-bins/cargo-binstall#3

from ripsecrets.

bgianfo avatar bgianfo commented on July 3, 2024

That's a good point, I think you could even just publish the existing rust binary as a python wheel.

from ripsecrets.

sirwart avatar sirwart commented on July 3, 2024

@bgianfo does publishing the binary to crates.io + system hook solve the problem for you? I have a visceral reaction to publishing as a Python library since one of the reasons I created ripsecrets was because at my previous job I couldn't commit because my system Python install was borked that was preventing the secret detector from running.

from ripsecrets.

lafrenierejm avatar lafrenierejm commented on July 3, 2024

@sirwart Following #85, the release Actions workflow now includes publishing to crates.io. Would you be willing to release a patch version to make the crate available?

from ripsecrets.

lafrenierejm avatar lafrenierejm commented on July 3, 2024

@bgianfo, @colindean sirwart has published ripsecrets to crates.io as ripsecrets. You should be unblocked if you want to use cargo binstall.

from ripsecrets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.