Developer Guide

Thank you for your interest in developing SatNOGS! There are always bugs to file; bugs to fix in code; improvements to be made to the documentation; and more.

The below instructions are for software developers who want to work on satnogs-db code.

Workflow

When you want to start developing for SatNOGS, you should follow the installation instructions, then…

  1. Read CONTRIBUTING.md file carefully.

  2. Fork the upstream repository in GitLab.

  3. Code!

  4. Test the changes and fix any errors by running tox.

  5. Commit changes to the code!

  6. When you’re done, push your changes to your fork.

  7. Issue a merge request on Gitlab.

  8. Wait to hear from one of the core developers.

If you’re asked to change your commit message or code, you can amend or rebase and then force push.

If you need more Git expertise, a good resource is the Git book.

Templates

satnogs-db uses Django’s template engine templates.

Frontend development

Third-party static assets are not included in this repository. The frontend dependencies are managed with npm. Development tasks like the copying of assets, code linting and tests are managed with gulp.

To download third-party static assets:

  1. Install dependencies with npm:

    $ npm install
    
  2. Test and copy the newly downlodaded static assets:

    $ ./node_modules/.bin/gulp
    

To add new or remove existing third-party static assets:

  1. Install a new dependency:

    $ npm install <package>
    
  2. Uninstall an existing dependency:

    $ npm uninstall <package>
    
  3. Copy the newly downlodaded static assets:

    $ ./node_modules/.bin/gulp assets
    

Dependency Management

Dependencies of the package are defined in the setup.cfg file. Only top-level dependencies shall be defined, with the exception of overrides needed to workaround dependency incompatibilities. Each dependency is defined using the appropriate compatible version specifier. The compatible version specifiers shall be such that any newer compatible version can be installed, taking into account the versioning schema followed by each dependency. The dev extra contains packages and tools required for development, testing and packaging. When a dependency has been added, removed or updated in setup.cfg, the requirement files must be manually regenerated. To regenerate these files run:

$ ./contrib/refresh-requirements-docker.sh

The script will update the following files:

  • requirements.txt - List of resolved dependencies for the package

  • requirements-dev.txt - List of resolved dependencies for the development tools

  • constraints.txt - List of resolved dependency constraints for both the package and development tools

Changes on the above files shall be committed together with the changes in setup.cfg.

Documentation

The documentation can be generated locally with sphinx:

$ cd docs
$ virtualenv -p python3 env
$ source env/bin/activate
$ pip install sphinx_rtd_theme
$ make html SPHINXOPTS="-W"

Coding Style

Follow the PEP8 and PEP257 Style Guides.

What to work on

You can check open issues. We regurarly open issues for tracking new features. You pick one and start coding.