revanced-api icon indicating copy to clipboard operation
revanced-api copied to clipboard

feat: initial CLI commit

Open alexandreteles opened this issue 1 year ago • 2 comments

image

alexandreteles avatar Nov 23 '23 21:11 alexandreteles

Codecov Report

Attention: 187 lines in your changes are missing coverage. Please review.

Comparison is base (71f81f7) 84.35% compared to head (4938fce) 71.51%.

Files Patch % Lines
api/github.py 15.62% 81 Missing :warning:
cli.py 50.00% 50 Missing :warning:
api/manager.py 25.00% 21 Missing :warning:
api/compat.py 50.00% 14 Missing :warning:
api/donations.py 46.15% 7 Missing :warning:
api/info.py 46.15% 7 Missing :warning:
api/socials.py 46.15% 7 Missing :warning:
Additional details and impacted files
@@             Coverage Diff             @@
##              dev     #127       +/-   ##
===========================================
- Coverage   84.35%   71.51%   -12.84%     
===========================================
  Files          35       37        +2     
  Lines         818     1106      +288     
===========================================
+ Hits          690      791      +101     
- Misses        128      315      +187     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Nov 23 '23 21:11 codecov[bot]

Imagine being stopped by code coverage. It couldn't be me.

Anyway, to use the CLI, you will need the following:

The obvious

Install all dependencies. Use poetry install, poetry update, or install from the requirements files.

The not so obvious

Export a GitHub token to your env: export GITHUB_TOKEN=my_amazing_token

Then just ./cli.py

Everything else should be exploratory. The CLI uses the docstrings to generate help, so rewriting is trivial if something isn't clear. I will write instrumentation around it so it can be used from actions, but the design decision about how that can be achieved adequately from calling repositories needs more consideration.

I think the @ReVanced/infrastructure team also lacks people with experience in writing Github actions, so @PalmDevs, I might need your help with this.

alexandreteles avatar Nov 23 '23 21:11 alexandreteles

Superseded by https://github.com/ReVanced/revanced-api/pull/169, thanks

oSumAtrIX avatar Jul 08 '24 12:07 oSumAtrIX