Skip to content

Commit d608a89

Browse files
authored
Merge pull request #168 from InsightLab/developer
Developer
2 parents d78be11 + 49bd300 commit d608a89

File tree

18 files changed

+84
-69
lines changed

18 files changed

+84
-69
lines changed

.code-style.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ We following the [Numpy](https://numpydoc.readthedocs.io/en/latest/format.html)
2020

2121
---
2222

23+
## flake8
24+
25+
Flake8 is a python linter that helps to keep the code up to PEP standards.
26+
To lint the code, run: `make lint`
27+
2328
## Pre-Commit
2429

2530
Next we'll explain the steps to use the pre-commit hooks.

.documentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ and finish!
8282
To generate the .html files, just access the docs folder, just run the
8383
following command:
8484

85-
`make html`
85+
`make doc`
8686

8787
#### 2.4. Hospedando docs in [Readthedocs](https://readthedocs.org/)
8888

.github/workflows/code_coverage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ jobs:
1717
python-version: 3.7
1818
- name: Install dependencies
1919
run: |
20-
python -m pip install --upgrade "pip<20"
21-
pip install -r requirements-dev.txt
20+
python -m pip install --upgrade pip
21+
pip install pytest coverage geopandas .
2222
- name: Coverage
2323
run: |
2424
coverage run -m pytest

.github/workflows/lint_and_test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ jobs:
1313
python-version: 3.7
1414
- name: Install dependencies
1515
run: |
16-
python -m pip install --upgrade "pip<20"
17-
pip install -r requirements-dev.txt
16+
python -m pip install --upgrade pip
17+
pip install flake8 pep8-naming .
1818
- name: Lint
1919
working-directory: ${{ github.workspace }}
2020
run: |
@@ -30,9 +30,9 @@ jobs:
3030
python-version: 3.7
3131
- name: Install dependencies
3232
run: |
33-
python -m pip install --upgrade "pip<20"
34-
pip install -r requirements-dev.txt
33+
python -m pip install --upgrade pip
34+
pip install pytest geopandas .
3535
- name: Test
3636
working-directory: ${{ github.workspace }}
3737
run: |
38-
pytest
38+
pytest --verbose

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ jobs:
1717
python-version: 3.7
1818
- name: Install dependencies
1919
run: |
20-
python -m pip install --upgrade "pip<20"
21-
pip install -r requirements-dev.txt
20+
python -m pip install --upgrade pip
21+
pip install flake8 pep8-naming pytest geopandas .
2222
- name: Lint and Test
2323
run: |
2424
flake8

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v2.5.0
3+
rev: v3.4.0
44
hooks:
55
- id: double-quote-string-fixer
66
- id: trailing-whitespace
@@ -16,14 +16,14 @@ repos:
1616
- id: autoflake
1717
args: ['--in-place', '--remove-all-unused-imports', '--ignore-init-module-imports']
1818
- repo: https://github.com/asottile/seed-isort-config
19-
rev: v1.9.3
19+
rev: v2.2.0
2020
hooks:
2121
- id: seed-isort-config
2222
- repo: https://github.com/pre-commit/mirrors-isort
23-
rev: v4.3.21
23+
rev: v5.7.0
2424
hooks:
2525
- id: isort
2626
- repo: https://gitlab.com/pycqa/flake8
27-
rev: 3.7.9
27+
rev: 3.8.4
2828
hooks:
2929
- id: flake8

Makefile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
help:
2+
@echo "available commands"
3+
@echo " - dev : install dev environment"
4+
@echo " - clean : clean temporary folders and files"
5+
@echo " - test : runs all unit tests"
6+
@echo " - lint : checks code style"
7+
@echo " - doc : creates documentation in html"
8+
9+
dev:
10+
pip install -r requirements-dev.txt
11+
pre-commit install
12+
13+
clean:
14+
rm -rf `find . -type d -name .pytest_cache`
15+
rm -rf `find . -type d -name __pycache__`
16+
rm -rf `find . -type d -name .ipynb_checkpoints`
17+
rm -rf docs/_build
18+
rm -f .coverage
19+
20+
test: clean
21+
coverage run -m pytest
22+
coverage report
23+
24+
lint: clean
25+
flake8
26+
27+
doc: clean
28+
make -C docs html

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ Requirements: Anaconda Python distribution installed and accessible
208208
- `git pull origin developer`
209209

210210
5. Install pymove in developer mode
211-
- `pip install -r requirements-dev.txt`
211+
- `make dev`
212212

213213
### For windows users
214214

pymove/preprocessing/filters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
)
1818

1919
if TYPE_CHECKING:
20-
from pymove.core.pandas import PandasMoveDataFrame
2120
from pymove.core.dask import DaskMoveDataFrame
21+
from pymove.core.pandas import PandasMoveDataFrame
2222

2323

2424
def get_bbox_by_radius(

pymove/preprocessing/segmentation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
from pymove.utils.log import progress_bar, timer_decorator
1919

2020
if TYPE_CHECKING:
21-
from pymove.core.pandas import PandasMoveDataFrame
2221
from pymove.core.dask import DaskMoveDataFrame
22+
from pymove.core.pandas import PandasMoveDataFrame
2323

2424

2525
@timer_decorator

0 commit comments

Comments
 (0)