Blockchain-Technology-Lab / consensus-decentralization

Tool that analyzes blockchain decentralization on the consensus layer by looking at the block production distributions of various blockchain systems.
https://blockchain-technology-lab.github.io/consensus-decentralization
MIT License
25 stars 6 forks source link

Build the project locally #112

Closed MokhFn closed 11 months ago

MokhFn commented 1 year ago

When running the data collection script an error is raised :

  File "/consensus-decentralization/consensus_decentralization/collect_data.py", line 16, in <module>
    from consensus_decentralization.helper import ROOT_DIR, RAW_DATA_DIR
ModuleNotFoundError: No module named 'consensus_decentralization'

I guess it's because we need to build the project locally first, so that packages and their directories are locally known ? If so, don't we need a setup.py/setup.cfg configuration file ?

LadyChristina commented 1 year ago

From which directory did you run the script? Could you please try the following from the root directory and let me know if it works? python -m consensus_decentralization.collect_data

MokhFn commented 1 year ago

I ran it from the root dir, as per the docs :

python collect_data.py

Running your command works like a charm.

LadyChristina commented 1 year ago

Good point that we should update the documentation, I'll keep this issue open until then. But nice to hear that this worked for you