juliancwirko / nft-art-maker

NFT Art Maker - generates images and metadata files, packs them into IPFS CAR files, and uploads them using nft.storage. All from provided PNG layers.
MIT License
98 stars 36 forks source link

Add basic test and add process log and upload function #17

Closed dohomi closed 2 years ago

dohomi commented 2 years ago

Hi @juliancwirko

I took the initiative to create a basic test environment and added a simple logger to see the process of the startCreating function.

This would close #14

dohomi commented 2 years ago

@juliancwirko I created a basic nft.storage upload function.

This would close #12

juliancwirko commented 2 years ago

Hey, nice, thanks. I'll review it soon.

Btw, as for tests, I would keep all the files test related in the test directory, and I also think they should be done on mocks somehow, not actual calls of the functions

dohomi commented 2 years ago

@juliancwirko feel free to cherry pick any functionality. I also think its better to move the example files into the tests folder as well - i just didn't want to move to many things around without double check.

About the mocks, I think the only function which is questionable is the actual upload function - the other test is quite simple and runs the example nft and checks if the generation works - that can't be mocked.

juliancwirko commented 2 years ago

Cool, I'll check it in the evening CEST. Maybe we could leave the tests on actual operations. It is always better than nothing :) I would keep the 'example' separated to avoid confusing users who are not so techy. Maybe tests could use the .nftartmakerrc from example dir?

dohomi commented 2 years ago

currently the tests use the .nftarmakerrc from the root (I wasn't sure how to update the script to run from example folder)

juliancwirko commented 2 years ago

ahhh, you're right. I'll check how we could improve that

juliancwirko commented 2 years ago

Hey, @dohomi, please check the new pull request (https://github.com/juliancwirko/nft-art-maker/pull/18) with your changes and a couple of my changes. Let me know if it is ok, then we could merge it, and then I will bump the version's changelog and publish it. It works very well. Thanks a lot.

dohomi commented 2 years ago

it looks good ready to merge