Move doc files inside repo
parent
2411e3c736
commit
9c5cde23a2
|
@ -0,0 +1,25 @@
|
|||
Satellites
|
||||
==========
|
||||
|
||||
The ``satellites`` method of the :doc:`SatNOGS DB API </db/api>` returns all Satellites currently used for gathering Transmitters data.
|
||||
|
||||
Endpoint
|
||||
--------
|
||||
|
||||
``https://db.satnogs.org/api/satellites/``
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Show a specific satellite using its Norad Cat ID:
|
||||
|
||||
Request::
|
||||
|
||||
/api/satellites/25544/?format=json
|
||||
|
||||
Response::
|
||||
|
||||
{
|
||||
norad_cat_id": 25544,
|
||||
"name": "ISS (ZARYA)"
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
Transmitters
|
||||
============
|
||||
|
||||
The ``transmitters`` method of the :doc:`SatNOGS DB API </db/api>` returns all Transmitters data.
|
||||
|
||||
Endpoint
|
||||
--------
|
||||
|
||||
``https://db.satnogs.org/api/transmitters/``
|
||||
|
||||
Parameters
|
||||
----------
|
||||
|
||||
``mode``
|
||||
*Optional* **string** - Returns only transmitters with matching mode
|
||||
|
||||
``satellite__norad_cat_id``
|
||||
*Optional* **string** - Returns only transmitters for the matching satellite
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Show transmitters of a satellite with a specific Norad Cat ID:
|
||||
|
||||
Request::
|
||||
|
||||
/api/transmitters/?format=json&satellite__norad_cat_id=23439
|
||||
|
||||
Response::
|
||||
|
||||
{
|
||||
"uuid": "ybJ86zjXzQxDReZ5skY56B",
|
||||
"description": "Mode H TLM",
|
||||
"alive": true,
|
||||
"uplink_low": null,
|
||||
"uplink_high": null,
|
||||
"downlink_low": 29352000,
|
||||
"downlink_high": null,
|
||||
"mode": "",
|
||||
"invert": true,
|
||||
"baud": 0,
|
||||
"norad_cat_id": 23439
|
||||
}
|
||||
|
||||
Show transmitters of a specific mode:
|
||||
|
||||
Request::
|
||||
|
||||
/api/transmitters/?format=json&mode=AFSK
|
||||
|
||||
Response::
|
||||
|
||||
{
|
||||
"uuid": "4Yp5mRhdNPURqAuVn77NMk",
|
||||
"description": "Mode V/V AFSK Packet",
|
||||
"alive": true,
|
||||
"uplink_low": 145990000,
|
||||
"uplink_high": null,
|
||||
"downlink_low": 145800000,
|
||||
"downlink_high": null,
|
||||
"mode": "AFSK",
|
||||
"invert": true,
|
||||
"baud": 0,
|
||||
"norad_cat_id": 25544
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
API
|
||||
===
|
||||
|
||||
SatNOGS-DB API is a REST API that provides detailed information about Satellites and Transmitters. This document explains how to use the API to retrieve data for your application.
|
||||
|
||||
Using API Data
|
||||
--------------
|
||||
|
||||
API access is public to anyone. No form of authentication is required. All API data are freely distributed under the `CC BY-SA <https://creativecommons.org/licenses/by-sa/4.0/>`_ license.
|
||||
|
||||
API Methods
|
||||
-----------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
api-satellites
|
||||
api-transmitters
|
|
@ -0,0 +1,96 @@
|
|||
Contribute
|
||||
==========
|
||||
|
||||
Thank you for your interest in contributing to 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 <http://github.com/satnogs/satnogs-db>`_.
|
||||
|
||||
Git workflow
|
||||
------------
|
||||
When you want to start contributing, you should :doc:`follow the installation instructions </db/installation>`, then...
|
||||
|
||||
#. (Optional) Set your cloned fork to track upstream changes (changes to the main repository), then fetch and merge changes from the upstream branch::
|
||||
|
||||
$ git remote add --track master upstream git://github.com/satnogs/satnogs-db
|
||||
$ git fetch upstream
|
||||
$ git merge upstream/master
|
||||
|
||||
#. Set up a branch for a particular set of changes and switch to it::
|
||||
|
||||
$ git branch my_branch
|
||||
$ git checkout my_branch
|
||||
|
||||
#. Commit changes to the code!
|
||||
|
||||
#. Code!
|
||||
|
||||
#. Lint the code and fix any errors::
|
||||
|
||||
$ flake8 db
|
||||
|
||||
#. Commit changes to the code!
|
||||
|
||||
#. When you're done, figure out how many commits you've made::
|
||||
|
||||
$ git log
|
||||
|
||||
#. Squash all those commits into a single commit that has a `good git commit message <http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html>`_. (Example assumes you made 4 commits)::
|
||||
|
||||
$ git rebase -i HEAD~4
|
||||
|
||||
#. Use the interactive editor that pops up to pick/squash your commits::
|
||||
|
||||
pick 01d1239 [fix bug 893291] Make it go to 11
|
||||
squash 32as32p added the library and made some minor changes
|
||||
squash 30ame3z build the template
|
||||
squash 91pcla8 ugh fix a semicolon bug in that last commit
|
||||
|
||||
#. Push your changes to your fork::
|
||||
|
||||
$ git push origin my_branch
|
||||
|
||||
#. Issue a pull request on GitHub
|
||||
|
||||
#. Wait to hear from one of the core developers
|
||||
|
||||
If you're asked to change your commit message, you can amend the message and force commit::
|
||||
|
||||
$ git commit --amend
|
||||
$ git push -f origin my_branch
|
||||
|
||||
If you're asked to make changes on your code you can stage them and amend the commit::
|
||||
|
||||
$ git add my_changed_files
|
||||
$ git commit --amend
|
||||
$ git push -f origin my_branch
|
||||
|
||||
If you need more Git expertise, a good resource is the `Git book <http://git-scm.com/book>`_.
|
||||
|
||||
Templates
|
||||
---------
|
||||
|
||||
satnogs-db uses `Django's template engine <https://docs.djangoproject.com/en/dev/topics/templates/>`_ templates.
|
||||
|
||||
Coding Style
|
||||
------------
|
||||
|
||||
#. Four space indentation (no tabs), two whitespace on html documents.
|
||||
#. Use single quotes for strings. Double quotes used only for html attributes.
|
||||
#. Keep lines shorter than 100 characters when possible (especially at python code)
|
||||
|
||||
Follow the `PEP8 <http://www.python.org/dev/peps/pep-0008/>`_ and `PEP257 <http://www.python.org/dev/peps/pep-0257/#multi-line-docstrings>`_ Style Guides.
|
||||
|
||||
Most important things:
|
||||
|
||||
#. Separate top-level function and class definitions with two blank lines.
|
||||
#. Method definitions inside a class are separated by a single blank line.
|
||||
#. Use whitespace between comma seperated values.
|
||||
#. Use white space between assignments and expressions (except parameter values).
|
||||
#. Don't use whitespace before or after parentheses, brackets or braces.
|
||||
#. Classes should use CamelCase naming.
|
||||
#. Functions should use lowercase naming.
|
||||
|
||||
|
||||
What to work on
|
||||
---------------
|
||||
You can check `opened issues <https://github.com/satnogs/satnogs-db/issues>`_. We regurarly open issues for tracking new features. You pick one and start coding.
|
|
@ -0,0 +1,10 @@
|
|||
satnogs-db
|
||||
==========
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
installation
|
||||
contribute
|
||||
api
|
|
@ -0,0 +1,39 @@
|
|||
Docker Installation
|
||||
===================
|
||||
|
||||
#. **Requirements**
|
||||
|
||||
You will need `docker <https://docs.docker.com/installation/#installation>`_ and `docker-compose <https://docs.docker.com/compose/install/>`_.
|
||||
|
||||
|
||||
#. **Build the containers**
|
||||
|
||||
Clone source code from the `repository <https://github.com/satnogs/satnogs-db>`_::
|
||||
|
||||
$ git clone https://github.com/satnogs/satnogs-db.git
|
||||
$ cd satnogs-db
|
||||
|
||||
Set your environmental variables::
|
||||
|
||||
$ cp .env-dist .env
|
||||
|
||||
Start database containers::
|
||||
|
||||
$ docker-compose up -d db
|
||||
|
||||
Build satnogs-db container::
|
||||
|
||||
$ docker-compose build web
|
||||
|
||||
Run the initialize script to populate the database with scheme and demo data::
|
||||
|
||||
$ docker-compose run web python manage.py initialize
|
||||
|
||||
|
||||
#. **Run it!**
|
||||
|
||||
Run satnogs-db::
|
||||
|
||||
$ docker-compose up
|
||||
|
||||
Your satnogs-db development instance is available in localhost:8000. Go hack!
|
|
@ -0,0 +1,44 @@
|
|||
VirtualEnv Installation
|
||||
=======================
|
||||
|
||||
Requirements: You will need python, python-virtualenvwrapper, pip and git
|
||||
|
||||
|
||||
#. **Build the environment**
|
||||
|
||||
Clone source code from the `repository <https://github.com/satnogs/satnogs-db>`_::
|
||||
|
||||
$ git clone https://github.com/satnogs/satnogs-db.git
|
||||
|
||||
Set up the virtual environment. On first run you should create it and link it to your project path.::
|
||||
|
||||
$ cd satnogs-db
|
||||
$ mkvirtualenv satnogs-db -a .
|
||||
|
||||
Set your environmental variables::
|
||||
|
||||
$ cp .env-dist .env
|
||||
|
||||
Activate your python virtual environment::
|
||||
|
||||
$ workon satnogs-db
|
||||
|
||||
Install local development requirements::
|
||||
|
||||
$ (satnogs-db)$ pip install -r requirements/dev.txt
|
||||
|
||||
|
||||
#. **Database**
|
||||
|
||||
Create, setup and populate the database with demo data::
|
||||
|
||||
(satnogs-db)$ ./manage.py initialize
|
||||
|
||||
|
||||
#. **Run it!**
|
||||
|
||||
Just run it::
|
||||
|
||||
(satnogs-db)$ ./manage.py runserver
|
||||
|
||||
Your satnogs-db development instance is available in localhost:8000. Go hack!
|
|
@ -0,0 +1,10 @@
|
|||
Installation
|
||||
============
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
installation-docker
|
||||
installation-virtualenv
|
||||
|
Loading…
Reference in New Issue