library.properties

The library creation tutorial is hard to find. It lacks a reference to the library specification, with the description of the various (mandatory) library management files. In that file the options are missing for e.g. keywords.txt, and/or a reference to the old (1.0) library specifications.

The library manager or category values deserve an update, at least category=Other is not recognized.

DrDiettrich:
at least category=Other is not recognized.

What do you mean by that?

I agree a link to the library specification should be added to the library tutorial.

From the specification:

The list of highlighted keywords must be placed in a file called keywords.txt. The format of this file is the same as the 1.0 libraries

Wow, that's some great documentation! I know that programmers don't like writing documentation but considering Arduino's focus beginner friendliness and learning they really should make more of an effort. I could spend a bunch of time looking at other libraries, rooting through the source code, and doing trial and error but it's so much easier for the person who wrote the IDE code and understands it better than anyone else to just spend a little time documenting it, they are getting paid to do this stuff after all.

I like documentation driven development, where you write the documentation first and then write the code to match that documentation. It seems backwards at first but it really makes you look at the API from the user's perspective. Many times I've started writing documentation after finishing some code only to realize that there was a much more user friendly way to do it and had to go back and rewrite the code.

I agree with "documentation driven development", even if it stands in contrast to the banana-soft policies of the big players, including many open-source projects :-]

I often found it easier to write user friendly code, instead of explaining unobvious requirements, procedures or workarounds in the documentation, after the code had been written. Even excellent coders are poor documentation writers, methink :frowning:

The library.properties is a required file for the current (IDE 1.5) library format, with required specifications. One of these requirements is the library category. The linked documentation states "Other" as a valid category value, but it results in a warning during compilation, and 'Uncategorized' is assumed instead. Omitting the category results in a different warning, but the same result. That's not nice, when a library really doesn't fit into any other listed category :frowning:

I think actually excellent coders are especially poor documentation writers because to them it's obvious, why document what's already clearly shown in the source code? I have an advantage there because usually I have to write documentation just to explain to my future self how to use the code I wrote. I've learned that the hard way multiple times after coming back to modify some code I wrote years ago and having no clue what was going on.

Which IDE version are you having the problem with the Other category?

Same warning for IDE 1.6.7 and 1.6.10.

And right, writing self-documenting code is the best job guarantee - unless you are self-employed :wink:

Is the warning happening for a specific library? If so which one. I can't reproduce the issue but I'd like to look into it. I did a bunch of work getting all the 3rd party libraries updated with valid category values after Arduino IDE 1.6.6 was released with that warning. It seems like a minor thing but was causing a lot of confusion for beginners.

The warning occurs with my new library. I've changed the property to Data Processing, that's accepted.

Try this:

  • Sketch > Include Library > Manage Libraries...
  • Type "sleepydog" in the "Filter your search..." box
  • Click on Adafruit SleepyDogLibrary
  • Click "Install"
  • Click "Close"
  • Sketch > Compile/Verify

Do you get the invalid category warning for the SleepyDog library? Its category value is Other. I don't get any warning for that or any of the other libraries with the same category value I have installed.

The SleepyDog library installs and compiles without warnings.
My own lib now also is accepted without warnings, with category=Other. Funny.

In the SleepyDog library.properties the "paragraph" duplicates "sentence". AFAIK that's wrong, because sentence is prepended to paragraph?

DrDiettrich:
The SleepyDog library installs and compiles without warnings.
My own lib now also is accepted without warnings, with category=Other. Funny.

Glad to hear it's working now! Maybe there was a hidden character or something triggering the warning.

DrDiettrich:
In the SleepyDog library.properties the "paragraph" duplicates "sentence". AFAIK that's wrong, because sentence is prepended to paragraph?

Yeah, that just makes the same thing repeated twice in a row in the Library Manager entry. If you do a search for "adafruit" in Library Manager most of their libraries are that way. They have about 200 libraries, ouch! Well there's good entry level project for someone wanting to make some contributions to open source Arduino projects on GitHub. It always makes me smile when I go to download something on GitHub and recognize my avatar in the contributors but don't even remember having made that pull request.