Skip to main content

Swiss army knife for Bord4's data anlysis

Project description

Pakkenellik: Bord4's swiss army knife for python projects

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. Contact

About The Project

Pakkenellik is german and used in Bergen as a synonym for small packages one carry around, especially when traveling. This package is a swiss army knife for Bord4's python projects. It contains a makefile with commands for linting and formatting. One day it will contain testing as well.

This package is used by the cookiecutter-bord4-analysis project and bord4-analysis-templates

Inspiration for the makefile and potery-file is taken from Johannes Schmidt's series "Setting up Python Projects"

Installation

Requires Python 3.10 or later.

pip install pakkenellik

or using pipenv:

pipenv install pakkenellik

or using poetry:

poetry add pakkenellik

Usage

There are a heap of functions for you to use. Enjoy.

Local development

Requirements


  • pyenv - manage python versions
  • poetry - manage python dependencies

To install on mac you can use homebrew:

brew upgrade
brew install pyenv

You can either install poetry with homebrew or the way described in the documentation

Makefile commands

  • make lint
    • lint the code in the src folder with black, isort and flake8. Mypy will check for correct typing.
  • make format
    • format the code in the src folder with black and isort.

Structure

.
├── .editorconfig
├── .flake8
├── pyproject.toml
├── README.md
└── pakkenellik
    ├── __init__.py
    ├── aws
    │   ├── __init__.py
    │   └── s3.py
    ├── config
    │   └── __init__.py
    ├── dataframe
    │   ├── __init__.py
    │   ├── clean_column_headers.py
    │   ├── datetime.py
    │   ├── numbers.py
    │   └── regions.py
    ├── integration
    │   ├── __init__.py
    │   └── client.py
    ├── log
    │   ├── __init__.py
    │   └── ansi.py
    ├── vegvesen
    │   ├── __init__.py
    │   └── visvegen.py
    └── viz
        ├── __init__.py
        └── pyplot.py
  • .editorconfig
    • Configuration file for editorconfig.
  • .flake8
    • Configuration file for flake8.
  • pyproject.toml
    • Configuration file for poetry. Mypy and isort is configured here.
  • README.md
    • This file.
  • pakkenellik
    • The package. It has the following subpackages:
  • aws
    • util functions for working with AWS
  • config
    • configuration functions that helps with adhering to bord4's folder structure and help with common urls.
  • dataframe
    • util functions for working with dataframes
  • integration
    • helper functions when working with Schibsted MM API
  • log
    • better log functions
  • vegvesen
    • Functions to work with Vegvesenet's VisVegen API

Usage

To install the package in your project run

poetry add pakkenellik

Contributing

Do you have write permissions to the repo? Then you can clone this project to a folder on your computer.

git clone https://github.com/BergensTidende/pakkenellik.git

If not do the following:

  • Create a personal fork of the project on Github.
  • Clone the fork on your local machine. Your remote repo on Github is called origin.
  • Add the original repository as a remote called upstream.
  • If you created your fork a while ago be sure to pull upstream changes into your local repository.

This will clone the repo into pakkenellik.

Create a branch for your changes

git checkout -b name-of-branch

Make your changes, rememeber to commit. And always write your commit messages in the present tense. Your commit message should describe what the commit, when applied, does to the code – not what you did to the code.

If you're working on a clone push the branch to github and make PR.

If your're working a fork:

  • Squash your commits into a single commit with git's interactive rebase. Create a new branch if necessary.
  • Push your branch to your fork on Github, the remote origin.
  • From your fork open a pull request in the correct branch. Target the project's develop branch if there is one, else go for master!
  • If the maintainer requests further changes just push them to your branch. The PR will be updated automatically.
  • Once the pull request is approved and merged you can pull the changes from upstream to your local repo and delete your extra branch(es).

Contact

Bord4 - bord4@bt.no

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

pakkenellik-0.1.11.tar.gz (27.5 kB view details)

Uploaded Source

Built Distribution

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

pakkenellik-0.1.11-py3-none-any.whl (28.9 kB view details)

Uploaded Python 3

File details

Details for the file pakkenellik-0.1.11.tar.gz.

File metadata

  • Download URL: pakkenellik-0.1.11.tar.gz
  • Upload date:
  • Size: 27.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.10.3 Darwin/22.6.0

File hashes

Hashes for pakkenellik-0.1.11.tar.gz
Algorithm Hash digest
SHA256 6eac8eaf0c1a9521dcb5c950401cf7259eb04d184f6573e46d2c6dc9fd56ebe3
MD5 06f5a58b2b034051d3b8cb4fd22cb17f
BLAKE2b-256 a13f1f35bb49cf0e338cc7f19cbb0fc2f6c2db99977384247948c9644b02fe96

See more details on using hashes here.

File details

Details for the file pakkenellik-0.1.11-py3-none-any.whl.

File metadata

  • Download URL: pakkenellik-0.1.11-py3-none-any.whl
  • Upload date:
  • Size: 28.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.10.3 Darwin/22.6.0

File hashes

Hashes for pakkenellik-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 05e3c219659380226652378f98ff52a336f3c334137c90308e2f77ef1c881113
MD5 4e78b4663e2ad8dace91c59146db7654
BLAKE2b-256 bc6f4cf944fa790b1703de1ecfe1098067d9c4dcda281019ee5f3d8082e196b4

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