Skip to content

Commit

Permalink
Merge pull request #205 from 12rambau/master
Browse files Browse the repository at this point in the history
v2.0.0
  • Loading branch information
12rambau authored May 26, 2021
2 parents 4f2c259 + 928c6f3 commit 94722fc
Show file tree
Hide file tree
Showing 92 changed files with 48,740 additions and 2,722 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build

on:
- push
- pull_request
- workflow_dispatch

env:
EE_DECRYPT_KEY: ${{ secrets.EE_DECRYPT_KEY }}

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 1
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install -r requirements.txt
- name: test with unittest
run: coverage run -m unittest discover -s tests
- name: coverage
run: coverage report -m
- name: cadecov
run: bash <(curl -s https://codecov.io/bash)
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

40 changes: 0 additions & 40 deletions CONTRIBUTE.md

This file was deleted.

84 changes: 84 additions & 0 deletions CONTRIBUTE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
Install the project
-------------------

run the following command to start developing on the develop branch

.. code-block:: console
$ git clone https://github.com/12rambau/sepal_ui.git
$ git checkout --track origin/develop
Develop within the project
--------------------------

Since 2020-08-14, this repository follows these [development guidelines](https://nvie.com/posts/a-successful-git-branching-model/). The git flow is thus the following:

.. figure:: https://nvie.com/img/[email protected]
:alt: the Git branching model
:width: 70%

The git branching model

Please consider using the :code:`--no-ff` option when merging to keep the repository consistent with PR.

Install your local modification instead of the Pypi lib
--------------------------------------------------------

To validate you modification go to the root folder of the package and run:

.. code-block:: console
$ python3 setup.py sdist
then install the sepal_ui from your local folder:

.. code-block:: console
$ pip install -e [your_sepal_ui_folder]
.. warning::

Remember that if you create modifications that alter the lib standard functioning It will break the applications that use it on the SEPAL app dashboard.

What can I push and where
-------------------------

Our branching system embed some rules to avoid crash of the production environment. If you want to contribute to this framework, here are some basic rules that we try our best to follow :

- the modification you offer is solving a critical bug in prod : **PR in hotfix**
- the modification you propose solve the following issues : test, documentation, typo, quality, refactoring, translation **PR in master**
- the modification you propose is a new feature : open an issue to discuss with the maintainers and then **PR to develop**

the maintainers will try their best to use PR for new features, to help the community follow the development, for other modification they will simply push to the appropriate branch
Contribute
==========

Create a new release
--------------------

.. danger::

for maintainers only

In the files change the version number in the following files:

- :code:`septup.py`: in the setup and the download URL
- :code:`sepal_ui.__init__.py`
- :code:`docs/source/conf.py`

Then push the current master branch to the release branch. You can now create a new tag with your new version number. use the same convention as the one found in :code:`setup.py`.

.. warning::

The target branch of the new release is :code:`release` not :code:`master`.

Now publish the new version of the lib on Pypi :

.. code-block:: console
$ cd sepal_ui
$ python setup.py sdist
$ twine upload dist/sepal_ui-<version number>.tar.gz
Once it's done you need to trigger the rebuild of SEPAL. modify the following `file <https://github.com/openforis/sepal/blob/master/modules/sandbox/docker/script/init_sepal_ui.sh>` with the latest version number and the rebuild will start automatically.
10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Sepal_ui
:target: https://badge.fury.io/py/sepal-ui
:alt: PyPI version

.. image:: https://travis-ci.com/12rambau/sepal_ui.svg?branch=master
:target: https://travis-ci.com/12rambau/sepal_ui
:alt: Build Status
.. image:: https://github.com/12rambau/sepal_ui/actions/workflows/unit.yml/badge.svg
:target: https://github.com/12rambau/sepal_ui/actions/workflows/unit.yml
:alt: build

.. image:: https://api.codeclimate.com/v1/badges/861f09002bb9d75b6ea5/maintainability
:target: https://codeclimate.com/github/12rambau/sepal_ui/maintainability
Expand All @@ -27,8 +27,8 @@ Sepal_ui
:target: https://sepal-ui.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

:code:`sepal_ui` is a lib designed to create elegant python based dashboard in the SEPAL environment. It is designed on top of the amazing `ipyvuetify <https://ipyvuetify.readthedocs.io/en/latest/introduction.html>`_ librairie and will help developper to easily create interface for their workflows.
By using this librairy, you'll ensure a robust and unifyed interface for your scripts and a easy and complete integration into the SEPAL dashboard of application.
:code:`sepal_ui` is a lib designed to create elegant python based dashboard in the SEPAL environment. It is designed on top of the amazing `ipyvuetify <https://ipyvuetify.readthedocs.io/en/latest/introduction.html>`_ library and will help developer to easily create interface for their workflows.
By using this libraries, you'll ensure a robust and unified interface for your scripts and a easy and complete integration into the SEPAL dashboard of application.

The full documentation is available here : `<https://sepal-ui.readthedocs.io/en/latest/>`_

Expand Down
File renamed without changes
25 changes: 25 additions & 0 deletions docs/source/_extentions/line_break.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-

"""
ReST directive for creating line break in your documentation when needed.
The directive does note require any argument.
Example::
.. line-break::
"""
from docutils import nodes
from docutils.parsers.rst import Directive, directives

class LineBreak(Directive):
has_content = False
required_arguments = 0
optional_arguments = 0
final_argument_whitespace = False
option_spec = {}
html = "<br/>"

def run(self):
return [nodes.raw('', self.html, format='html')]

def setup(builder):
directives.register_directive('line-break', LineBreak)

7 changes: 7 additions & 0 deletions docs/source/_filters/names.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from enchant.tokenize import Filter

class Names(Filter):
"""If a word start with a Capital letter ignore it"""

def _skip(self, word):
return word[0].isupper()
18 changes: 18 additions & 0 deletions docs/source/_spelling/en_US.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
ui
tooltip
pdf
ecozones
geospatial
ipynb
modularity
rst
sepalize
sepalization
pythonic
pathlib
sw
md
txt
csv
dataset
submodule
13 changes: 13 additions & 0 deletions docs/source/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
:root {

/*****************************************************************************
* Color
*
* Colors are defined in rgb string way, "red, green, blue"
**/
--pts-color-sepal: 24, 102, 145;

--pst-color-h1: var(--pts-color-sepal);
--pst-color-h2: var(--pts-color-sepal);
--pst-color-active-navigation: var(--pts-color-sepal);
}
7 changes: 7 additions & 0 deletions docs/source/_static/css/icon.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
i.fa-github:hover {
color: #333;
}

i.fa-python:hover {
color: #306998;
}
38 changes: 31 additions & 7 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import os
import sys
from datetime import datetime
from pathlib import Path
sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('../..'))

Expand All @@ -25,7 +26,7 @@
author = 'Pierrick Rambaud'

# The full version, including alpha/beta/rc tags
release = '1.1.5'
release = '2.0.0'


# -- General configuration ---------------------------------------------------
Expand All @@ -36,7 +37,9 @@
extensions = [
'sphinx.ext.napoleon',
'notfound.extension',
'_extentions.video'
'sphinxcontrib.spelling',
'_extentions.video',
'_extentions.line_break'
]

# Add any paths that contain templates here, relative to this directory.
Expand All @@ -45,7 +48,7 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['*/.ipynb_checkpoints']
exclude_patterns = ['**.ipynb_checkpoints/']

# -- Load the images from the master sepal-doc -------------------------------
from urllib.request import urlretrieve
Expand All @@ -65,10 +68,19 @@
html_favicon = '../img/dwn/favicon.ico'
html_last_updated_fmt = ''
html_theme_options = {
#"external_links": [],
"github_url": "https://github.com/12rambau/sepal_ui",
"icon_links": [
{
"name": "GitHub",
"url": "https://github.com/12rambau/sepal_ui",
"icon": "fab fa-github"
},
{
"name": "Pypi",
"url": "https://pypi.org/project/sepal-ui/",
"icon": "fab fa-python",
}
],
"use_edit_page_button": True,
#"twitter_url": "https://twitter.com/pandas_dev"
}
html_context = {
"github_user": "12rambau",
Expand All @@ -81,4 +93,16 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
#html_static_path = ['_static']
html_static_path = ['_static']

# These paths are either relative to html_static_path
# or fully qualified paths (eg. https://...)
html_css_files = ['css/custom.css', 'css/icon.css']

# -- Options for spelling output -------------------------------------------------
spelling_lang='en_US'
spelling_show_suggestions=True
spelling_filters = ['_filters.names.Names']
spelling_word_list_filename=[str(Path(__file__).parent.joinpath('_spelling', 'en_US.txt'))]
spelling_verbose=False
spelling_exclude_patterns=['modules/*']
4 changes: 2 additions & 2 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
sepal-ui
========

Sepal_ui is a lib designed to create elegant dashboard in the Sepal environment. It is designed on top of the amazing ipyvuetify and will help developper to easily create interfaces for their workflows.
By using this librairy, you'll ensure a robust and unifyed interface for your scripts and a easy and complete integration into the sepal dashboard of application.
Sepal_ui is a lib designed to create elegant dashboard in the Sepal environment. It is designed on top of the amazing ipyvuetify and will help developer to easily create interfaces for their workflows.
By using this library, you'll ensure a robust and unified interface for your scripts and a easy and complete integration into the sepal dashboard of application.

We are happy to receive feedback and we welcome any kind of contribution.

Expand Down
Loading

0 comments on commit 94722fc

Please sign in to comment.