Skip to content

gidsg/copilot-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

227 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Copilot Tools

Using the dbt-copilot-tools package

See the package documentation for detail on what the package is and how to use it.

If you are migrating a service to DBT PaaS, GOV.UK PaaS to DBT PaaS Migration will also be relevant for you.

Contributing to the dbt-copilot-tools package

Getting started

  1. Clone the repository:

    git clone https://github.com/uktrade/copilot-tools.git && cd copilot-tools
    
  2. Install the required dependencies:

    pip install poetry && poetry install && poetry run pre-commit install
    

Testing

Run poetry run pytest in the root directory to run all tests.

Or, run poetry run tox in the root directory to run all tests for multiple Python versions. See the tox configuration file.

This Dockerfile is used to create a Docker image that supports multiple versions of Python runtimes via pyenv. The tox configuration file determines the Python versions to be tested against.

Adding a Python version

Add the Python version(s) to Dockerfile.test and tox.ini.

Run docker build -f Dockerfile.test -t alpine/python . to build the image.

For Platform developers, the push commands can be found in AWS ECR.

Publishing

To publish the Python package dbt-copilot-tools, you will need an API token.

  1. Acquire API token from Passman.
    • Request access from the SRE team.
    • Note: You will need access to the platform group in Passman.
  2. Run poetry config pypi-token.pypi <token> to add the token to your Poetry configuration.

Update the version, as the same version cannot be published to PyPi.

poetry version patch

More options for the version command can be found in the Poetry documentation. For example, for a minor version bump: poetry version minor.

Build the Python package.

poetry build

Publish the Python package.

Note: Make sure your Pull Request (PR) is approved and contains the version upgrade in pyproject.toml before publishing the package.

poetry publish

Check the PyPi Release history to make sure the package has been updated.

For an optional manual check, install the package locally and test everything works as expected.

About

Tooling to assist with setting up and managing AWS copilot infrastructure

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages