Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Review #1 #13

Open
Danc2050 opened this issue May 25, 2020 · 2 comments
Open

Code Review #1 #13

Danc2050 opened this issue May 25, 2020 · 2 comments

Comments

@Danc2050
Copy link
Owner

Danc2050 commented May 25, 2020

Summary

Overall, it looks like a decent start. Some pieces are starting to form as it looks like you all have divided up some of the features to work on. Connecting them and organizing your code structure so you can properly test them will be helpful steps. I apologize in advance that this is so long, but I also apologize if I missed anything (I moved from my local machine editing files, to using GitHub issues).

Specific File Code Reviews:

README

  • The README should be updated. I don't encourage updating the README with every single detail, since a lot of things can change and you are wasting time + work, but I think you guys know enough at the present moment to add how to run the basic program (e.g., python3 __main__.py -S [script_name]) and also to talk about what the project is about. You may also decide to include the help menu for your __main__.py as well. If one person updates the README, all 6 other people on the team (plus us sponsors) will know how to run the program.
  • It would be nice to have myself listed (Teal will let you know if he wants to be listed in the README or not). Ex:
# Sponsors
[Daniel Connelly](https://www.linkedin.com/in/dconnelly2/)
  • Should be very detailed at the end of this project.

debugLogFile

  • This file's class/functions are never created/called anywhere.
  • There are no comments describing anything.
  • It may be a feature you are adding later, but I think there is some confusion on how the config files will work as I don't actually see a config file in any part of this project. There should be a config file for various things (e.g., whitelist or blacklist, cloud program options, etc.) and it should be in your project repo (perhaps like config_files/ and cloud/config_file?) by default. In other words, there shouldn't be a function that writes the config file each time, as it should exist in perpetuity. I don't know how well your current config library works, but you may check out configparser to update .ini files if it is easier for you. I will try and verify all the config files that need to exist when you guys develop your requirements doc further.

UserScript

executeUserScriptTests

filterLists

read_config

read_config_test

General Issues/Comments/Suggestions

Feel free to take the feedback with a grain of salt and ask questions.

  • Although you have not developed any code for this yet, you should also have a directory for the Cloud piece of your software (e.g., Cloud).
  • To reiterate, you all should read the Python style guide (PEP8) since you are writing Python code. Especially read the documentation strings (AKA doc strings) section and go through all the files and fix these errors (this was the most repetitive style error).
  • Doc strings are not given to every function, especially in the test files and where there are init functions. You should also have a doc string at the top of every file to indicate its main purpose.
  • check_output is a fine function, but you may actually find that Popen will be more useful for your cases. You can get stderr, a return code, etc. more easily this way. See a good intro to this function here. You can actually check the STDERR specifically for potential bugs and avoid (or use less) the checking of standard output.
  • I am thinking that maybe a whitelist or a blacklist should actually come from the cloud instance or some online endpoint, since developers may want to change this anytime, but may not want to release a new version just to update a white and/or black list. Something to consider moving forward.
  • I believe Antonio said that the name of the project will be AutoBugTracker. The repository should be renamed to the same name.

Let me know if I can be of any help in clarifying any of the above or answering any more questions.

@tdulcet
Copy link

tdulcet commented May 26, 2020

I second everything @Danc2050 said! Since there is not a lot for me to test yet, I am going to focus on some higher-level issues:

README

  • You need to provide very detailed instructions on your README for how to setup and run this on every supported platform (Linux, Windows and macOS). See here or here for an example.
  • Feel free to list my name as a sponsor:
# Sponsors
[Daniel Connelly](https://www.linkedin.com/in/dconnelly2/)
[Teal Dulcet](https://www.tealdulcet.com/)

Testing

  • You have some tests in the repository. You need setup CI to automatically run those on every commit and PR. I would recommend Travis CI, which is free for open source projects. Here is a very simple .travis.yml file you can use to get you started, which will test against the three latest versions of Python:
language: python
python:
  - "3.6"
  - "3.7"
  - "3.8"
install:
  - # Install dependencies, e.g. pip install -r requirements.txt
script:
  - python3 __main__.py --help
  - # Run tests, e.g. pytest
  • If you have a favorite Python linter, such as Pylint, you should run that too.
  • There should be test programs written in multiple languages besides Python, both compiled and interpreted. C, C++, Java, Rust and JS (Node.js) would be a good start. Here are example Hello World programs to get you started.

General

  • This repository should be transferred to a new GitHub Organization specific to this project, so that is it easy for us to access when you are done. That way you can create a separate repository for the Cloud portion.
  • The repository needs a License. The MIT License is a good choice, since it allows everyone to use the project. GitHub has a tool to add it. Also, you need to add something like this to the top of every file, in addition to the doc string as Daniel explained:
 * Copyright (c) 2020 PSU CS Automatic Bug Tracker Capstone Team
 * This code is available under the "MIT License".
 * Please see the file LICENSE in this distribution for license terms.

Please let me know if you have any questions.

@Danc2050
Copy link
Owner Author

All looks good in @tdulcet 's comments as well. The only thing I would reemphasize is that during our voice talks (which Teal could not make) I did not require a testing framework to be chosen. That being said, it could potentially help, so that one is definitely up to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants