Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
901b1ab
putting examples on math module
joaocarvoli May 25, 2021
9c41ca0
spacing on examples
mxaviersmp May 25, 2021
5e83085
Merge pull request #193 from InsightLab/examples
mxaviersmp May 25, 2021
64e4acc
putting examples on mem module
joaocarvoli May 27, 2021
5bf80d7
clarified some examples
mxaviersmp May 27, 2021
6980cdc
Merge pull request #194 from InsightLab/examples
mxaviersmp May 27, 2021
17be59f
putting examples on trajectories module
joaocarvoli May 27, 2021
a5f9710
merge
joaocarvoli May 27, 2021
04b62a0
putting examples on trajectories module
joaocarvoli May 28, 2021
ccda986
putting examples on trajectories module
joaocarvoli May 28, 2021
65f6ce4
putting examples on trajectories module
joaocarvoli May 28, 2021
74b63ae
return
mxaviersmp May 28, 2021
8d1b4ce
fix some indentation
mxaviersmp May 28, 2021
b19b7c0
Merge pull request #195 from InsightLab/examples
mxaviersmp May 28, 2021
6458000
correcting formation wrongs
joaocarvoli Jun 1, 2021
44b60b1
putting examples on visual module
joaocarvoli Jun 1, 2021
0960e0f
putting examples on visual module
joaocarvoli Jun 2, 2021
cb069cf
Update visual.py
joaocarvoli Jun 2, 2021
a294f9c
Update datetime.py
joaocarvoli Jun 2, 2021
672c440
added add_map_legend example
mxaviersmp Jun 2, 2021
b2feb65
Merge pull request #196 from InsightLab/examples
mxaviersmp Jun 2, 2021
c16b21f
added mypy
mxaviersmp Jun 8, 2021
39c8842
fix mypy errors
mxaviersmp Jun 8, 2021
a434c15
added mypy to requirements-dev
mxaviersmp Jun 8, 2021
359467d
pinned mypy version to requirements-dev
mxaviersmp Jun 8, 2021
0c0658f
Merge pull request #199 from InsightLab/mypy
mxaviersmp Jun 8, 2021
fbc52a6
Update README.md
regispires Jun 8, 2021
ffbcd96
Update README.md
regispires Jun 8, 2021
ccdb086
putting examples on integration module
joaocarvoli Jun 10, 2021
a8b2218
merge
joaocarvoli Jun 10, 2021
13d0a7d
Update integration.py
joaocarvoli Jun 10, 2021
69c4479
Merge branch 'developer' into examples
mxaviersmp Jun 10, 2021
92f0065
added files to mypy in setup.cfg
mxaviersmp Jun 10, 2021
f1d9e2a
Merge branch 'mypy' into developer
mxaviersmp Jun 10, 2021
bc94196
added inplace to union
mxaviersmp Jun 10, 2021
ec54dc4
adjust 01
joaocarvoli Jun 10, 2021
ed4007b
adjust 01
joaocarvoli Jun 10, 2021
4f66552
changed table to markdown
mxaviersmp Jun 11, 2021
6754608
Merge pull request #201 from InsightLab/readme-table
mxaviersmp Jun 14, 2021
ddacdbd
fix table links
mxaviersmp Jun 14, 2021
60f278f
remove geopandas dataframe dependency from integration
mxaviersmp Jun 16, 2021
eb402f9
removed travis from deployment-instructions
mxaviersmp Jun 16, 2021
9fb22cd
list spaces
mxaviersmp Jun 16, 2021
d120770
changed type to pandasmove
mxaviersmp Jun 18, 2021
945be1c
m
mxaviersmp Jun 23, 2021
8ecb27b
correction: putting examples on integration module
joaocarvoli Jun 26, 2021
038951c
fix optimizer
mxaviersmp Jun 26, 2021
243ed48
updated examples
mxaviersmp Jun 26, 2021
c9269f0
cleaned examples
mxaviersmp Jun 26, 2021
a699609
changed assert to assert_almost_equal due to precision
mxaviersmp Jun 26, 2021
0279831
fix list indentation
mxaviersmp Jun 26, 2021
f1c649d
Merge pull request #200 from InsightLab/examples
mxaviersmp Jun 26, 2021
8d29cc1
Putting examples on Folium module
joaocarvoli Jul 6, 2021
2b171e3
fix some linting issues
mxaviersmp Jul 6, 2021
4b6a5a9
removed missing function from module doc
mxaviersmp Jul 6, 2021
f280572
Merge pull request #202 from InsightLab/examples
mxaviersmp Jul 6, 2021
aca590d
putting examples on matplotlib module
joaocarvoli Jul 12, 2021
77ff702
stop plot functions from changing dataframe
mxaviersmp Jul 12, 2021
e27e044
stop plot functions from changing dataframe
mxaviersmp Jul 12, 2021
755d18b
Merge pull request #203 from InsightLab/examples
mxaviersmp Jul 12, 2021
337f15c
fix remove show_traj_id
mxaviersmp Jul 12, 2021
1b8c55c
renaming visualization methods
joaocarvoli Jul 13, 2021
4174250
a little change
joaocarvoli Jul 13, 2021
cf5528a
Merge branch 'rename-visualization-methods' of github.com:InsightLab/…
mxaviersmp Jul 13, 2021
d8e84d1
renamed matplotlib.plot_traj_id
mxaviersmp Jul 13, 2021
c517a05
Merge pull request #204 from InsightLab/rename-visualization-methods
mxaviersmp Jul 13, 2021
2e30dd5
changed typing style to python 3.10
mxaviersmp Jul 13, 2021
eab12c2
added multi python version testing
mxaviersmp Jul 13, 2021
ac9298a
fix typo in version
mxaviersmp Jul 13, 2021
7943f2f
changed versions to string
mxaviersmp Jul 13, 2021
2350cdf
removed python 3.10
mxaviersmp Jul 13, 2021
9ba5d3d
Merge pull request #205 from InsightLab/update-py10
mxaviersmp Jul 13, 2021
114ac30
changed tagging from bump2version, removed warning on last_operation
mxaviersmp Jul 13, 2021
6ffbae8
updated notebooks
mxaviersmp Jul 13, 2021
1a60908
updated docs
mxaviersmp Jul 13, 2021
786f387
Merge pull request #206 from InsightLab/update-docs
mxaviersmp Jul 13, 2021
b663712
Bump version: 2.7.2 → 3.0.0
mxaviersmp Jul 14, 2021
b306e75
Merge branch 'master' into developer
mxaviersmp Jul 14, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .bumpversion.cfg

This file was deleted.

8 changes: 7 additions & 1 deletion .code-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ We following the [Numpy](https://numpydoc.readthedocs.io/en/latest/format.html)
## flake8

Flake8 is a python linter that helps to keep the code up to PEP standards.

## mypy

Mypy is a static type checker for python

To lint the code, run: `make lint`

## Pre-Commit
Expand Down Expand Up @@ -85,13 +90,14 @@ pymove/core/dataframe.py:970:29: E711 comparison to None should be 'if cond is N

- Don't commit to branch: Doesn't allow direct commits to `master` branch.

- seed isort known_third_party: Populates the `.isort.cfg` file.

- isort: Sorts the imports.

- flake8: Ensures that the code follows `pylint` and `pyflakes` guidelines.
It will point the errors in the code.

- mypy: Performs type checking.
It will point the errors in the code.
---

## Codacy
Expand Down
230 changes: 107 additions & 123 deletions .deployment-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,101 +10,85 @@

The link in this tutorial will explain the steps to upload a package to pypi: <https://dzone.com/articles/executable-package-pip-install>

#### Get started with Travis CI

1. Sing up on Travis-ci with GitHub.

2. Accept the authorization of Travis CI.

3. Click on your profile picture in the top right of your Travis Dashboard,
click the green Activate button, and select the repositories
you want to use with Travis CI.

4. Add a .travis.yml file to your repository to tell Travis CI what to do.

#### Use the .travis.yml file to configure your deploy

5. Create an API token to authenticate with PyPI:
1. In your Pypi account settings, go to API tokens section and
select "Add API token"

2. Add the token to the Github Actions Secret.

6. Create a github action with the following content:
```yaml
name: Publish to PyPI
on:
push:
tags:
- "*"

jobs:
build-n-publish:
if: github.event.base_ref == 'refs/heads/<branch-for-deploy>' && startsWith(github.ref, 'refs/tags')
name: Build and publish package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: 3.6
- name: Install dependencies
run: |
python -m pip install --upgrade "pip<20"
pip install -r requirements-dev.txt
- name: <optional step to lint and test the code>
run: |
flake8
pytest
- name: Build
run: |
pip install setuptools wheel twine
python setup.py sdist bdist_wheel
- name: Publish
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}
```
#### Use Github Actions to deploy

1. Create an API token to authenticate with PyPI:
- In your Pypi account settings, go to API tokens section and select "Add API token"

- Add the token to the Github Actions Secret.

2. Create a github workflow with the following content:
```yaml
name: Publish to PyPI
on:
push:
tags:
- "*"

jobs:
build-n-publish:
if: github.event.base_ref == 'refs/heads/<branch-for-deploy>' && startsWith(github.ref, 'refs/tags')
name: Build and publish package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: 3.6
- name: Install dependencies
run: |
python -m pip install --upgrade pip
make dev
- name: <optional step to lint and test the code>
run: |
make lint
make test
- name: Build
run: |
pip install setuptools wheel twine
python setup.py sdist bdist_wheel
- name: Publish
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}
```

#### Configure bump2version

For the versioning control we a using the package bump2version.

1. Run `pip install bump2version` in your environment
2. Add the following attributes to the .bumpversion.cfg file:
```yaml
[bumpversion]
current_version = <version_number>
allow_dirty = True
tag_name = version-{new_version}
tag = True
commit = True
[bumpversion:file:<path_to_file_version_file>]
2. Add the following attributes to the setup.cfg file:
```conf
[bumpversion]
current_version = <version_number>
allow_dirty = True
tag_name = version-{new_version}
tag = True
commit = True
[bumpversion:file:<path_to_file_version_file>]
[bumpversion:file:<path_to_setup_file>]
```

***Note:*** If `NotADirectoryError: [Errno 20] Not a directory`,
check <https://github.com/c4urself/bump2version/issues/139> for a fix.

#### For more information see these links

- <https://docs.travis-ci.com/user/tutorial/>
- <https://docs.travis-ci.com/user/deployment/pypi/>
- <https://github.com/c4urself/bump2version>

---

### Deploy the package using Travis CI

1. Run the command `bumperversion [major|minor|patch]` to increase the
version number. This will create a new tag and commit the changes.
1. Run the command `bumperversion [major|minor|patch]` to increase the version number.
This will create a new tag and commit the changes.

2. Push the changes to the developer branch.

3. Create a pull request onto master. To deploy pymove to Pypi using
you must be in the master branch, Travis was configured to only allow
deployments from tagged commits on the master branch.
you must be in the master branch, pushing a tagged commit.

4. After merging the new version into the master branch, push the new
tag created by bump2version.
Expand Down Expand Up @@ -133,76 +117,76 @@ With the package published to Pypi, we can easily deploy to the

2. Now add some information to the `<package_name>/meta.yaml` file.
```yaml
{% set name = <package_name> %}
{% set version = <package_version> %}

package:
name: "{{ name|lower }}"
version: "{{ version }}"

source:
url: "https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz"
sha256: <package_version_sha256>

build:
number: 0
script: "{{ PYTHON }} -m pip install . -vv"
noarch: python

requirements:
host:
- pip
- python >=3.6
run:
- <package_requirements>
- python >=3.6

test:
imports:
- <all_possible_imports>

about:
home: <repository_url>
license: <licence>
license_family: <licence_family>
license_file: <path_to_licence_file>
summary: <package_summary>
doc_url: <package_docs_url>
dev_url:

extra:
recipe-maintainers:
- <your_github_username>
- <other_package_maintainers>
{% set name = <package_name> %}
{% set version = <package_version> %}

package:
name: "{{ name|lower }}"
version: "{{ version }}"

source:
url: "https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz"
sha256: <package_version_sha256>

build:
number: 0
script: "{{ PYTHON }} -m pip install . -vv"
noarch: python

requirements:
host:
- pip
- python >=3.6
run:
- <package_requirements>
- python >=3.6

test:
imports:
- <all_possible_imports>

about:
home: <repository_url>
license: <licence>
license_family: <licence_family>
license_file: <path_to_licence_file>
summary: <package_summary>
doc_url: <package_docs_url>
dev_url:

extra:
recipe-maintainers:
- <your_github_username>
- <other_package_maintainers>
```

1. All package run requirements must be avaiable in the conda-forge channel.
All package run requirements must be available in the conda-forge channel.

#### Request the publication to the conda-forge channel

2. Fork the example recipes repository at <https://github.com/conda-forge/staged-recipes>
1. Fork the example recipes repository at <https://github.com/conda-forge/staged-recipes>

3. Copy the `<package_name>/meta.yaml` file created in the step above to
2. Copy the `<package_name>/meta.yaml` file created in the step above to
the forked repo `staged-recipes/recipes/example` directory

4. Push the changes to your forked repository.
3. Push the changes to your forked repository.

5. Make a pull request for your repository to the master branch on
4. Make a pull request for your repository to the master branch on
the stage-recipes repository.
- `conda-forge:master from <your_github_username>:<package_name>`

6. Now, the pull request will be checked.
- Comlete the checklist for the pull requests.
5. Now, the pull request will be checked.
- Complete the checklist for the pull requests.

- The recipe meta.yaml file will be checked by the `conda-forge-linting service`.

- The recipe will be built for `linux64`, `macos64`
and `windows64` systems.

7. If there are any problems with the PR, a review team member will give
6. If there are any problems with the PR, a review team member will give
you feedback, pointing out improvements and answering questions.

8. Once everything is in order, the pull request will be aproved.
7. Once everything is in order, the pull request will be aproved.

---

Expand Down
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

53 changes: 21 additions & 32 deletions .github/workflows/lint_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,26 @@ name: Lint and Test
on: [push]

jobs:
lint:
name: Code Linting
lint-test:
name: Lint and Test
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9']
steps:
- uses: actions/checkout@main
- name: Set up Python 3.7
uses: actions/setup-python@main
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
make dev
- name: Lint
working-directory: ${{ github.workspace }}
run: |
make lint
test:
name: Code Testing
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Set up Python 3.7
uses: actions/setup-python@main
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
make dev
- name: Test
working-directory: ${{ github.workspace }}
run: |
make test
- uses: actions/checkout@main
- uses: actions/setup-python@main
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
make dev
- name: Check code style
working-directory: ${{ github.workspace }}
run: |
make lint
- name: Runs unit tests
working-directory: ${{ github.workspace }}
run: |
make test
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,7 @@ repos:
'flake8-docstrings==1.6.0',
'pep8-naming==0.11.1'
]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v0.812'
hooks:
- id: mypy
Loading