Skip to content

Commit 1086365

Browse files
committed
Add Support TOML Project to projects list
This adds new project proposal to current projects list Closes #705
1 parent f287fab commit 1086365

File tree

1 file changed

+87
-0
lines changed

1 file changed

+87
-0
lines changed

_projects/standardised-file-format.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
collaborating_projects:
2+
- coala
3+
desc: "Provide support for writing configurations using
4+
a standardised file format(TOML)"
5+
difficulty: hard
6+
initiatives:
7+
- GSoC
8+
markdown: standardised-file-format.md
9+
mentors:
10+
- Nosferatul
11+
- RaiVaibhav
12+
- ksdme
13+
- Marcos Gómez
14+
name: "Support TOML for writing configurations"
15+
requirements:
16+
- "The applicant should have at least one patch merged to
17+
coala"
18+
- "The applicant should be familiar with Python."
19+
- "The applicant should be familiar with coala configuration system"
20+
tags:
21+
- Core
22+
- Configuration
23+
- TOML
24+
---
25+
26+
This project aims to support writing configuration files using a
27+
standardised file format like TOML.
28+
Currently coala has a INI style config. It has `LineParser` and `ConfParser`
29+
classes to parse the settings into sections. These sections are later executed
30+
by running the appropriate bear. coala also a `ConfWriter` class to write
31+
sections back into settings file like `.coafile`
32+
33+
This approach has certain limitations. Custom sub-level parsing in
34+
INI style config is tough and error prone. It makes `LineParser` and
35+
`ConfParser` more complex and bug prone and also would slow down the speed of
36+
development. A solution would be to use standardised file format like TOML.
37+
Using `toml.load` on the config file will return a dictionary. This makes
38+
custom sub-level parsing not only easy and accurate but also less error prone.
39+
Also more importantly completely removes the need for `LineParser`.
40+
41+
TOML provides flexibility, consistency, backwards compatibility and standard.
42+
It has widespread acceptance, documentation and robust parsers. TOML has been
43+
recommended as the configuration file for software packages to specify their
44+
build dependencies. Due to its popularity it offers a reduced learning curve
45+
compared to INI style config.
46+
47+
This project aims to provide Toml support for coala-quickstart as well. Also
48+
it will create a tool to convert coafile to TOML files and vice versa.
49+
TomlLintBear will be created as part of this project. Also a repository of
50+
good configuration files will be created to allow users to easily bootstrap
51+
their projects.
52+
53+
As a stretch goal, the project aims to standardise the present coafile syntax
54+
to provide more flexibility.
55+
56+
#### Milestones
57+
58+
##### PREPARATION/BONDING
59+
60+
- The applicant has created and merged a cEP for this project.
61+
- The applicant should be familiar with the codebase.
62+
- The applicant should know how to work with the community.
63+
- The mappings between `.coafile` to `TOML` must be finalised
64+
65+
##### CODING PHASE 1
66+
67+
- Create the mechanism to load TOML config files.
68+
- Create a class named `TomlConfParser` to load settings from TOML
69+
file into sections.
70+
- Begin work on `TomlConfWriter`.
71+
72+
##### CODING PHASE 2
73+
74+
- Complete `TomlConfWriter` to be able to write sections into
75+
TOML file.
76+
- Create a tool to convert coafile to TOML file and vice versa
77+
- Provide TOML support to coala-quickstart
78+
79+
##### CODING PHASE 3
80+
81+
- Create TomlLintBear
82+
- Create a repository of good configuration files for major languages
83+
- Create user facing documentation on how to write config files in TOML
84+
85+
Apart from these core milestones, the project shall also try to
86+
fix issues like comment support at https://github.com/uiri/toml.
87+
This will help improve the overall capacity/quality of this project.

0 commit comments

Comments
 (0)