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

secureli init fails with No such file or directory: 'pre-commit' error #80

Closed
gabenegron opened this issue Apr 26, 2023 · 2 comments · Fixed by #85
Closed

secureli init fails with No such file or directory: 'pre-commit' error #80

gabenegron opened this issue Apr 26, 2023 · 2 comments · Fixed by #85
Assignees
Labels
bug Something isn't working

Comments

@gabenegron
Copy link
Contributor

gabenegron commented Apr 26, 2023

hartonor@C02GKP9MMD6M my-reactapp % secureli init
SeCureLI has not been setup yet.
Initialize SeCureLI now? [Y/n]: Y
Detected the following languages:

  • TypeScript: 100%
    Overall Detected Language: TypeScript
    ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
    │ /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/secureli/main.py │
    │ :55 in init │
    │ │
    │ 52 │ """ │
    │ 53 │ Detect languages and initialize pre-commit hooks and linters for the project │
    │ 54 │ """ │
    │ ❱ 55 │ container.initializer_action().initialize_repo(Path("."), reset, yes) │
    │ 56 │
    │ 57 │
    │ 58 @app.command() │
    │ │
    │ ╭─── locals ────╮ │
    │ │ reset = False │ │
    │ │ yes = False │ │
    │ ╰───────────────╯ │
    │ │
    │ /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/secureli/actions │
    │ /initializer.py:26 in initialize_repo
    ... // there are some more stuffs here
    ... // there are some more stuffs here
    ... // there are some more stuffs here

FileNotFoundError: [Errno 2] No such file or directory: 'pre-commit'

@gabenegron gabenegron added the bug Something isn't working label Apr 26, 2023
@gabenegron
Copy link
Contributor Author

Raul C:

I think from a pip standpoint, we should probably be able to move pre-commit over to being a "required" package in poetry and pip should pick up that it's a dependency.

We moved it over to a dev dependency for the formula creation since pre-commit doesn't need to be installed in the formula virtual env itself, which is probably why pip doesn't bother pulling down pre-commit when installing secureliI think from a pip standpoint, we should probably be able to move pre-commit over to being a "required" package in poetry and pip should pick up that it's a dependency.

@centenor centenor self-assigned this Apr 28, 2023
@centenor
Copy link
Contributor

Working on this issue.

The resolution I will be putting in place is as follows -

  • Move pre-commit to being a required dependency. This should force the pip installation to pull that package down
  • Updating the homebrew formula creation script to filter out packages that are needed for pip but not the homebrew formula
  • Updating lock file to reflect pre-commit being moved to a dependency

@centenor centenor linked a pull request Apr 28, 2023 that will close this issue
centenor added a commit that referenced this issue Apr 28, 2023
Fixes - #80

Resolution

* Move pre-commit to being a required dependency. This should force the
pip installation to pull that package down
* Updating the homebrew formula creation script to filter out packages
that are needed for pip but not the homebrew formula
* Updating lock file to reflect pre-commit being moved to a dependency

---------

