aerospaceresearch / DirectDemod

direct demodulation of radio-signals
MIT License
38 stars 19 forks source link

CLI Improvement | Better installation issue #34 #36

Closed ramantehlan closed 5 years ago

ramantehlan commented 5 years ago

Synopsis

These changes will make DirectDemod a terminal command and also provide an install script (#34 ). Which will have the following benefits:

This new terminal command won't affect the old method of execution in any sense, it will still be valid.

Changes

install-script

Use

After the changes, users can install the project using install file, and then will be able to execute the same program using DirectDemod command, with the same functioning as the main.py. Below is an example of the execution.

command

@hornig and @7andahalf please review.

7andahalf commented 5 years ago

Hey! Thanks for the PR. This was long overdue. Thanks for doing it. I really appreciate the presentation. Great work!

I have a couple of questions:

  1. Have you tested the software? Lets assume DirectDemod source is in ??/dd, sample file is in ??/sample and pwd is ??/pwd. If you run a command to decode a sample file, can you please confirm what all files change in these directories? Ideally resultant files should be in sample and a log file should be in dd, and nothing should change in pwd. I feel that log would instead be in pwd. Please check and fix that if that is happening.
  2. Since this is aimed to install, it would be great if it could handle the package requirements too (like scipy, numpy etc.) Current requirements.txt or setup.py are not up to date. Is it possible to update them with all our required packages and make sure that process is also done in this install process.
  3. I would appreciate it if you could create pull requests to Vinay-dev. I will close this PR for now.

Thanks! Let me know if you have any questions.

PS. Also, if possible, move art.txt into install, as it is used only once and that will reduce number of root files.

ramantehlan commented 5 years ago

Happy to know that you appreciate the efforts, I love this project and instantly felt a need for this feature.

It will be really helpful if you can you explain briefly about point one, I understand what you are trying to figure out, but it's not that clear to me.

7andahalf commented 5 years ago

The software aims to keep a detailed log of events, to help in debugging and statistics. Ideally I feel that this log should be stored at the root directory of the software. So that the user can just send that one file to us and we can find out the error, or run statistics like performance etc. If you take a look here I am initializing the logging engine with a file with relative address. So I am speculating that this log file would be created in the present working directory (where DirectDemod command was invoked) instead of intended root software directory. So I just wanted you to test if this is happening and if its possible to fix it. If its too much work, just ignore that for now, we will take care of it later.

ramantehlan commented 5 years ago

I just tested this case, and you are right, the log file and output are being created in the folder where the command is being used. we can solve it by keeping the location static of log files and outputs, so if we can have a folder $HOME/DirectDemod, it can be used to store all the user data, like dot files, logs or outputs etc. It actually makes more sense, and which is why most of the projects save their logs files like this.

7andahalf commented 5 years ago

Don't worry about the log files for now. It might actually be a feature and not a bug xD. We will see that later. Did you say that outputs are also being created in same folder even when sample is elsewhere? Please confirm that this is not happening. If it is please open an issue as this should not happen. All outputs from a sample go into the folder of the sample by default.

ramantehlan commented 5 years ago

I have rechecked it, the output is coming where the sample is, no matter where you execute it. so, that is good. I think we can do the same with the log, like saving it where the sample is or we can let it be for now. what do you suggest?

7andahalf commented 5 years ago

let it be for now.

ramantehlan commented 5 years ago

Hey @7andahalf, Can you please open this pull request, since now I have changed the base from master -> Vinay_dev. Also, please review it, since I have all the required changes.

7andahalf commented 5 years ago

Closes #34