From 7e1475058e35b05cc1efc1eddc5e30f2bf477546 Mon Sep 17 00:00:00 2001 From: Bruno Date: Sat, 31 Aug 2024 14:12:27 +0000 Subject: [PATCH] refactor: some changes --- hubmigrate/MOCK_DATA.xlsx | Bin 0 -> 10690 bytes hubmigrate/classes/auth.py | 22 ++++++++----- hubmigrate/classes/migration.py | 5 +-- hubmigrate/cli.py | 53 ++++++++++++++++++++++++++++++++ hubmigrate/client.py | 1 + hubmigrate/requirements.txt | 3 +- hubmigrate/sample_company.json | 8 +---- hubmigrate/sample_company.xlsx | 2 -- 8 files changed, 74 insertions(+), 20 deletions(-) create mode 100644 hubmigrate/MOCK_DATA.xlsx create mode 100644 hubmigrate/cli.py delete mode 100644 hubmigrate/sample_company.xlsx diff --git a/hubmigrate/MOCK_DATA.xlsx b/hubmigrate/MOCK_DATA.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..6ff4c275192c3bac80c5dafa3ef556ba6dc3f4cc GIT binary patch literal 10690 zcmaKy1yG#Jn)e4CEVu=CclY4#1PCsJySuv+e1a34;O-h+g9UeY*APC=-mUN4le@b$ z)zi~e{eSAQ?)R;lpRybjG$sH5fCB))ImaL#>)FM(l?WsNfcQ2WIGNfwGc*15U6I(M z*vEntb}k^X^PFxc4VP!yMpCefN{3>I-W0p^Jpm)PT`&;J*a8ljU;FO$WxZ$l1>Njc zG*M6r>bM9-;z#YZBg@6YYDJ|{*Rs%5OrieHkK%GG3Nt7W?V;qcjT8bHUlH@T$Q=ID z5lyh71vP=R{nDN6s5>kHyLvdAGHdnNQ;MmVadtWa)LaMUlM>c_N0ZCw9j`J2HJ-n2 z03Q#OlY{kCS2IuJeJ`h_*1-x_AOau51H3`ul9;N%E_2oRx;}WirNM$0ldwfiGL2aB z=>W?O=Un+888{!w|2_l(0Kmfl0Po&1;9dfR}Yg71f*=mIa)%RQz&R5vf zHeDEJR2ec%6a!&c%%H*A({`#~+Nt{b_PtCcqnKFgEXubZi_Q}^9axMINfHJ3zHN2J( zY@#g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