Skip to content

This repo is used as a wastebasket for general workflows and scripts that the tariff team need as part of our release and other processes

Notifications You must be signed in to change notification settings

trade-tariff/trade-tariff-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

trade-tariff-tools

This repo is used as a wastebasket for general workflows and scripts that the tariff team need as part of our release and other processes.

bin/fetch-commodities

In order to run this script you will need the requests library and a relatively recent version of python (I'm on 3.11.4)

I installed requests by running:

pip install requests

Update the commodities.txt file with your commodities

And run the script with:

./fetch-commodities

In VScode for windows you should be able to right click the python file and hit run

This should print a markdown table you can copy into your Stop Press Notice

For example, this will produce:

Commodity Code Description
3824999214 Other
1516209831 Consigned from the United Kingdom
1516209822 Consigned from the United Kingdom
1516209823 Consigned from China
1516209832 Consigned from China
1518009122 Consigned from the United Kingdom
1518009123 Consigned from China
1518009131 Consigned from the United Kingdom

bin/ecsexec.sh

Script to get an ECS Exec shell up on the AWS environment you are currently in. By default it will start a rails console

Its intended copied to the AWS Console where there are limited shell tools but will probably work fine locally with AWS Session Manager

ecsexec.sh <service> [<command>]

eg, to get a rails console for the XI service

ecsexec.sh xi

eg, to start a bash shell for the UK service

ecsexec.sh uk sh

eg, to run a rake task for XI

ecsexec.sh xi "bundle exec rake tariff:jobs"

About

This repo is used as a wastebasket for general workflows and scripts that the tariff team need as part of our release and other processes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published