Skip to content

Commit

Permalink
Merge pull request #108 from lsst-ts/release/4.0.0
Browse files Browse the repository at this point in the history
Release/4.0.0
  • Loading branch information
sebastian-aranda authored Apr 1, 2021
2 parents d52d12c + 470a3f9 commit 2405c03
Show file tree
Hide file tree
Showing 90 changed files with 2,945 additions and 1,121 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[flake8]
max-line-length = 120
ignore = D100
ignore = D100, W503
16 changes: 16 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: check-yaml
exclude: conda/meta.yaml

- repo: https://github.com/psf/black
rev: 19.10b0
hooks:
- id: black

- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
hooks:
- id: flake8
28 changes: 28 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ pipeline {
registryCredential = "dockerhub-inriachile"
dockerImageName = "lsstts/love-manager:"
dockerImage = ""
user_ci = credentials('lsst-io')
LTD_USERNAME="${user_ci_USR}"
LTD_PASSWORD="${user_ci_PSW}"
}

stages {
Expand Down Expand Up @@ -72,6 +75,31 @@ pipeline {
}
}

stage("Deploy documentation") {
agent {
docker {
alwaysPull true
image 'lsstts/develop-env:develop'
args "-u root --entrypoint=''"
}
}
when {
anyOf {
changeset "docs/*"
}
}
steps {
script {
sh "pwd"
sh """
source /home/saluser/.setup_dev.sh
pip install ltd-conveyor
ltd upload --product love-manager --git-ref ${GIT_BRANCH} --dir ./docs
"""
}
}
}

stage("Trigger develop deployment") {
when {
branch "develop"
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,18 @@ Once inside the container you will be in the `/usr/src/love/manager` folder, whe
cd ../docsrc
./create_docs.sh
```

### Linting & Formatting
In order to maintaing code linting and formatting we use `pre-commit` that runs **Flake8** (https://flake8.pycqa.org/) and **Black** (https://github.com/psf/black) using Git Hooks. To enable this you have to:

1. Install `pre-commit` in your local development environment:
```
pip install pre-commit
```

2. Set up the git hook scripts running:
```
pre-commit install
```

3. Start developing! Linter and Formatter will be executed on every commit you make
Binary file modified docs/doctrees/apidoc/api.doctree
Binary file not shown.
Binary file modified docs/doctrees/apidoc/api.tests.doctree
Binary file not shown.
Binary file modified docs/doctrees/apidoc/manager.doctree
Binary file not shown.
Binary file modified docs/doctrees/apidoc/subscription.doctree
Binary file not shown.
Binary file modified docs/doctrees/apidoc/ui_framework.doctree
Binary file not shown.
Binary file modified docs/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/doctrees/modules/how_it_works.doctree
Binary file not shown.
Binary file modified docs/doctrees/modules/how_to_use_it.doctree
Binary file not shown.
22 changes: 19 additions & 3 deletions docs/html/_sources/apidoc/api.tests.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ api.tests.test\_commander module
:undoc-members:
:show-inheritance:

api.tests.test\_lovecsc module
------------------------------

.. automodule:: api.tests.test_lovecsc
:members:
:undoc-members:
:show-inheritance:

api.tests.test\_schema\_validation module
-----------------------------------------

Expand All @@ -28,10 +36,18 @@ api.tests.tests\_auth\_api module
:undoc-members:
:show-inheritance:

api.tests.tests\_config module
------------------------------
api.tests.tests\_configfile module
----------------------------------

.. automodule:: api.tests.tests_configfile
:members:
:undoc-members:
:show-inheritance:

api.tests.tests\_emergencycontact module
----------------------------------------

.. automodule:: api.tests.tests_config
.. automodule:: api.tests.tests_emergencycontact
:members:
:undoc-members:
:show-inheritance:
Expand Down
2 changes: 1 addition & 1 deletion docs/html/_sources/modules/how_it_works.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Code organization

Currently the application is divided in the following modules and files:

* :code:`api`: This module contains the :code:`API` Django app, which defines the models and API endpoints for authentication (:code:`Auth API`) and Commander (:code:`Commander API`) APIs. For more details please refer to the :ref:`ApiDoc` section
* :code:`api`: This module contains the :code:`API` Django app, which defines the models and API endpoints for authentication (:code:`Auth API`), Commander (:code:`Commander API`), ConfigFile (:code:`ConfigFile API`) and EmergencyContact (:code:`EmergencyContact API`) APIs. For more details please refer to the :ref:`ApiDoc` section
* :code:`ui_framework`: This module contains the :code:`UI Framework` Django app, which defines the models and API endpoints for the UI Framework views (:code:`UI Framework API`) API. For more details please refer to the :ref:`ApiDoc` section
* :code:`subscription`: This module contains the Django app that defines the consumers that handle the websocket communication.
* :code:`manager`: This module contains basic Django configuration files, such as urls and channels routing, etc.
Expand Down
4 changes: 2 additions & 2 deletions docs/html/_sources/modules/how_to_use_it.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Returns token, user data and permissions
Validate token
--------------
Validates a given authorization token, passed through HTTP Headers.
Returns a confirmation of validity, user data, permissions, server_time and (optionally) the LOVE configuraiton file.
Returns a confirmation of validity, user data, permissions, server_time and (optionally) the LOVE configuration file.
If the :code:`no_config` flag is added to the end of the URL, then the LOVE config files is not read and the corresponding value is returned as :code:`null`

- Url: :code:`<IP>/manager/api/validate-token/` or :code:`<IP>/manager/api/validate-token/no_config/`
Expand Down Expand Up @@ -119,7 +119,7 @@ If the :code:`no_config` flag is added to the end of the URL, then the LOVE conf
Swap token
--------------
Validates a given authorization token, passed through HTTP Headers.
Returns a confirmation of validity, user data, permissions, server_time and (optionally) the LOVE configuraiton file.
Returns a confirmation of validity, user data, permissions, server_time and (optionally) the LOVE configuration file.
If the :code:`no_config` flag is added to the end of the URL, then the LOVE config files is not read and the corresponding value is returned as :code:`null`

- Url: :code:`<IP>/manager/api/swap-token/` or :code:`<IP>/manager/api/swap-token/no_config/`
Expand Down
Loading

0 comments on commit 2405c03

Please sign in to comment.