Skip to content

Cubed Packages

The Cubed Packages repo is a container for all python based packages we can use across our different systems.

The project runs within a vagrant box, and uses Poetry to manage the python package, it's dependencies, and how it packages. We then use awscli to deploy to our AWS Code Artifact repository.

Poetry: https://python-poetry.org/docs/cli/

AWS CLI: https://docs.aws.amazon.com/codeartifact/latest/ug/getting-started-cli.html

AWS CLI Code Artifact: https://docs.aws.amazon.com/cli/latest/reference/codeartifact/index.html

First Time Startup

When you first run this project, Poetry needs to be started. To do, this go into the package you'd like to work on, for example:

cd /srv/packages/visit-generator

Then run: poetry update

You should get an output similar to this:

Updating dependencies
Resolving dependencies... (2.9s)

Writing lock file

Package operations: 14 installs, 0 updates, 0 removals

  • Installing typing-extensions (3.10.0.2)
  • Installing zipp (3.5.0)
  • Installing importlib-metadata (4.8.1)
  • Installing pyparsing (2.4.7)
  • Installing six (1.16.0)
  • Installing attrs (21.2.0)
  • Installing more-itertools (8.9.0)
  • Installing packaging (21.0)
  • Installing pluggy (0.13.1)
  • Installing py (1.10.0)
  • Installing python-dateutil (2.8.2)
  • Installing wcwidth (0.2.5)
  • Installing arrow (0.12.1)
  • Installing pytest (5.4.3)

Developing

You can develop a python package like a normal python module. Add the package dependencies into the .toml file, and follow Poetry's documentation on how to configure this.

You can setup and run pytests too, by using Poetry's run command:

cd /srv/packages/visit-generator

poetry run pytest