Package: pakkenellik
Pakkenellik: Bord4's swiss army knife for python projectsTable of ContentsAbout The ProjectRequirementsStructureGetting StartedPrerequisitesInstallationUsageContributingContactAbout The ProjectPakkenellik 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 thecookiecutter-bord4-analysisproject andbord4-analysis-templatesInspiration for the makefile and potery-file is taken from Johannes Schmidt's series"Setting up Python Projects"InstallationRequires Python 3.10 or later.pipinstallpakkenellikor using pipenv:pipenvinstallpakkenellikor using poetry:poetryaddpakkenellikUsageThere are a heap of functions for you to use. Enjoy.Local developmentRequirementspyenv - manage python versionspoetry - manage python dependenciesTo install on mac you can use homebrew:brewupgrade
brewinstallpyenvYou can either install poetry with homebrew or the way described in thedocumentationMakefile commandsmake lintlint the code in the src folder with black, isort and flake8. Mypy will check for correct typing.make formatformat 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.editorconfigConfiguration file for editorconfig..flake8Configuration file for flake8.pyproject.tomlConfiguration file for poetry. Mypy and isort is configured here.README.mdThis file.pakkenellikThe package. It has the following subpackages:awsutil functions for working with AWSconfigconfiguration functions that helps with adhering to bord4's folder structure and help with common urls.dataframeutil functions for working with dataframesintegrationhelper functions when working with Schibsted MM APIlogbetter log functionsvegvesenFunctions to work with Vegvesenet's VisVegen APIUsageTo install the package in your project runpoetryaddpakkenellikContributingDo you have write permissions to the repo? Then you can clone this project to a folder on your computer.gitclonehttps://github.com/BergensTidende/pakkenellik.gitIf 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 calledorigin.Add the original repository as a remote calledupstream.If you created your fork a while ago be sure to pull upstream changes into your local repository.This will clone the repo intopakkenellik.Create a branch for your changesgitcheckout-bname-of-branchMake 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'sinteractive rebase. Create a new branch if necessary.Push your branch to your fork on Github, the remoteorigin.From your fork open a pull request in the correct branch. Target the project'sdevelopbranch if there is one, else go formaster!…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 fromupstreamto your local repo and delete
your extra branch(es).ContactBord4 -bord4@bt.no