Metro420yt / yuji-crx

https://yuji.app/crx/install
0 stars 0 forks source link

This is not an issue but rather a way to contact you. #3

Closed T3M1N4L closed 1 month ago

T3M1N4L commented 2 months ago

I have seen your comfytheme repository and the classupdate stuff. I have my own theme repo (which is a fork of comfy @ https://github.com/t3m1n4l/amoled-comfy/) I want to create a workflow that would automatically update the classes using the python script, and I alredy created one which I think would work. I came here to ask you if you are using any workflows to automate your ClassUpdate, and for you to see if you could check my classupdate automation to see if it works.

I'm kind of a newbie as this is my first time working with workflows.

Metro420yt commented 2 months ago

im not using a workflow, just an npm script (good idea though)

just looking at it, my ClassUpdate is modified for continuous integration, so im not sure if this line will work as for the rest of it, looks fine, but i cant really comment since i use EndBug/add-and-commit to push

also, you can run workflows locally with nektos/act, but i was having issues with getting python setup (should be fine on github runners though)

T3M1N4L commented 2 months ago

Do you automate the NPM script? or Is it even possible to edit the npm script? I'm pretty sure it's possible, I'll look into it when I have free time

T3M1N4L commented 2 months ago

I tried using your version of classupdate, and this is what I got

@T3M1N4L ➜ /workspaces/AMOLED-comfy (main) $ npm run class

> AMOLED-comfy@2.4.2 class
> cd ./ClassUpdate && python ./replace.py LOCAL -y

==== ClassUpdate by Saltssaumure ====

Traceback (most recent call last):
  File "/workspaces/AMOLED-comfy/ClassUpdate/./replace.py", line 15, in <module>
    use_local_diff, diff_location, css_filenames = get_params()
                                                   ^^^^^^^^^^^^
  File "/workspaces/AMOLED-comfy/ClassUpdate/lib/input.py", line 54, in get_params
    config = get_config("config.ini")
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspaces/AMOLED-comfy/ClassUpdate/lib/input.py", line 41, in get_config
    config_user = raw_config[profile]
                  ~~~~~~~~~~^^^^^^^^^
  File "/usr/local/python/3.12.1/lib/python3.12/configparser.py", line 941, in __getitem__
    raise KeyError(key)
KeyError: 'LOCAL'

Any Idea how to fix it?

Metro420yt commented 2 months ago

the config names are capital sensitive (im pretty sure), you passed "LOCAL" and your config.ini is lowercase

T3M1N4L commented 2 months ago

Yeah lol, it seems to have been fixed. A slight overlook by me 😅 lol. image For some reason I still keep on getting pycahce files even though my gitignore looks like this

prepros.config
/.vscode/
sass.txt
.prettierignore
CHECKUP.txt
node_modules
dist
.parcel-cache
package-lock.json
*.pyc
__pycache__/
ClassUpdate/__pycache__/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
#  Usually these files are written by a python script from a template
#  before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

prepros.config
/.vscode/
sass.txt
.prettierignore
CHECKUP.txt
node_modules
dist
.parcel-cache
package-lock.json
*.pyc

any idea why? I checked on stackoverflow, but from what I see no one else has this issue. What did you do to make pycache not generate?

Metro420yt commented 2 months ago

pycache will always generate when running python, but it wont get pushed if in .gitignore this answer further explains

T3M1N4L commented 2 months ago

OH! thanks for telling me that! I didn't know that lol

Also looks like I got it to work, the classupdate with github workflows! image

All I had to change was convert what I had to what you had in npm script for class updates!

      - name: execute py script # run replace.py
        run: |
           cd ./ClassUpdate && python ./replace.py DEFAULT -y

You should add this workflow thing to your fork of classupdate and hope it gets accepted! I'm pretty sure this is the first time automating classupdate lol