• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

OpenTreeMap / otm-core
84%
develop: 84%

Build:
Build:
LAST BUILD BRANCH: dependabot/npm_and_yarn/sockjs-0.3.21
DEFAULT BRANCH: develop
Repo Added 10 Nov 2014 03:43AM UTC
Files 235
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH rtb/hstore
branch: rtb/hstore
CHANGE BRANCH
x
Reset
  • rtb/hstore
  • 2.1.0
  • 2.1.1
  • 2.10.0
  • 2.11.0
  • 2.11.1
  • 2.12.0
  • 2.13.0
  • 2.13.1
  • 2.14.0
  • 2.15.0
  • 2.16.0
  • 2.17.0
  • 2.17.1
  • 2.19.0
  • 2.19.1
  • 2.19.2
  • 2.20.0
  • 2.21.0
  • 2.21.1
  • 2.21.2
  • 2.21.3
  • 2.21.4
  • 2.21.5
  • 2.21.6
  • 2.21.7
  • 2.22.0
  • 2.22.1
  • 2.3.0
  • 2.4.0
  • 2.5.0
  • 2.5.1
  • 2.6.0
  • 2.7.0
  • 2.8.0
  • 2.9.0
  • add-suppport-for-inline-translations-to-field-tags
  • admin-styling
  • bug/sml/admin-treemap-title-wrapping
  • custom-field-mgmt-ui
  • dependabot/npm_and_yarn/extend-3.0.2
  • dependabot/npm_and_yarn/fstream-1.0.12
  • dependabot/npm_and_yarn/http-proxy-1.18.1
  • dependabot/npm_and_yarn/ini-1.3.7
  • dependabot/npm_and_yarn/lodash-4.17.13
  • dependabot/npm_and_yarn/lodash-4.17.19
  • dependabot/npm_and_yarn/node-sass-4.13.1
  • dependabot/npm_and_yarn/sockjs-0.3.21
  • dependabot/npm_and_yarn/websocket-extensions-0.1.4
  • dependabot/npm_and_yarn/y18n-3.2.2
  • dependabot/pip/django-1.11.28
  • dependabot/pip/django-1.11.29
  • dependabot/pip/pillow-6.2.0
  • develop
  • feature/hmc/bump-pyrollbar
  • feature/hmc/django-site-domain
  • feature/hmc/omgeo-with-requests
  • feature/hmc/remove-circle-ci
  • feature/hmc/remove-statsd
  • feature/hmc/statsd-celery
  • feature/hmc/systemd-non-ascii-output
  • feature/jcw/add-favs-to-profile
  • feature/jcw/api-docs-and-tool
  • feature/jcw/comment-out-importer-support-for-read-only
  • feature/jcw/mapfeature-updated-at
  • feature/jcw/new-modeling-header
  • feature/jcw/remove-gender-from-species
  • feature/jcw/show-alt-no-favs-message
  • feature/jcw/show-import-update-date-rather-than-id
  • feature/jcw/speed-up-instance-edits-page
  • feature/jcw/speed-up-user-audit-query
  • feature/mw/advanced-search-style
  • feature/mw/dashboard-header-fix
  • feature/mw/dashboard-style-cleanup
  • feature/mw/global-spinner
  • feature/mw/highlight-color
  • feature/mw/mgmt-cleanup
  • feature/mw/mgmt-padding-issue
  • feature/mw/modal-warning
  • feature/mw/modeling-btn-fix
  • feature/mw/modeling-num-input-fixes
  • feature/mw/modeling-planlist
  • feature/mw/modeling-sidebar-toolbar-fixes
  • feature/mw/modeling-toolbar-small-desktops-fix
  • feature/mw/modelling-cleanup
  • feature/mw/multiselect-style-fix
  • feature/mw/new-field-highlight
  • feature/mw/plan-modal-labels
  • feature/mw/scenario-protoype
  • feature/mw/suspend-map-cleanup
  • feature/mw/updated-spinner
  • feature/provision-py3
  • feature/sml/location-search-marker
  • feature/sml/management-sidebar-click-targets
  • feature/sml/profile-name-wrapping-bug
  • feature/tnation/rollbar
  • feature/tnation/rollbar-upgrade
  • fix/jcw/double-wrapped-api-species-view
  • fix/jcw/fix-species-import-guide-link
  • fix/jcw/make-import-statuses-unique
  • fix/jcw/remove-gender-fieldpermissions
  • fix/jcw/remove-gender-fieldpermissions-2
  • foo
  • gitter
  • hotfix/2.1.1
  • hotfix/2.11.1
  • hotfix/2.13.1
  • hotfix/2.17.1
  • hotfix/2.19.1
  • hotfix/2.19.2
  • hotfix/2.21.1
  • hotfix/2.21.2
  • hotfix/2.21.3
  • hotfix/2.21.4
  • hotfix/2.21.5
  • hotfix/2.21.6
  • hotfix/2.21.7
  • hotfix/2.22.1
  • hotfix/2.22.2
  • hotfix/2.5.1
  • jcw/bryant3
  • jcw/catch-basemap-crash
  • jcw/date-picker-bug
  • jcw/delete-tree-with-hidden-id
  • jcw/dependency-updates
  • jcw/encode-geocode-param
  • jcw/fix-basemap-crash-hotfix
  • jcw/fix-basemap-restore
  • jcw/fix-geocode-test
  • jcw/fix-invitation-activation
  • jcw/fix-modeling-csv
  • jcw/fix-udf-helper
  • jcw/handle-basemap-pref-not-available
  • jcw/hidden-tree-id-can-be-shown
  • jcw/jquery-3
  • jcw/js-deps
  • jcw/mobile-safari-layer-selector
  • jcw/photo-export
  • jcw/registration-recaptcha
  • jcw/tree-edit-perm
  • jcw/udf-choice-whitespace
  • jcw/update-djqscsv-and-tinsel
  • jcw/update-moment
  • jcw/update-urllib3
  • jw/export-units-fix
  • jw/units-fix
  • kd/clear-boundary-polygon
  • kd/numeric-udf-validation
  • kd/protected-udf
  • kd/restrict-polygonal-features
  • kd/sequential-reference-number
  • kd/wm-task-priority
  • kd/wm-teams
  • kd/wmm-custom-fields
  • kd/works-management
  • list
  • master
  • maurizi-requires-io
  • modeling-chart-labels-2
  • modeling-mortality-params
  • modular-pricing
  • otm-bryant2
  • otm-cloud
  • python3
  • release
  • release-2.0
  • release/2.1.0
  • release/2.10.0
  • release/2.11.0
  • release/2.12.0
  • release/2.13.0
  • release/2.14.0
  • release/2.15.0
  • release/2.16.0
  • release/2.17.0
  • release/2.19.0
  • release/2.2.0
  • release/2.20.0
  • release/2.21.0
  • release/2.22.0
  • release/2.3.0
  • release/2.4.0
  • release/2.5.0
  • release/2.6.0
  • release/2.7.0
  • release/2.8.0
  • release/2.9.0
  • remove-unused-provisioning-items
  • requires-io-develop
  • requires-io-master
  • revert-2233-remove-unused-provisioning-items
  • revert-2483-feature/tune-rate-limiting
  • revert-2485-revert-2483-feature/tune-rate-limiting
  • rtb/custom-field-reuse-fix
  • rtb/default-static-pages
  • rtb/defer-choice-delete
  • rtb/ecobenefits-totals
  • rtb/export-comments-button
  • rtb/fix-detail-search
  • rtb/importer-proximity
  • rtb/no-double-quotes
  • rtb/no-polygon-on-mobile
  • rtb/skipped-bioswale-test
  • rtb/static-page-edit-default
  • rtb/stewardship-search-date-bug
  • split-modeling
  • udf-date-validation
  • update-python-deps-1.8

