def update_pkg_v3( df: pd.DataFrame, user: str, package: str, parquet: str, registry: str, ): r""" Parameters ---------- df user package hash_key Returns ------- """ import quilt3 df.to_parquet(parquet) pkg_path = f'{user}/{package}' pkg = quilt3.Package.browse(pkg_path, registry=registry) pkg.set(parquet) quilt3.login() pkg.push(pkg_path)
def test_login(self, mock_login_with_token, mock_input, mock_open_url): quilt3.login() url = quilt3.session.get_registry_url() mock_open_url.assert_called_with(f'{url}/login') mock_login_with_token.assert_called_with('123456')
# Copyright 2020 (c) Netguru S.A. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import quilt3 from opoca.data.handler import set_up_quilt set_up_quilt() quilt3.login() print('Done')