Skip to main content

A longitudinal lib

Project description

Longitude

A new bunch of middleware functions to build applications on top of CARTO.

Roadmap

  • Database model

    • CARTO data source
      • Basic parametrized queries (i.e. templated queries)
      • Protected parametrized queries (i.e. avoiding injection)
      • Bind/dynamic parameters in queries (server-side render)
    • Postgres data source
      • psycopg2
      • SQLAlchemy
    • Cache
      • Base cache
        • Put
        • Get
        • Key generation
        • Flush
        • Tests
      • Ram Cache
        • Tests
      • Redis Cache
        • Tests
    • Documentation
      • Sample scripts
    • Unit tests
    • Sample scripts
  • Config

  • CI PyPi versioning

  • COPY operations

    • Carto
      • COPY FROM
      • COPY TO
    • Postgres
      • COPY FROM
      • COPY TO
    • SQLAlchemy
      • COPY FROM
      • COPY TO
  • Validations

    • Marshmallow
      • Wrapper (?)
      • Documentation
  • Swagger

    • Decorators
    • Flassger (?)
    • OAuth integration
    • Postman integration
    • Documentation
  • SQL Alchemy

    • Model definition
    • Jenkins integration
    • Documentation
  • OAuth

    • OAuth2 with Carto (onprem)
    • Role mapping
    • Token storage
    • Documentation

As final user...

How to use:

pip install longitude

Or:

pipenv install longitude

Or:

poetry add longitude

Or install from GitHub:

pip install -e git+https://github.com/GeographicaGS/Longitude#egg=longitude

As developer...

First time

  1. Install poetry using the recommended process
    1. poetry is installed globally as a tool
    2. It works along with virtualenvironments
  2. Create a virtual environment for Python 3.x (check the current development version in pyproject.toml)
    1. You can create it wherever you want but do not put it inside the project
    2. A nice place is $HOME/virtualenvs/longitude
  3. Clone the longitude repo
  4. cd to the repo and:
    1. Activate the virtual environment: . ~/virtualenvs/longitude/bin/activate
    2. Run poetry install
  5. Configure your IDE to use the virtual environment

Daily

  1. Remember to activate the virtual environment

Why Poetry?

Because it handles development dependencies and packaging with a single file (pyproject.toml), which is already standard.

Sample scripts

These are intended to be used with real databases (i.e. those in your profile) to check features of the library. They must be run from the virtual environment.

Testing and coverage

The pytest-cov plugin is being used. Coverage configuration is at .coveragerc (including output folder).

You can run something like: pytest --cov-report=html --cov=core core and the results will go in the defined html folder.

There is a bash script called generate_core_coverage.sh that runs the coverage analysis and shows the report in your browser.

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

geographica-longitude-0.9.6.tar.gz (24.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geographica_longitude-0.9.6-py3-none-any.whl (38.9 kB view details)

Uploaded Python 3

File details

Details for the file geographica-longitude-0.9.6.tar.gz.

File metadata

  • Download URL: geographica-longitude-0.9.6.tar.gz
  • Upload date:
  • Size: 24.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.14 CPython/3.7.3 Linux/4.14.127+

File hashes

Hashes for geographica-longitude-0.9.6.tar.gz
Algorithm Hash digest
SHA256 b71158817c5546b353e3db7d67324ffb3b9b6b2659bb587c186904908efaac86
MD5 7141ffc745e70cefa23a145309a782f2
BLAKE2b-256 ac9108a851cf6953ad0b3a336aae8be8ff08337ac47550d25daed9e5c31583a7

See more details on using hashes here.

File details

Details for the file geographica_longitude-0.9.6-py3-none-any.whl.

File metadata

File hashes

Hashes for geographica_longitude-0.9.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b1cc02c8fa281dc2294f5b5fe290fd0de46d0278ff38ed3c9a384565f2905441
MD5 59139bf181a4f8d1452cf9ffb57720ab
BLAKE2b-256 8dde8b4c31cda6758c97f293232f43ddfd960cbec94f22c0cb9191f2f6c45f7d

See more details on using hashes here.

Supported by

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