pending completion
2991

push

travis-ci

RobinIsTheBird
upgrade HStore

Overview
--------

The point of this commit is to switch from
`django_hstore.fields.DictionaryField` to
`django.contrib.postgres.fields.HStoreField`.

The former is incompatible with later releases of django,
and OpenTreeMap needs to migrate from the current 1.8 to 1.11
for stability.

The latter is the sanctioned django interface to PostgreSQL's hstore
going forward.

The latter is also less functional than the former, prompting a series
of other changes.
Changes were also made for the sake of maintenance simplicity.

The key changes here are in `treemap.udf`, `treemap.audit`, `*.models`, and
`treemap.search`.

**treemap.udf**

Entry points:
-   `UDFModel`, a base class for models that need user defined fields
-   `UserDefinedFieldDefinition`, defines the name, data type, and model type
    for a user defined field, for a given treemap instance, as a
    scalar or a collection
-   `UserDefinedCollectionValue`, an HStore collection value for a
    specific `UserDefinedFieldDefinition` on a specific model instance

`UDFModel` user guide:

Classes that want custom fields subclass `UDFModel`.

To assign a custom field,
    `my_model_instance.udfs['custom field name'] = value`

There are three ways to retrieve it:
    `my_model_instance.udfs['custom field name']`
    `getattr(my_model_instance, 'custom field name')`
    `getattr(my_model_instance, 'udf:custom field name'`)

