Comments (14)
agree but we'll have to find a better name for sections_only, maybe like allow-incpmplete-sections or so
from coala-quickstart.
We don't need to differentiate then right? we will just send all the bears to user and ask for their settings. did I understood the question correctly?
Ah, okay... So the interaction is very similar to CLI interaction in quickstart.
The intermediate coafile
only has sections with bear names and then we can ask for non-optional settings in the web interface, right?
from coala-quickstart.
Then ask users for the optional/non-optional settings of those bears, and send this to the backend saving it in a settings.json file.
How are we going to ask users for the non-optional setting values 😅
from coala-quickstart.
from coala-quickstart.
coala.io already has the name of settings of all the bears (coala.io/languages), we can hence attach input fields to setting name,
For eg, suppose the backend returns,
relevant_bears = ['SpaceConsistencyBear']
Then we show the user a form and take inputs,
allow_trailing_whitespace ____
indent_size enforce_newline_at_EOF ___
tab_width use_spaces ____
And then send these to the backend.
from coala-quickstart.
I see, approach seems good to me
one last doubt though, "What happens after the input values are taken in and ".coafile" is generated?" (do we run coala in non-interactive
mode or do we display interactive results on the web like we do in the CLI)
from coala-quickstart.
Also not sure if it's relevant but here's what I had in my GSoC proposal
Integrating coala-quickstart into coala’s try online feature:
This would allow users to use the capabilities of coala-quickstart without having to install it. User inputs the github repository URL and a “placeholder_coafile” gets automatically committed to the repository. While performing analysis locally, coala will detect the placeholder_coafile and prompt the user for the non-optional settings and finally generate the complete coafile. The placeholder_coafile is generated after bypassing all the prompts for non-optional setting values in the characters and filling them with a sentinel value. Another add-on to this feature can be to commit the shell script to install the bear-dependencies as well.
from coala-quickstart.
Let me know what do you think of this, Presently acquire_settings
function is passed as a parameter to coalib's fill_setting()
by coala-quickstart to get input for settings (https://github.com/coala/coala-quickstart/blob/master/coala_quickstart/generation/Settings.py#L109). Then acquire_settings()
calls the require_settings()
function which keeps prompting on the coala-quickstart's console for bear settings input.
We can make a function in ConsoleInteraction acquire_settings_from_json()
, on the lines of acquire_settings
, which will take such json as parameter, and instead of calling require_settings
, acquire_settings_from_json()
will take the values from this json
bears_settings = {
"PEP8Bear" : {},
"PyLintBear" : {}.
"SpaceConsistencyBear" : { "use_spaces" : true }
}
from coala-quickstart.
Sorry why do you want to ask the user for settings and pass them to coala-incremental? This doesn't make sense at all; quockstart is a tool to auto generate settings and not to run coala, where's the point in giving it settings? And it already has a ci mode.
from coala-quickstart.
Revamped Approach after Discussion
from coala-quickstart.
The plan is to add two options in quickstart, a --dir
option to receive current project directory as command line argument, and --sections_only
option to generate a coafile with useable as well as unusable bears in CI mode. Presently it only generates one with useable bears in --ci mode, ie, bears not having non optional settings)
from coala-quickstart.
Sounds nice :) Just couple of doubts :P
--sections_only option to generate a coafile with useable as well as unusable bears in CI mode
How would you differentiate between a usable and unusable bears in the coafile? I think we'll have to come up with a syntactical representation in "intermediate-coafile" to mark and identify the sections with unusable bears while parsing.
Also, what is the difference between "coala online" and "webservices" :P (to me it seems like one is "frontend" and other one is "backend")
from coala-quickstart.
Right now it removes the unusable bears with a function that specifically does this tasks. Unusable bears here implies those bears which will ask for setting, so that is why they are unuseable in normal CI mode. But with --ci
+ --allow-incomplete-sections
mode (sections-only), no bears will be removed, that is why we will get unusable + usable bears. We don't need to differentiate then right? we will just send all the bears to user and ask for their settings. did I understood the question correctly?
Actually webServices has an endpoint editor
, which we use to trigger coala, this endpoint + the frontend required for this endpoint is 'coala Online'.
from coala-quickstart.
from coala-quickstart.
Related Issues (20)
- Node initialiser includes dead code HOT 1
- initialize_project_data includes dead code HOT 1
- function green_mode unnecessary delayed import of check_filename_prefix_postfix HOT 10
- UtilitiesTest.py test method test_search_for_orig contains dead code HOT 2
- test_bear_test_fun_2 contains unused test_unified_results HOT 2
- TestUtilities.py bear_test_module unused variable mocked HOT 1
- .travis.yml: Cache ntlk data
- add .coafile.green to .gitignore HOT 1
- facilitate deletion of coafile.green on running pytest HOT 3
- Investigate: how to use the nextgen-core for more reliable and easier processing of bears HOT 1
- coala-ci failing because of old version of a bear
- green_modeTest.py: Unused import AllKindsOfSettingsDependentBear HOT 3
- Unable to install for Python 3.7 HOT 2
- Use coala & coala-bears master HOT 2
- Spelling mistake taraget HOT 5
- Spelling mistake caputred HOT 1
- Add .editorconfig to moban sync HOT 1
- green_mode.py: Incomplete branch coverage on python3.6 HOT 2
- Make coala-quickstart generate configuration files in TOML
- spelling of command is incorrect in Installation section. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coala-quickstart.