theosanderson / gensplore

Lightweight genome browser for microbial genomes
https://gensplore.theo.io
8 stars 1 forks source link

sweep: add a panel to toggle individual annotations #35

Open theosanderson opened 11 months ago

theosanderson commented 11 months ago
Checklist - [X] Create `src/components/AnnotationTogglePanel.js` ✓ https://github.com/theosanderson/gensplore/commit/5aeb01bf548d04e3c27c4c1ee723dade3fb6d342 - [X] Ran sandbox for `src/components/AnnotationTogglePanel.js`. ✓ https://github.com/theosanderson/gensplore/commit/9b0a7c89ed58c9211e460184de093f820b095536 - [X] Modify `src/App.js` ✓ https://github.com/theosanderson/gensplore/commit/f876222b3bfb5a04ee96babfa2f5cd9af4543d25 - [X] Ran sandbox for `src/App.js`. ✗ - [X] Modify `src/App.js` ✓ https://github.com/theosanderson/gensplore/commit/ec1ce71815eb012a1f622e8dadf476900858bc5e - [X] Ran sandbox for `src/App.js`. ✓ https://github.com/theosanderson/gensplore/commit/44ecd3f565d6d219efbf343f6f1dd76532886fc2 - [X] Ran sandbox for `src/App.js`. ✓ - [X] Create `src/components/GenomeDisplay.js` ✓ https://github.com/theosanderson/gensplore/commit/f79b976c51dbcdec5b83d2904ab7b168f1852a6e - [X] Ran sandbox for `src/components/GenomeDisplay.js`. ✓ https://github.com/theosanderson/gensplore/commit/60e8d7afa39791c2b0537b6b5b738adf4cff895d ![Flowchart](https://raw.githubusercontent.com/theosanderson/gensplore/sweep/assets/8ef438bd10762eec4a4efedce58d5bb73959710135b7a871d3ff9a35e3b2a0ca_35_flowchart.svg)
sweep-ai[bot] commented 11 months ago

Here's the PR! https://github.com/theosanderson/gensplore/pull/36.

Sweep Basic Tier: I'm using GPT-4. You have 5 GPT-4 tickets left for the month and 3 for the day. (tracking ID: 559b64db5b)

For more GPT-4 tickets, visit our payment portal. For a one week free trial, try Sweep Pro (unlimited GPT-4 tickets).

Actions (click)

Sandbox Execution ✓

Here are the sandbox execution logs prior to making any changes:

Sandbox logs for 12a9ff3
pre-commit install 1/6 ✓
pre-commit installed at .git/hooks/pre-commit
yarn install 2/6 ✓
yarn install v1.22.19
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > @testing-library/user-event@13.5.0" has unmet peer dependency "@testing-library/dom@>=7.21.4".
warning "react-scripts > eslint-config-react-app > eslint-plugin-flowtype@8.0.3" has unmet peer dependency "@babel/plugin-syntax-flow@^7.14.5".
warning "react-scripts > eslint-config-react-app > eslint-plugin-flowtype@8.0.3" has unmet peer dependency "@babel/plugin-transform-react-jsx@^7.14.9".
warning "react-scripts > react-dev-utils > fork-ts-checker-webpack-plugin@6.5.2" has unmet peer dependency "typescript@>= 2.7".
warning "react-scripts > eslint-config-react-app > @typescript-eslint/eslint-plugin > tsutils@3.21.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
[4/4] Building fresh packages...
Done in 37.67s.
npm i 3/6 ✓
added 300 packages, removed 82 packages, changed 56 packages, and audited 1548 packages in 19s
238 packages are looking for funding
  run `npm fund` for details
14 vulnerabilities (6 moderate, 6 high, 2 critical)
To address issues that do not require attention, run:
  npm audit fix
To address all issues (including breaking changes), run:
  npm audit fix --force
Run `npm audit` for details.
npm notice 
npm notice New major version of npm available! 9.6.7 -> 10.2.4
npm notice Changelog: 
npm notice Run `npm install -g npm@10.2.4` to update!
npm notice 
trunk init 4/6 ✓
⡿ Downloading Trunk 1.17.2...
⡿ Downloading Trunk 1.17.2...
⢿ Downloading Trunk 1.17.2...
⣻ Downloading Trunk 1.17.2...
⣽ Downloading Trunk 1.17.2...
⣾ Downloading Trunk 1.17.2...
⣷ Downloading Trunk 1.17.2...
⣯ Downloading Trunk 1.17.2...
⣟ Downloading Trunk 1.17.2...
⡿ Downloading Trunk 1.17.2...
⢿ Downloading Trunk 1.17.2...
⣻ Downloading Trunk 1.17.2...
⣽ Downloading Trunk 1.17.2...
⣾ Downloading Trunk 1.17.2...
⣷ Downloading Trunk 1.17.2...
⣯ Downloading Trunk 1.17.2...
⣟ Downloading Trunk 1.17.2...
⡿ Downloading Trunk 1.17.2...
✔ Downloading Trunk 1.17.2... done
⡿ Verifying Trunk sha256...
✔ Verifying Trunk sha256... done
⡿ Unpacking Trunk...
✔ Unpacking Trunk... done