All of the above work for both scalar and collection custom fields.

Filter `UDFModel` subclass querysets using the `udf` transform.

In addition to the transforms and lookups described at
https://docs.djangoproject.com/en/1.8/ref/contrib/postgres/fields/,
`UDFModel` implements `__int` and `__float` transforms, for use
before magnitude comparisons (`__gt`, `__gte`, `__lt`, `__lte`).
Without them, comparison is lexical, which does not yield the
same results as a numerical comparison.

For example, to filter a queryset for a custom field value
corresponding to an integer ... (continued)

17435 of 20867 relevant lines covered (83.55%)

0.84 hits per line

Relevant lines Covered
Build:
Build:
20867 RELEVANT LINES 17435 COVERED LINES
0.84 HITS PER LINE
Source Files on rtb/hstore
  • List 0
  • Changed 4
  • Source Changed 3
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
2991 rtb/hstore upgrade HStore Overview -------- The point of this commit is to switch from `django_hstore.fields.DictionaryField` to `django.contrib.postgres.fields.HStoreField`. The former is incompatible with later releases of django, and OpenTreeMap needs ... push 30 May 2017 11:38PM UTC RobinIsTheBird travis-ci pending completion  
2988 rtb/hstore update HStore - multichoice fixes Changes ------- - The web GUI expects empty multichoice to look like an empty list. Put the fix in `form_extras` rather than deep in the `udf` code. - Delete a multichoice item whose list is empty - In `treemap... push 27 May 2017 12:33AM UTC RobinIsTheBird travis-ci pending completion  
2982 rtb/hstore update HStore - fix api The iOS app sends udf keys with value None for scalar udfs that are not in the `udfs` field. Handle it. Also fix `in` semantics for `UDFDictionary`. -- Connects to #1968 push 26 May 2017 02:22PM UTC RobinIsTheBird travis-ci pending completion  
2979 rtb/hstore update HStore - respond to comments Access and search now work for udfs with NULL choice values. Fix UDFModel udf cleaning to return all the errors. -- Connects to #1968 push 25 May 2017 03:41PM UTC RobinIsTheBird travis-ci pending completion  
2974 rtb/hstore update HStore remove commented-out line push 24 May 2017 09:03PM UTC RobinIsTheBird travis-ci pending completion  
2972 rtb/hstore update HStore Tolerate NULL hstore values push 24 May 2017 09:01PM UTC RobinIsTheBird travis-ci pending completion  
2965 rtb/hstore update HStore - review comments Changes ------- - Fix comment type-o in `importer.tests` - Improve comments in `test_udfs` explaining the need for a typecast Transform in a comparison search - Remove vestigial `dfd ` param and `deepcopy` from ... push 19 May 2017 02:04AM UTC RobinIsTheBird travis-ci pending completion  
2963 rtb/hstore update HStore - fix for migration Changes ------- - Fix `UDFDictionary.__repr__` to tolerate a missing instance for the sake of reverse migration -- Connects to #1968 push 18 May 2017 11:23PM UTC RobinIsTheBird travis-ci pending completion  
2959 rtb/hstore update HStore - review comments Changes ------- - `treemap.udf` - Revert `treemap.udf.UDFModel` to using `udfs` as a `Field` - Name the field `UDFPostgresField` because of instructions in https://docs.djangoproject.com/en/1.11/howto/c... push 18 May 2017 12:08AM UTC RobinIsTheBird travis-ci pending completion  
2952 rtb/hstore upgrade HStore Overview -------- The point of this commit is to switch from `django_hstore.fields.DictionaryField` to `django.contrib.postgres.fields.HStoreField`. The former is incompatible with later releases of django, and OpenTreeMap needs ... push 15 May 2017 05:42PM UTC RobinIsTheBird travis-ci pending completion  
See All Builds (2530)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc