informalsystems / atomkraft

Advanced fuzzing via Model Based Testing for Cosmos blockchains
Apache License 2.0
77 stars 10 forks source link

can't run `atomkraft` without `.atomkraft` directory #204

Closed rnbguy closed 1 year ago

rnbguy commented 1 year ago

The project directory logic includes .atomkraft/config.toml file.

https://github.com/informalsystems/atomkraft/blob/e18c3ab78f04d7431180aab82495e390cd7dddb1/atomkraft/utils/project.py#L17-L27

This creates problems when someone tries to git-clone a project and execute atomkraft in it.

You are outside of Atomkraft project
...

I suggest checking only for a valid atomkraft.toml in a directory.

udit-gulati commented 1 year ago

Hi @rnbguy,

Cloning https://github.com/informalsystems/atomkraft-cosmos does include .atomkraft/ dir and atomkraft command does identify it as valid project.

If a project does not have these 3 toml config files, then giving user the prompt to populate these config files with default config might work. Or this can be done in atomkraft init . after doing cd <projectDir> just like git init . does.

rnbguy commented 1 year ago

hey @udit-gulati , cloning a fresh atomkraft-cosmos works fine at my end, but I only tried the main branch. can you share any details of your set up?

udit-gulati commented 1 year ago

This creates problems when someone tries to git-clone a project and execute atomkraft in it.

You are outside of Atomkraft project
...

I suggest checking only for a valid atomkraft.toml in a directory.

@rnbguy it works fine on my end too. I was just mentioning that git cloning atomkraft-cosmos does include .atomkarft/ directory so this issue does not occur.

rnbguy commented 1 year ago

ah yes, you're right - I misread your comment.

When I created atomkraft-cosmos I was aware of this, so I manually fixed it by creating an empty .atomkraft/config.toml.

Thanks for your suggestions. We wanted .atomkraft/config.toml to represent the local atomkraft project config and execution state. That's why we wanted to exclude it from git history. So prompting the user when it is not present is a good idea :+1: Thanks