✔ 10 linters were enabled (.trunk/trunk.yaml)
  checkov 3.1.9 (3 json, 2 yaml files)
  git-diff-check (29 files)
  markdownlint 0.37.0 (1 markdown file) (created .markdownlint.yaml)
  osv-scanner 1.4.3 (2 lockfile files)
  oxipng 9.0.0 (1 png file)
  prettier 3.1.0 (2 css, 1 html, 14 javascript, 2 json, 1 markdown, 2 yaml files)
  svgo 3.0.4 (1 svg file) (created svgo.config.js)
  trivy 0.47.0 (2 yaml files)
  trufflehog 3.63.2-rc0 (31 files)
  yamllint 1.33.0 (2 yaml files) (created .yamllint.yaml)
Next Steps
 1. Read documentation
    Our documentation can be found at https://docs.trunk.io
 2. Get help and give feedback
    Join the Trunk community at https://slack.trunk.io
trunk fmt src/App.js || exit 0 5/6 ✓
Checked 1 file
✔ No issues
trunk check --fix --print-failures src/App.js 6/6 ✓
Checked 1 file
✔ No issues

Sandbox passed on the latest main, so sandbox checks will be enabled for this issue.

Install Sweep Configs: Pull Request

Step 1: 🔎 Searching

I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.

Some code snippets I looked at (click to expand). If some file is missing from here, you can mention the path in the ticket description. https://github.com/theosanderson/gensplore/blob/12a9ff39f0ea198003d609096798ad95ca27f5bf/README.md#L1-L10 https://github.com/theosanderson/gensplore/blob/12a9ff39f0ea198003d609096798ad95ca27f5bf/package.json#L1-L55 https://github.com/theosanderson/gensplore/blob/12a9ff39f0ea198003d609096798ad95ca27f5bf/postcss.config.js#L1-L5 https://github.com/theosanderson/gensplore/blob/12a9ff39f0ea198003d609096798ad95ca27f5bf/tailwind.config.js#L1-L7

Step 2: ⌨️ Coding

trunk fmt src/components/AnnotationTogglePanel.js || exit 0 1/2 ✓
 ✔ Formatted src/components/AnnotationTogglePanel.js
Re-checking autofixed files...

Checked 1 file
✔ No issues
trunk check --fix --print-failures src/components/AnnotationTogglePanel.js 2/2 ✓
Checked 1 file
✔ No issues

trunk fmt src/App.js || exit 0 1/2 ✓
  FAILURES  
 prettier  src/App.js  .trunk/out/oJO6G.yaml
  NOTICES  
 A tool failed to run. You can open the details yaml file for more information.
Checked 0 files
✖ No issues, 1 failure
trunk check --fix --print-failures src/App.js 2/2 ❌ (`1`)
  FAILURES  
 prettier  src/App.js  .trunk/out/MlCBs.yaml
  NOTICES  
 A tool failed to run. You can open the details yaml file for more information.
Checked 1 file
✖ No issues, 1 failure
# .trunk/out/MlCBs.yaml
trunk_cli_version: 1.17.2
title: prettier exited with exit_code=2
report:
  - prettier exited with exit_code=2
  - linter:
      command: |
        /root/.cache/trunk/tools/prettier/3.1.0-a552fdee5ef3daae1274e7dca8183c14/node_modules/.bin/prettier -w src/App.js
      stdin_path: (none)
      run_from: /tmp/trunk-0/sFQXXY/SR2Ryp
      timeout: 10m
      rerun: (cd /tmp/trunk-0/sFQXXY/SR2Ryp; env -i PATH=/root/.cache/trunk/tools/prettier/3.1.0-a552fdee5ef3daae1274e7dca8183c14/node_modules/.bin:/root/.cache/trunk/tools/node/18.12.1-00ae74f39ac4de3ff3c7e3686016ebf3/bin:/root/.cache/trunk/tools/node/18.12.1-00ae74f39ac4de3ff3c7e3686016ebf3:/root/.nvm/versions/node/v18.17.0/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin NODE_PATH=/root/.cache/trunk/tools/prettier/3.1.0-a552fdee5ef3daae1274e7dca8183c14/node_modules HOME=/root /root/.cache/trunk/tools/prettier/3.1.0-a552fdee5ef3daae1274e7dca8183c14/node_modules/.bin/prettier -w src/App.js)
      affects_cache:
        - package.json
      direct_configs:
        []
      exit_status: exited
      exit_code: 2
      stdout: (none)
      stderr: |
        [error] src/App.js: SyntaxError: Unexpected token (472:11)
        [error]   470 |        472 |           
        [error]       |           ^
        [error]   473 |       >
        [error]   474 |         Customize appearance
        [error]   475 |       
    parser: |
      (none)

trunk fmt src/App.js || exit 0 1/2 ✓
 ✔ Formatted src/App.js
Re-checking autofixed files...

Checked 1 file
✔ No issues
trunk check --fix --print-failures src/App.js 2/2 ✓
Checked 1 file
✔ No issues

trunk fmt src/App.js || exit 0 1/2 ✓
Checked 1 file
✔ No issues
trunk check --fix --print-failures src/App.js 2/2 ✓
Checked 1 file
✔ No issues

trunk fmt src/components/GenomeDisplay.js || exit 0 1/2 ✓
 ✔ Formatted src/components/GenomeDisplay.js
Re-checking autofixed files...

Checked 1 file
✔ No issues
trunk check --fix --print-failures src/components/GenomeDisplay.js 2/2 ✓
Checked 1 file
✔ No issues


Step 3: 🔁 Code Review

I have finished reviewing the code for completeness. I did not find errors for sweep/annotation-toggle-panel.


🎉 Latest improvements to Sweep:


💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request. Join Our Discord