Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

A longitudinal lib

Project description

Longitude

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

Roadmap

  • [ ] Database model

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

  • [x] CI PyPi versioning

  • [ ] COPY operations

    • [x] Carto
      • [x] COPY FROM
      • [ ] COPY TO
    • [x] Postgres
      • [x] COPY FROM
      • [ ] COPY TO
    • [x] SQLAlchemy
      • [x] COPY FROM
      • [ ] COPY TO
  • [ ] Validations

    • [ ] Marshmallow
      • [ ] Wrapper (?)
      • [ ] Documentation
  • [x] Swagger

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

    • [ ] Model definition
    • [ ] Jenkins integration
    • [ ] Documentation
  • [ ] OAuth

    • [x] 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.

Files for geographica-longitude, version 0.9.7
Filename, size File type Python version Upload date Hashes
Filename, size geographica_longitude-0.9.7-py3-none-any.whl (38.9 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size geographica-longitude-0.9.7.tar.gz (24.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page