-
Notifications
You must be signed in to change notification settings - Fork 0
Commandline arguments #2
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
base: master
Are you sure you want to change the base?
Conversation
…t so the enduser is able to add BuildSystems through the configuration file
… deserialize to yaml. Also add the CrawlerConfig to the GitHubCrawler
…e, build-system and stars through the commandline
| */ | ||
| private BuildSystem getFileContentsAtRootDir(Repository repository) { | ||
| BuildSystem detectedBuildSystem = BuildSystem.UNKNOWN; | ||
| BuildSystem detectedBuildSystem = BuildSystem.UNKOWN; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in Unkown should be UNKNOWN
| public static final String FILEPATH = null;//PropertyFileReader.getInstance().getProperty(EConfig.FILEPATH); | ||
| public static final String JSONFILENAME = null;//"repositories.json"; | ||
| public static final String CUSTOMFILE = null;//PropertyFileReader.getInstance().getProperty(EConfig.CUSTOMFILE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These properties are never set by the configservice.
Read the comment on the ConfigurationService file.
The FileHelper.java file then needs to be updated to get the configs from the CrawlerConfig and not the old Config file.
Gismo150
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please read the comments within the commited files.
| * | ||
| * @return Returns the @see CrawlerConfig. | ||
| */ | ||
| public CrawlerConfig getConfig() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need another function that we can call to simply get the already parsed Configuration.
This service should only parse the yaml file once and provide the CrawlerConfig with a getter.
It is now possible to use the crawler through the command-line e.g.
crawler.jar crawl --language="CPP" --build-system="CUSTOM" --stars=1
If you execute the jar file without any parameters it will load the configuration file.
It now supports now sub-commands but the only sub-command that is added is "crawl" with three parameters.
Also the configuration file was moved to the %USERDATA%/crawler/config.yaml for easier management (de-/serialization). Along the configuration changes some other models have been recreated like BuildSystem.java for the Yaml serializer. With the changes it is now possible to define custom Build-Systems inside the configuration.
WARNING:
There are some configuration items that needs to be changed. Not everything was changed with this pull request. There are some util classes that still use the empty static config file like FileHelper.getRepositoriesJsonFilePath. The static config file must be fully replaced by the CrawlerConfig.
Also I am not sure if my changes are working 100% like before this needs to be tested and reviewed!