1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 18:34:48 +00:00
Files
dotdrop/CONTRIBUTING.md
2019-03-28 16:04:01 +01:00

2.3 KiB

Thanks for helping out!

Feature requests, bug reports and PRs are always welcome!

This file provides a few pointers on how to contribute to dotdrop and where to find information. For any question, feel free to open an issue.

For PR adding new features, I'd be very thankful if you could add either a unittest testing the added feature or a bash script test, thanks!

Code base

Dotdrop's code base is located in the dotdrop directory.

Here's an overview of the different files and their role:

  • action.py: represent the actions and transformations
  • comparator.py: the class handling the comparison for compare
  • config.py: the config file (config.yaml) parser
  • dotdrop.py: the entry point and where the different cli commands are executed
  • dotfile.py: represent a dotfile
  • installer.py: the class handling the installation of dotfile for install
  • jhelpers.py: list of methods available in templates with jinja2
  • linktypes.py: enum for the three types of linking (none, symlink, children)
  • logger.py: the custom logger
  • options.py: the class embedding all the different options across dotdrop
  • templategen.py: the jinja2 templating class
  • updater.py: the class handling the update of dotfiles for update
  • utils.py: some useful methods

Testing

Dotdrop is tested with the use of the tests.sh script.

testing with unittest

All unittests are available in tests directory and use python unittest.

The file helpers.py provides different helper methods for the tests.

testing with bash scripts

The bash scripts are available in tests-ng directory. These test entire workflows by simulating the use of dotdrop from end to end for different use-cases (usually described in their filename).

Each script starts with the same boiler plate code that you can paste at the start of your new test (see the head of the file down to # this is the test).

Documentation

Most of dotdrop documentation is hosted in its wiki