Skip to main content

The common location package for Catalpa's projects

Project description

simple_locations

The common location package used for catalpa's projects. A hierarchical tree of geographical locations supporting location type and GIS data.

Admin

The admin site is set up to use Modeltranslations (if available in the parent app)

For modeltranslations, please remember to run sync_translation_fields in order to get name_en, name_tet etc. fields.

Environment

This is intended to be compatible with:

  • Django 3.1, 3.2, 4.0
  • Python 3.7, 3.8, 3.9
gh repo clone catalpainternational/simple_locations
cd simple_locations
python -m venv env
. env/bin/activate
pip install pip-tools
pip-sync requirements.txt dev.txt
pre-commit install

Pre Commit

If pre-commit is installed your code will be checked before commit. This includes

  • black
  • flake8
  • isort
  • mypy

The same checks are run on push. See pytest.yaml for details on the checks being run.

New Release

For a new release, change the version property in pyproject.toml and push a git tag with the version number For instance at time of writing the version is 3.1.4 with the tag v3.1.4

See build.yaml for details on release tagging

Changelog

  • Version 3.1.4

    • Migrating JSON views from openly
  • Version 3.1.3

    • Added intersects_area function
  • Version 3.1.2

    • Uses psycopg2-binary for development environment
  • Version 3.1.1

    • Added "border" fields
    • Added a model for "projected" areas in EPSG:3857
    • Added commands for border generation and
    • ./manage.py and associated project code
  • Version 3.0.1

    • Poetry for dependency + packaging
    • Releases are automated by pushing a vx.x.x tag to github
  • Version 3.0 (not on pypi)

    • Code style changes (black, flake8)
  • Version 2.77

    • first pass of updates for Python 3.8+ and Django 3.1+
  • Version 2.75

    • add modeltranslations
  • Version 2.74

    • fix CORS issue breaking maps in AreaAdmin
    • typo in AreaChildrenInline
  • Version 2.73

    • add an inline showing children to the Area admin
    • make the geom field optional
  • Version 2.72

    • optionally use django_extensions' ForeignKeyAutocompleteAdmin in admin interface

Manually Uploading a new version to PyPi

Bump pyproject.toml Then run poetry build and poetry publish

poetry build
poetry publish

See the file build.yml for the workflow

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simple_locations-4.0.0.tar.gz (49.9 kB view details)

Uploaded Source

Built Distribution

simple_locations-4.0.0-py3-none-any.whl (66.5 kB view details)

Uploaded Python 3

File details

Details for the file simple_locations-4.0.0.tar.gz.

File metadata

  • Download URL: simple_locations-4.0.0.tar.gz
  • Upload date:
  • Size: 49.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.8.10 Linux/6.2.8-2-liquorix-amd64

File hashes

Hashes for simple_locations-4.0.0.tar.gz
Algorithm Hash digest
SHA256 68c8825a301c1fb8ec6e0010c40d7c6e9f641ee09c7a5d1bfc01e18d946306a6
MD5 ea18c9146473c51540ab711f4bc31e59
BLAKE2b-256 048991714a2f82d98971df2469bb9a4e02513178b3f8e252656d7ddc16d37894

See more details on using hashes here.

File details

Details for the file simple_locations-4.0.0-py3-none-any.whl.

File metadata

  • Download URL: simple_locations-4.0.0-py3-none-any.whl
  • Upload date:
  • Size: 66.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.8.10 Linux/6.2.8-2-liquorix-amd64

File hashes

Hashes for simple_locations-4.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a40530491f77929d02ee896abc10090b17dcd892d4932f485d77054c776798a6
MD5 9a15c572beaad93b9d993f7374d99fce
BLAKE2b-256 1786898a8019f48426a1ff87e52c7ee7ca1e046506254cbfd7aade59bc63f671

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page