Skip to content

Commit

Permalink
Merge pull request #1709 from CartoDB/release/1.1.0
Browse files Browse the repository at this point in the history
Release/1.1.0
  • Loading branch information
Jesus89 committed Dec 4, 2020
2 parents b9cf3da + 6dece83 commit 2b0ff82
Show file tree
Hide file tree
Showing 320 changed files with 117,049 additions and 68,267 deletions.
2 changes: 1 addition & 1 deletion .flake8
Expand Up @@ -3,4 +3,4 @@ max-line-length = 120

# Ignore rules from the "black" formatter. This is added
# to avoid "Black would make changes." in houndci-bot.
ignore = BLK, E121, E123, E126, E133, E226, E241, E242, E704, W503, W504, W505
ignore = BLK, E121, E123, E126, E133, E226, E241, E242, E704, W503, W504, W505
36 changes: 36 additions & 0 deletions .github/workflows/cartoframes-ci.yml
@@ -0,0 +1,36 @@
name: Run CARTOFrames tests

on:
push:
pull_request:
branches:
- master
- develop

jobs:
test:
strategy:
matrix:
python-version: [3.5, 3.6, 3.7, 3.8]

name: Run tests on Python ${{ matrix.python-version }}

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
pip install tox-gh-actions
- name: Test with tox
run: |
tox
4 changes: 4 additions & 0 deletions .gitignore
Expand Up @@ -6,10 +6,12 @@ sandbox/
# Misc
creds.json
credentials.json
docs/guides/*.csv

__pycache__
.*.sw[nop]
.vscode
_debug

# OS
.DS_Store
Expand Down Expand Up @@ -50,6 +52,7 @@ CARTOCREDS.json
SITEKEY.txt
secret.json
examples/scratch/*
_debug

# JavaScript
node_modules
Expand All @@ -61,6 +64,7 @@ htmlcov
test_*.json
.pytest_cache
tmp_file.csv
my_dataset.csv
fake_path

# Sphinx documentation
Expand Down
2 changes: 1 addition & 1 deletion .hound.yml
Expand Up @@ -4,4 +4,4 @@ flake8:

jshint:
enabled: true
config_file: .jshintrc
config_file: .jshintrc
2 changes: 1 addition & 1 deletion .jshintignore
@@ -1 +1 @@
cartoframes/assets/src/bundle.js
cartoframes/assets/src/bundle.js
2 changes: 1 addition & 1 deletion .jshintrc
@@ -1,4 +1,4 @@
{
"esversion": 6,
"laxbreak" : true
}
}
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Expand Up @@ -2,4 +2,4 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: flake8
- id: flake8
2 changes: 1 addition & 1 deletion .pylintrc
Expand Up @@ -42,4 +42,4 @@ disable=
len-as-condition,
old-style-class,
superfluous-parens,
wrong-import-order,
wrong-import-order,
46 changes: 0 additions & 46 deletions .template/GUIDE_PULL_REQUEST_TEMPLATE.md

This file was deleted.

12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

40 changes: 37 additions & 3 deletions CHANGELOG.md
Expand Up @@ -5,19 +5,53 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.1.0] - 2020-12-04

### Added
- Add new API to delete map publications (#1497)
- Provide Google (Data Observatory) credentials (#1688)

### Changed
- Allow to set a value for null geometries (#1667)
- Add documentation for executing a single test (#1668)
- Add global datasets message in catalog functions (#1670)
- Remove sort by data_range when retrieving isolines (#1673)
- Switch from Travis to Github Actions (#1672)
- Upload table using to_carto in chunks (#1676)
- Check account disk quotas before writing using to_carto (#1674)
- Return GeoDataFrame in the to_dataframe function (#1681)
- Improve metrics for on-prem and staging (#1685)
- Optimize datasets/geographies download (#1693)
- Check geom_coverage and print a message if None (#1695)
- Remove unused BigQueryClient code (#1602)
- Repo clean-up. Refactor docs (#1682)
- Add tests for notebook execution (#1696)
- Use regenerate table in replace strategy (#1707)

### Fixed
- Remove the batch_size parameter in the call to bulk_geocode (#1666)
- Fix credentials link for set_default_credentials (#1665)
- Fix identifier quoting for columns (#1675, #1678)
- Fix uploading extra the_geom column (#1677)
- Fix wrong username error (#1687)
- Fix empty popups (#1689, #1690)
- Remove None from geometry_types to check validity (#1691)
- Remove nan raw geometries for visualization (#1694)
- Generate carto_geocode_hash with NULL values (#1702)

## [1.0.4] - 2020-07-06

## Added
### Added
- Add list_tables function (#1649)
- Add catalog public filter to providers, countries and categories (#1658)
- Add set_default_do_credentials function for DO authentication (#1655)

## Changed
### Changed
- Open publication link in another window (#1647)
- Show a warning when uploading a GeoDataFrame without geometry (#1650)
- Improve GeoDataFrame CRS check, docs and examples (#1656)

## Fixed
### Fixed
- Fix empty geometries issue (#1652)
- Fix Layout publication API key issue (#1654)
- Fix ColumnInfo comparison when replacing a table (#1660)
Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTORS
Expand Up @@ -15,3 +15,5 @@ Víctor Velarde <victor@cartodb.com>
Mario de Frutos Dieguez <mario.defrutos@cartodb.com>
Jesús Arroyo <jarroyo@cartodb.com>
Mamata Akella <makella@cartodb.com>
Josema Camacho <josema@carto.com>
Antonio Carlón <acarlon@cartodb.com>
19 changes: 7 additions & 12 deletions Makefile
@@ -1,22 +1,17 @@
init:
pip install -r requirements.txt

docs:
cd docs && make html
pip install -e .

test:
nosetests -v test/
pytest tests/unit/

clean:
rm -fr build/* dist/* .egg cartoframes.egg-info

dist:
python setup.py sdist bdist_wheel --universal

publish: clean dist send

send:
twine upload dist/*

clean:
find . -name '*DS_Store' | xargs rm
rm -fr build/* dist/* .egg cartoframes.egg-info

.PHONY: init docs test dist release clean send
publish:
clean dist send
8 changes: 4 additions & 4 deletions README.rst
Expand Up @@ -4,8 +4,8 @@ CARTOframes

.. image:: https://travis-ci.org/CartoDB/cartoframes.svg?branch=develop
:target: https://travis-ci.org/CartoDB/cartoframes
.. image:: https://img.shields.io/badge/pypi-v1.0.4-orange
:target: https://pypi.org/project/cartoframes/1.0.4
.. image:: https://img.shields.io/badge/pypi-v1.1.0-orange
:target: https://pypi.org/project/cartoframes/1.1.0

A Python package for integrating `CARTO <https://carto.com/>`__ maps, analysis, and data services into data science workflows.

Expand All @@ -14,11 +14,11 @@ Python data analysis workflows often rely on the de facto standards `pandas <htt
Try it Out
==========

* Stable (1.0.4): |stable|
* Stable (1.1.0): |stable|
* Latest (develop branch): |develop|

.. |stable| image:: https://mybinder.org/badge_logo.svg
:target: https://mybinder.org/v2/gh/cartodb/cartoframes/v1.0.4?filepath=examples
:target: https://mybinder.org/v2/gh/cartodb/cartoframes/v1.1.0?filepath=examples

.. |develop| image:: https://mybinder.org/badge_logo.svg
:target: https://mybinder.org/v2/gh/cartodb/cartoframes/develop?filepath=examples
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Expand Up @@ -14,6 +14,6 @@ Please read [security.txt](https://github.com/CartoDB/cartodb/blob/master/securi

Please refrain from requesting compensation for reporting vulnerabilities. If you want we will publicly acknowledge your responsible disclosure, once the issue is fixed.

You are not allowed to search for vulnerabilities on carto.com itself. CARTO is open source software, you can install a copy yourself and test against that.
You are not allowed to search for vulnerabilities on carto.com itself. CARTO is open source software, you can install a copy yourself and test against that.

When a vulnerability is suspected or discovered we create a confidential security issue to track it internally. Security patches are pushed to a private repository and they should not appear on CARTO.com until it's completely fixed.
2 changes: 1 addition & 1 deletion binder/requirements.txt
@@ -1,4 +1,4 @@
cartoframes==1.0.4
cartoframes==1.1.0
# Additional dependencies from examples
matplotlib
dask
Expand Down
2 changes: 1 addition & 1 deletion cartoframes/__init__.py
Expand Up @@ -5,7 +5,7 @@


# Check installed packages versions
check_package('carto', '>=1.11.1')
check_package('carto', '>=1.11.2')
check_package('pandas', '>=0.25.0')
check_package('geopandas', '>=0.6.0')

Expand Down
2 changes: 1 addition & 1 deletion cartoframes/_version.py
@@ -1 +1 @@
__version__ = '1.0.4'
__version__ = '1.1.0'
22 changes: 13 additions & 9 deletions cartoframes/assets/src/bundle.js
Expand Up @@ -485,14 +485,14 @@ var init = (function () {
const lat = center.lat.toFixed(6);
const lng = center.lng.toFixed(6);
const zoom = map.getZoom().toFixed(2);

mapInfo$.innerText = `viewport={'zoom': ${zoom}, 'lat': ${lat}, 'lng': ${lng}}`;
}

updateMapInfo();

map.on('zoom', updateMapInfo);
map.on('move', updateMapInfo);
map.on('move', updateMapInfo);
}

function getBasecolorSettings(basecolor) {
Expand Down Expand Up @@ -566,7 +566,7 @@ var init = (function () {
}
// Track layers to add only one feature per layer
layerIDs.push(feature.layerId);

for (const item of attrs) {
const variable = feature.variables[item.name];
if (variable) {
Expand All @@ -581,12 +581,16 @@ var init = (function () {
}
}

popup
.setLngLat([event.coordinates.lng, event.coordinates.lat])
.setHTML(`<div class="popup-content">${popupHTML}</div>`);
if (popupHTML) {
popup
.setLngLat([event.coordinates.lng, event.coordinates.lat])
.setHTML(`<div class="popup-content">${popupHTML}</div>`);

if (!popup.isOpen()) {
popup.addTo(map);
if (!popup.isOpen()) {
popup.addTo(map);
}
} else {
popup.remove();
}
} else {
popup.remove();
Expand Down Expand Up @@ -945,7 +949,7 @@ var init = (function () {
});

const layerSelector = new AsBridge.VL.Layers(layerSelector$, carto, layersInfo, mapLayers);

layerSelector.build();
}

Expand Down
14 changes: 9 additions & 5 deletions cartoframes/assets/src/map/popups.js
Expand Up @@ -47,12 +47,16 @@ export function updatePopup(map, popup, event, attrs) {
}
}

popup
.setLngLat([event.coordinates.lng, event.coordinates.lat])
.setHTML(`<div class="popup-content">${popupHTML}</div>`);
if (popupHTML) {
popup
.setLngLat([event.coordinates.lng, event.coordinates.lat])
.setHTML(`<div class="popup-content">${popupHTML}</div>`);

if (!popup.isOpen()) {
popup.addTo(map);
if (!popup.isOpen()) {
popup.addTo(map);
}
} else {
popup.remove();
}
} else {
popup.remove();
Expand Down

0 comments on commit 2b0ff82

Please sign in to comment.