Co-authored-by: Raul Centeno <raul.centeno@slalom.com>
stujfiter added a commit that referenced this issue Aug 2, 2023
Bumps [pathspec](https://github.com/cpburnz/python-pathspec) from 0.11.1
to 0.11.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/cpburnz/python-pathspec/releases">pathspec's
releases</a>.</em></p>
<blockquote>
<h2>v0.11.2</h2>
<p>Release v0.11.2. See <a
href="https://github.com/cpburnz/python-pathspec/blob/v0.11.2/CHANGES.rst">CHANGES.rst</a>.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/cpburnz/python-pathspec/blob/master/CHANGES.rst">pathspec's
changelog</a>.</em></p>
<blockquote>
<h2>0.11.2 (2023-07-28)</h2>
<p>New features:</p>
<ul>
<li><code>Issue
[#80](https://github.com/cpburnz/python-pathspec/issues/80)</code>_:
match_files with negated path spec.
<code>pathspec.PathSpec.match_*()</code> now have a <code>negate</code>
parameter to make using <em>.gitignore</em> logic easier and more
efficient.</li>
</ul>
<p>Bug fixes:</p>
<ul>
<li><code>Pull
[#76](https://github.com/cpburnz/python-pathspec/issues/76)</code>_: Add
edge case: patterns that end with an escaped space</li>
<li><code>Issue
[#77](https://github.com/cpburnz/python-pathspec/issues/77)</code><em>/<code>Pull
[#78](https://github.com/cpburnz/python-pathspec/issues/78)</code></em>:
Negate with caret symbol as with the exclamation mark.</li>
</ul>
<p>.. _<code>Pull
[#76](https://github.com/cpburnz/python-pathspec/issues/76)</code>: <a
href="https://redirect.github.com/cpburnz/python-pathspec/pull/76">cpburnz/python-pathspec#76</a>
.. _<code>Issue
[#77](https://github.com/cpburnz/python-pathspec/issues/77)</code>: <a
href="https://redirect.github.com/cpburnz/python-pathspec/issues/77">cpburnz/python-pathspec#77</a>
.. _<code>Pull
[#78](https://github.com/cpburnz/python-pathspec/issues/78)</code>: <a
href="https://redirect.github.com/cpburnz/python-pathspec/pull/78/">cpburnz/python-pathspec#78</a>
.. _<code>Issue
[#80](https://github.com/cpburnz/python-pathspec/issues/80)</code>: <a
href="https://redirect.github.com/cpburnz/python-pathspec/issues/80">cpburnz/python-pathspec#80</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/cpburnz/python-pathspec/commit/878be226c5324a4c5470c2ff86034d27c0734d70"><code>878be22</code></a>
Release v0.11.2</li>
<li><a
href="https://github.com/cpburnz/python-pathspec/commit/c0aca9fa0fe4aaa7967beb717f726ed36d9ab2fe"><code>c0aca9f</code></a>
Release v0.11.2</li>
<li><a
href="https://github.com/cpburnz/python-pathspec/commit/fb2246c0b50b95803b8abee2b2bfbdca39850918"><code>fb2246c</code></a>
Implement issue 80</li>
<li><a
href="https://github.com/cpburnz/python-pathspec/commit/933dd7da982551300a584c98570993402a56bc27"><code>933dd7d</code></a>
Update CHANGES</li>
<li><a
href="https://github.com/cpburnz/python-pathspec/commit/dfb630b7bd42956bdd6834c651806d010e01e5f6"><code>dfb630b</code></a>
Update CHANGES</li>
<li><a
href="https://github.com/cpburnz/python-pathspec/commit/cebf13fe5c986178d277bc7e01baa28fd10742d2"><code>cebf13f</code></a>
Merge pull request <a
href="https://redirect.github.com/cpburnz/python-pathspec/issues/78">#78</a>
from tomruk/caret-symbol</li>
<li><a
href="https://github.com/cpburnz/python-pathspec/commit/518db79aa414816ac41b752e94ddb1b25850304d"><code>518db79</code></a>
Merge branch 'master' into caret-symbol</li>
<li><a
href="https://github.com/cpburnz/python-pathspec/commit/57fbd3ed69597d35a50c56446d60e2c17ab04baf"><code>57fbd3e</code></a>
Pass caret negation</li>
<li><a
href="https://github.com/cpburnz/python-pathspec/commit/6b58e23b6038051fb2d690691912bca3dffcde97"><code>6b58e23</code></a>
Negate with caret symbol as with the exclamation mark</li>
<li><a
href="https://github.com/cpburnz/python-pathspec/commit/b9a014e560af033591d8cfe7734deb929cc52f67"><code>b9a014e</code></a>
Update CHANGES</li>
<li>Additional commits viewable in <a
href="https://github.com/cpburnz/python-pathspec/compare/v0.11.1...v0.11.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pathspec&package-manager=pip&previous-version=0.11.1&new-version=0.11.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: stujfiter <korey.earl@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants