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
- Base cache
- Documentation
- Sample scripts
- Unit tests
- Sample scripts
- CARTO data source
-
Config
-
CI PyPi versioning
-
COPY operations
- Carto
- COPY FROM
- COPY TO
- Postgres
- COPY FROM
- COPY TO
- SQLAlchemy
- COPY FROM
- COPY TO
- Carto
-
Validations
- Marshmallow
- Wrapper (?)
- Documentation
- Marshmallow
-
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
- Install
poetry
using the recommended process- poetry is installed globally as a tool
- It works along with virtualenvironments
- Create a virtual environment for Python 3.x (check the current development version in
pyproject.toml
)- You can create it wherever you want but do not put it inside the project
- A nice place is
$HOME/virtualenvs/longitude
- Clone the
longitude
repo cd
to the repo and:- Activate the virtual environment:
. ~/virtualenvs/longitude/bin/activate
- Run
poetry install
- Activate the virtual environment:
- Configure your IDE to use the virtual environment
Daily
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file geographica-longitude-0.10.0.tar.gz
.
File metadata
- Download URL: geographica-longitude-0.10.0.tar.gz
- Upload date:
- Size: 24.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.10 CPython/3.7.3 Linux/4.19.112+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a5f881b89337bc20456d29e735f83e64f3673924723e9d8975f42463a768b11 |
|
MD5 | 874d42e6ea9eeb7f8245c5109db46d80 |
|
BLAKE2b-256 | 9736a8403e233aa09a410ae7b7bfcd6a5d9789d75c6bb240df81b66f9cd291f7 |
File details
Details for the file geographica_longitude-0.10.0-py3-none-any.whl
.
File metadata
- Download URL: geographica_longitude-0.10.0-py3-none-any.whl
- Upload date:
- Size: 38.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.10 CPython/3.7.3 Linux/4.19.112+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2d5e4ca155c7086020da3b55a7bd478b1840a22a81b6154059e0877bb22fc0b |
|
MD5 | 848becf0cd995964b1659be4dd14c129 |
|
BLAKE2b-256 | 8cbd5dd526cce063c39b251ec8d3fceaf48ba123ddae0325aa2730c4776dd8f4 |