galaxy-iuc / standards

Documentation for standards and best practices from the Galaxy IUC
http://galaxy-iuc-standards.readthedocs.io/en/latest/
6 stars 16 forks source link

Tabs should be permitted, maybe even mandatory. #73

Open hexylena opened 1 year ago

hexylena commented 1 year ago

They're better for accessibility:

I've never understood IUC's demand for them (they're "best practice" but somehow also 100% mandatory), and I think we should change this. Clients can set tabs to any width they personally prefer, you can have 2 or 8 or 4, and folks that want them for accessibility reasons will finally have them.

(sorry to restart this old argument.)

peterjc commented 1 year ago

Does the IUC standards currently actually talk about tabs versus spaces? I had a search but couldn't find anything.

I note Python has the PEP8 coding standard and ecosystem of tools like code-formatter black which use spaces not tabs.

Which file formats do you have in mind here? XML and JSON? Everything? Everything except Python?

hexylena commented 1 year ago

It states Use 4 spaces for indentation under the best practice file. Which has sometimes been treated as a requirement for tool submissions rather than simply a "best practice".

I'd be already happier if this PR resolved with accepting tabs in addition to 4 spaces, as long as the author is consistent. That would be a relatively tiny change I think and results in the least amount of discussions, and improves accessibility marginally for the affected users who are contributing / working on their own tools.

peterjc commented 1 year ago

Ah, I searched for terms like tabs, not indentation.

I would have no objection to recommending tabs for indentation in the Galaxy tool XML files.

I have embraced black for auto formatting my Python code, and would happily do the same for XML.

peterjc commented 1 year ago

Oh, and your compromise of tabs or 4-spaces in XML as long as consistent is good too.

hexylena commented 1 year ago

I have embraced black for auto formatting my Python code, and would happily do the same for XML.

Likewise, it's made things a lot easier.

Ok, between the thumbs up and your comments, I'll make a PR proposing the change then!