Skip to content

Commit

Permalink
Merge pull request #658 from 12rambau/map
Browse files Browse the repository at this point in the history
refactor: improve the quality of frontend files
  • Loading branch information
12rambau authored Dec 12, 2022
2 parents eaf3e83 + 1b162f2 commit a16f9cf
Show file tree
Hide file tree
Showing 65 changed files with 1,968 additions and 1,918 deletions.
2 changes: 1 addition & 1 deletion .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "2" # required to adjust maintainability checks
version: "2" # required to adjust maintainability checks

checks:
argument-count:
Expand Down
4 changes: 2 additions & 2 deletions .cz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ commitizen:
update_changelog_on_bump: true
version: 2.13.0
version_files:
- setup.py:version
- sepal_ui/__init__.py:__version__
- setup.py:version
- sepal_ui/__init__.py:__version__
24 changes: 13 additions & 11 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

title: ""
labels: ""
assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
9 changes: 3 additions & 6 deletions .github/ISSUE_TEMPLATE/custom.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
---
name: Custom issue template
about: Describe this issue template's purpose here.
title: ''
labels: ''
assignees: ''

title: ""
labels: ""
assignees: ""
---


7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

title: ""
labels: ""
assignees: ""
---

**Is your feature request related to a problem? Please describe.**
Expand Down
9 changes: 4 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE/pr_template.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Pull request template
about: Create a pull request
title: ''
labels: ''
assignees: ''

title: ""
labels: ""
assignees: ""
---

## reference the related issue
Expand All @@ -21,4 +20,4 @@ Describe the changes you propose

## comments

any other comments we should pay attention to
any other comments we should pay attention to
10 changes: 5 additions & 5 deletions .github/workflows/kaban.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
runs-on: ubuntu-latest
name: Assign to the kaban Project
steps:
- name: Assign NEW issues and NEW pull requests to kaban project
uses: srggrs/assign-one-project-github-action@1.2.1
if: github.event.action == 'opened'
with:
project: 'https://github.com/12rambau/sepal_ui/projects/3'
- name: Assign NEW issues and NEW pull requests to kaban project
uses: srggrs/assign-one-project-github-action@1.2.1
if: github.event.action == 'opened'
with:
project: "https://github.com/12rambau/sepal_ui/projects/3"
26 changes: 13 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine build
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine build
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
41 changes: 20 additions & 21 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Build

on:
on:
- push
- workflow_dispatch

env:
#EE_DECRYPT_KEY: ${{ secrets.EE_DECRYPT_KEY }}
PLANET_API_CREDENTIALS: ${{ secrets.PLANET_API_CREDENTIALS }}
Expand All @@ -12,7 +12,6 @@ env:
#SKIP: isort

jobs:

lint:
runs-on: ubuntu-latest
steps:
Expand All @@ -21,7 +20,7 @@ jobs:
with:
python-version: "3.8"
- uses: pre-commit/action@v3.0.0

build:
runs-on: ubuntu-latest
strategy:
Expand All @@ -31,34 +30,34 @@ jobs:

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install GDAL
run: |
python -m pip install --upgrade pip
pip install --find-links=https://girder.github.io/large_image_wheels --no-cache GDAL
- name: Install localetileserver
run: |
pip install localtileserver
- name: Install dependencies
run: pip install .[test]

- name: Set up GEE credentials
run: ee_token

- name: build the documentation
if: matrix.python-version == '3.8'
run: |
pip install .[doc]
sphinx-apidoc --force --module-first --templatedir=docs/source/_templates/apidoc -o docs/source/modules ./sepal_ui
sphinx-build -b html docs/source docs/build/html --keep-going -w warnings.txt
- name: Check that there are no unexpected Sphinx warnings
if: matrix.python-version == '3.8'
shell: python
Expand All @@ -70,27 +69,27 @@ jobs:
expected = ["transition", "CHANGELOG.md", "modules.rst", "target"]
unexpected = [ii for ii in text.split("\n") if all(i not in ii for i in expected)]
assert len(unexpected) == 0
- name: test with pytest
run: pytest --color=yes --cov --cov-report=xml --instafail tests

- name: assess dead fixtures
if: matrix.python-version == '3.8'
run: pytest --dead-fixtures
- name: build the template panel application

- name: build the template panel application
if: matrix.python-version == '3.8'
run: pytest --nbmake sepal_ui/templates/panel_app/ui.ipynb
- name: build the template map application

- name: build the template map application
if: matrix.python-version == '3.8'
run: pytest --nbmake sepal_ui/templates/map_app/ui.ipynb

- name: coverage
run: coverage xml

- name: codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
19 changes: 13 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,33 @@
repos:
- repo: 'https://github.com/psf/black'
- repo: "https://github.com/psf/black"
rev: 22.3.0
hooks:
- id: black
stages: [commit]
- repo: 'https://github.com/pycqa/flake8'
- repo: "https://github.com/pycqa/flake8"
rev: 3.9.2
hooks:
- id: flake8
stages: [commit]
- repo: 'https://github.com/commitizen-tools/commitizen'
- repo: "https://github.com/commitizen-tools/commitizen"
rev: v2.18.0
hooks:
- id: commitizen
stages: [commit-msg]
- repo: 'https://github.com/pycqa/isort'
- repo: "https://github.com/pycqa/isort"
rev: 5.10.1
hooks:
- id: isort
stages: [commit]
- repo: 'https://github.com/kynan/nbstripout'
- repo: "https://github.com/kynan/nbstripout"
rev: 0.5.0
hooks:
- id: nbstripout
stages: [commit]
stages: [commit]

- repo: "https://github.com/pre-commit/mirrors-prettier"
rev: v2.7.1
hooks:
- id: prettier
stages: [commit]
exclude: "sepal_ui/scripts/encrypted_key.json"
13 changes: 6 additions & 7 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,16 @@ build:

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py
configuration: docs/source/conf.py

# Optionally build your docs in additional formats such as PDF
formats:
- epub
- epub

# Optionally set the version of Python and requirements required to build your docs
python:
install:
- method: pip
path: .
extra_requirements:
- doc

- method: pip
path: .
extra_requirements:
- doc
Loading

0 comments on commit a16f9cf

Please # to comment.