linkding icon indicating copy to clipboard operation
linkding copied to clipboard

Documentation: update contributing instructions

Open MaybeThisIsRu opened this issue 3 years ago • 3 comments

It could include, for starters:

  • Environment dependencies
    • What version of Python?
    • Which dependencies manager (virtualenv/Poetry/pipenv etc.)?
  • How to get a development environment setup

I'd also recommend adding a .tool-versions file (used by asdf) if possible to lock in Node.js and Python versions.

GitHub blog on this subject: https://github.blog/2012-09-17-contributing-guidelines/

MaybeThisIsRu avatar May 11 '21 17:05 MaybeThisIsRu

Definitely room to improve this. Note that there is a section in the bottom of the README on how to get a development setup, it's just not very explicit about versions (just references python3, pip3 and node).

Do you think that the lack of the other info would hinder you from contributing?

sissbruecker avatar May 13 '21 17:05 sissbruecker

I think that's an excellent start - I completely missed that section somehow. Thanks for bringing my attention to it.

Largely, I think it does the trick. A few suggestions:

  • We could do with specifying at least the major versions of the tooling. This is already in place for Python (v3), maybe we could do with adding a minor version too. The Dockerfile uses a Python 3.9 image, so I'm guessing that's what it will be.
    • I could PR a .tool-versions file for asdf users if you're happy to accept it. It's just a file that specifies the exact versions of the languages used. When an asdf user cds into the dir, those versions are transparently set without any extra hassle. Here's one example from Plausible Analytics. If not - that's totally fine. I could keep one locally. :)
  • The Django docs linked are for 3.0, whereas this project is at the moment on 2.2. We could update that URL.
  • I also wanted to understand if there are any tests in place that I would need to be aware of, and if so, how to run them etc.

MaybeThisIsRu avatar May 14 '21 05:05 MaybeThisIsRu

Sure, sounds good 👍. I might check asdf out as well, looks neat. Apart from adding asdf support It would be great if you could address your other suggestions. My thoughts:

  • asdf usage should be optional, can add a hint that it's supported in the Requirements section
  • Required Node version can be documented as 14, the latest LTS
  • Required Python version can be documented as 3.9
  • Django docs link can point to https://docs.djangoproject.com/en/2.2/

For the Django app there is a suite of tests under bookmarks/tests. You can run them with:

python manage.py tests

or through an IDE that supports them such as PyCharm. It's not complete but I have been more diligent with that recently and am trying to catch up with existing features. My current goal is to get some more confidence before upgrading to Django 3. There is no test suite for the two Javascript components ATM.

Also would be cool if you can document the test command in the same go.

sissbruecker avatar May 14 '21 06:05 sissbruecker