Skip to content

Commit 27d3203

Browse files
authored
Merge pull request #188 from InsightLab/codacy
Codacy
2 parents b0f18d7 + 8fa649a commit 27d3203

File tree

9 files changed

+14
-31
lines changed

9 files changed

+14
-31
lines changed

.code-style.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ We are using some tools to keep a default coding style in the project.
1313

1414
We following the [Numpy](https://numpydoc.readthedocs.io/en/latest/format.html) docstring style with [PEP484](https://www.python.org/dev/peps/pep-0484/#abstract).
1515

16-
1716
## Links
1817
- <https://pre-commit.com/>
1918
- <https://www.codacy.com/>

.github/workflows/code_coverage.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ jobs:
1717
python-version: 3.7
1818
- name: Install dependencies
1919
run: |
20-
make ci
20+
python -m pip install --upgrade pip
21+
make dev
2122
- name: Coverage
2223
run: |
2324
make coverage

.github/workflows/lint_and_test.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ jobs:
1313
python-version: 3.7
1414
- name: Install dependencies
1515
run: |
16-
make ci
16+
python -m pip install --upgrade pip
17+
make dev
1718
- name: Lint
1819
working-directory: ${{ github.workspace }}
1920
run: |
@@ -30,7 +31,7 @@ jobs:
3031
- name: Install dependencies
3132
run: |
3233
python -m pip install --upgrade pip
33-
pip install pytest geopandas .
34+
make dev
3435
- name: Test
3536
working-directory: ${{ github.workspace }}
3637
run: |

.github/workflows/publish.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ jobs:
1717
python-version: 3.7
1818
- name: Install dependencies
1919
run: |
20-
make ci
20+
python -m pip install --upgrade pip
21+
make dev
2122
- name: Lint and Test
2223
run: |
2324
make lint

Makefile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,9 @@ help:
88

99
dev:
1010
pip install -r requirements-dev.txt
11+
pip install -e .
1112
pre-commit install
1213

13-
ci:
14-
python -m pip install --upgrade pip
15-
pip install flake8 pep8-naming flake8-bugbear flake8-docstrings pytest coverage geopandas
16-
pip install .
17-
1814
clean:
1915
rm -rf `find . -type d -name .pytest_cache`
2016
rm -rf `find . -type d -name __pycache__`

pymove/core/pandas.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
11
"""PandasMoveDataFrame class."""
22

3-
from typing import (
4-
TYPE_CHECKING,
5-
Any,
6-
Callable,
7-
Dict,
8-
List,
9-
Optional,
10-
Set,
11-
Text,
12-
Tuple,
13-
Union,
14-
)
3+
from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Text, Tuple, Union
154

165
import numpy as np
176
from pandas import DataFrame, DateOffset, Series, Timedelta

pymove/preprocessing/filters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ def clean_consecutive_duplicates(
299299
----------
300300
move_data : dataframe
301301
The input trajectory data
302-
subset : Array of strs, optional
302+
subset : Array of str, optional
303303
Specifies Column label or sequence of labels, considered for
304304
identifying duplicates, by default None
305305
keep : 'first', 'last', optional

pymove/preprocessing/stay_point_detection.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212

1313
from pymove.preprocessing.segmentation import by_max_dist
1414
from pymove.utils.constants import (
15-
DATETIME,
1615
DIST_TO_PREV,
17-
HOUR_COS,
18-
HOUR_SIN,
1916
MOVE,
2017
SEGMENT_STOP,
2118
SITUATION,

requirements-dev.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
-e .
2-
pre-commit
31
bump2version
2+
coverage
43
flake8
5-
pep8-naming
64
flake8-bugbear
75
flake8-docstrings
8-
pytest
9-
coverage
106
geopandas
7+
pep8-naming
8+
pre-commit
9+
pytest
1110
sphinx
1211
sphinx_rtd_theme

0 commit comments

Comments
 (0)