repo
stringclasses
454 values
file_path
stringlengths
5
201
extension
stringclasses
1 value
content
stringlengths
8
509k
num_lines
int64
3
16.9k
size_bytes
int64
8
511k
luigi
test/choice_parameter_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
63
2,252
luigi
test/numerical_parameter_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
98
4,234
luigi
test/subtask_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
59
1,449
luigi
test/mypy_test.py
.py
import sys import tempfile import unittest from mypy import api def _run_mypy(test_code: str): with tempfile.NamedTemporaryFile(suffix=".py") as test_file: test_file.write(test_code.encode("utf-8")) test_file.flush() return api.run( [ "--no-incremental", ...
231
7,089
luigi
test/db_task_history_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
179
7,367
luigi
test/worker_external_task_test.py
.py
# Copyright (c) 2015 # # 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 # d...
196
6,493
luigi
test/worker_parallel_scheduling_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
194
6,615
luigi
test/notifications_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
864
33,147
luigi
test/instance_wrap_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
100
2,989
luigi
test/event_callbacks_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
320
10,087
luigi
test/server_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
524
21,523
luigi
test/config_toml_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2018 Vote inc. # # 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 ag...
87
3,011
luigi
test/_test_ftp.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
232
7,293
luigi
test/helpers.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
235
7,540
luigi
test/optional_parameter_test.py
.py
import datetime import warnings import mock from helpers import LuigiTestCase, with_config import luigi class OptionalParameterTest(LuigiTestCase): def actual_test(self, cls, default, expected_value, expected_type, bad_data=None, **kwargs): class TestConfig(luigi.Config): param = cls(defaul...
148
7,729
luigi
test/worker_multiprocess_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
114
3,589
luigi
test/util_previous_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
185
6,493
luigi
test/hdfs_client_test.py
.py
import itertools import threading import unittest from luigi.contrib.hdfs import get_autoconfig_client class HdfsClientTest(unittest.TestCase): def test_get_autoconfig_client_cached(self): original_client = get_autoconfig_client() for _ in range(100): self.assertIs(original_client, ge...
29
858
luigi
test/scheduler_visualisation_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
594
19,875
luigi
test/recursion_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
52
1,547
luigi
test/decorator_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
390
10,651
luigi
test/task_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
591
20,114
luigi
test/customized_run_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
128
3,990
luigi
test/custom_metrics_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2017 Spotify AB # # 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...
107
3,638
luigi
test/task_register_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2017 VNG Corporation # # 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...
56
1,760
luigi
test/retcodes_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2015-2015 Spotify AB # # 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...
193
6,723
luigi
test/set_task_name_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
44
1,215
luigi
test/scheduler_api_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
2,202
107,064
luigi
test/clone_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
87
2,277
luigi
test/test_sigpipe.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
97
2,858
luigi
test/local_target_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
358
11,343
luigi
test/conftest.py
.py
import multiprocessing import sys from typing import List import pytest import luigi.task_register if sys.version_info >= (3, 14): # Set the multiprocessing start method to "fork" for tests to avoid pickling issues. # Before 3.14, the default start method was "fork" on Unix-like systems, but it # changed...
45
1,765
luigi
test/auto_namespace_test/__init__.py
.py
import luigi luigi.auto_namespace(scope=__name__)
4
51
luigi
test/auto_namespace_test/my_namespace_test.py
.py
from helpers import LuigiTestCase import luigi class MyNamespaceTest(LuigiTestCase): def test_auto_namespace_scope(self): class MyTask(luigi.Task): pass self.assertTrue(self.run_locally(["auto_namespace_test.my_namespace_test.MyTask"])) self.assertEqual(MyTask.get_task_namesp...
13
368
luigi
test/visualiser/visualiser_test.py
.py
""" Test the visualiser's javascript using PhantomJS. """ import os import subprocess import sys import threading import time import unittest from selenium import webdriver import luigi here = os.path.dirname(__file__) # Patch-up path so that we can import from the directory above this one.r # This seems to be ne...
442
14,943
luigi
test/contrib/postgres_with_server_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
172
5,422
luigi
test/contrib/salesforce_test.py
.py
# -*- coding: utf-8 -*- # # Copyright (c) 2016 Simply Measured # # 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...
117
3,730
luigi
test/contrib/opener_test.py
.py
import random import unittest import mock import pytest import luigi from luigi.contrib.opener import NoOpenerError, OpenerTarget from luigi.local_target import LocalTarget from luigi.mock import MockTarget @pytest.mark.contrib class TestOpenerTarget(unittest.TestCase): def setUp(self): MockTarget.fs.cl...
109
3,807
luigi
test/contrib/mysqldb_test.py
.py
import datetime import mock import pytest from helpers import unittest import luigi.contrib.mysqldb from luigi.tools.range import RangeDaily def datetime_to_epoch(dt): td = dt - datetime.datetime(1970, 1, 1) return td.days * 86400 + td.seconds + td.microseconds / 1e6 class MockMysqlCursor(mock.Mock): ...
120
4,411
luigi
test/contrib/redshift_test.py
.py
# Copyright 2012-2015 Spotify AB # # 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, ...
605
24,293
luigi
test/contrib/batch_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2018 Outlier Bio, LLC # # 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 la...
106
4,124
luigi
test/contrib/ecs_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2015 Outlier Bio, LLC # # 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 la...
187
6,488
luigi
test/contrib/kubernetes_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2015 Outlier Bio, LLC # # 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 la...
99
3,417
luigi
test/contrib/hdfs_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
265
9,498
luigi
test/contrib/redis_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
68
2,043
luigi
test/contrib/external_program_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2016 Spotify AB # # 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...
343
12,510
luigi
test/contrib/cascading_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
73
2,770
luigi
test/contrib/bigquery_gcloud_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2015 Twitter Inc # # 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 ...
529
20,810
luigi
test/contrib/datadog_metric_test.py
.py
# -*- coding: utf-8 -*- import time import mock from helpers import unittest from luigi.contrib.datadog_metric import DatadogMetricsCollector from luigi.metrics import MetricsCollectors from luigi.scheduler import Scheduler WORKER = "myworker" class DatadogMetricTest(unittest.TestCase): def setUp(self): ...
139
5,218
luigi
test/contrib/mongo_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2017 Big Datext Inc # # 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 ...
263
9,862
luigi
test/contrib/presto_test.py
.py
import unittest import mock from pyhive.exc import DatabaseError from pyhive.presto import Connection, Cursor from luigi.contrib.presto import PrestoClient, PrestoTarget, PrestoTask class WithPrestoClientTest(unittest.TestCase): def test_creates_client_with_expected_params(self): # arrange class...
206
6,404
luigi
test/contrib/hadoop_jar_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
115
3,773
luigi
test/contrib/_webhdfs_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
66
2,104
luigi
test/contrib/esindex_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
314
11,522
luigi
test/contrib/pig_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
241
7,586
luigi
test/contrib/bigquery_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2019 Spotify AB # # 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 a...
168
6,164
luigi
test/contrib/scalding_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
66
2,084
luigi
test/contrib/external_daily_snapshot_test.py
.py
# Copyright (c) 2013 Spotify AB # # 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, s...
51
2,059
luigi
test/contrib/hadoop_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
501
18,197
luigi
test/contrib/postgres_test.py
.py
# Copyright (c) 2015 Spotify AB # # 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, s...
187
6,702
luigi
test/contrib/test_ssh.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
256
8,459
luigi
test/contrib/bigquery_avro_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2019 Spotify AB # # 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 a...
51
1,617
luigi
test/contrib/azureblob_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2018 Microsoft Corporation # # 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 applicab...
183
6,413
luigi
test/contrib/dataproc_test.py
.py
"""This is an integration test for the Dataproc-luigi binding. This test requires credentials that can access GCS & access to a bucket below. Follow the directions in the gcloud tools to set up local credentials. """ import unittest try: import google.auth from googleapiclient import discovery from luig...
169
6,362
luigi
test/contrib/hive_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
468
19,164
luigi
test/contrib/s3_test.py
.py
# -*- coding: utf-8 -*- # # Copyright (c) 2013 Mortar Data # # 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...
644
25,981
luigi
test/contrib/beam_dataflow_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2019 Spotify AB # # 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 a...
339
12,065
luigi
test/contrib/sge_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
101
3,428
luigi
test/contrib/dropbox_test.py
.py
import bz2 import os import tempfile import unittest import uuid from datetime import datetime import pytest import luigi from luigi.format import NopFormat try: import dropbox import dropbox.exceptions from luigi.contrib.dropbox import DropboxClient except ImportError: raise unittest.SkipTest("Drop...
361
16,498
luigi
test/contrib/sqla_test.py
.py
# -*- coding: utf-8 -*- # # Copyright (c) 2015 Gouthaman Balaraman # # 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 applic...
394
14,116
luigi
test/contrib/gcs_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2015 Twitter Inc # # 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 ...
280
11,597
luigi
test/contrib/streaming_test.py
.py
import os import unittest import mock import pytest from luigi import Parameter from luigi.contrib import mrrunner from luigi.contrib.hadoop import HadoopJobRunner, JobTask from luigi.contrib.hdfs import HdfsTarget class MockStreamingJob(JobTask): package_binary = Parameter(default=None) def output(self): ...
84
3,118
luigi
test/contrib/spark_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
435
16,399
luigi
test/contrib/prometheus_metric_test.py
.py
import pytest from helpers import unittest from prometheus_client import CONTENT_TYPE_LATEST from luigi.contrib.prometheus_metric import PrometheusMetricsCollector from luigi.metrics import MetricsCollectors from luigi.scheduler import Scheduler try: from unittest import mock except ImportError: import mock ...
111
3,817
luigi
test/contrib/pai_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2017 Open Targets # # 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...
92
3,297
luigi
test/contrib/docker_runner_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2017 Open Targets # # 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...
166
4,707
luigi
test/contrib/lsf_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
104
3,085
luigi
test/contrib/rdbms_test.py
.py
# Copyright 2012-2015 Spotify AB # # 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, ...
209
10,214
luigi
test/contrib/hdfs/webhdfs_client_test.py
.py
# -*- coding: utf-8 -*- # # Copyright 2015 VNG Corporation # # 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...
39
1,333
luigi
examples/dynamic_requirements.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
111
3,733
luigi
examples/spark_als.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
147
4,363
luigi
examples/wordcount_hadoop.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
89
2,728
luigi
examples/kubernetes.py
.py
# -*- coding: utf-8 -*- # # Copyright 2015 Outlier Bio, LLC # # 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 la...
59
1,924
luigi
examples/ssh_remote_execution.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
87
2,721
luigi
examples/top_artists.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
267
8,851
luigi
examples/wordcount.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
80
2,905
luigi
examples/pyspark_wc.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
108
3,360
luigi
examples/elasticsearch_index.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
116
3,370
luigi
examples/per_task_retry_policy.py
.py
# -*- coding: utf-8 -*- """ You can run this example like this: .. code:: console $ luigi --module examples.per_task_retry_policy examples.PerTaskRetryPolicy --worker-keep-alive \ --local-scheduler --scheduler-retry-delay 5 --logging-conf-file test/testconfig/logging.cfg ......
161
5,236
luigi
examples/ftp_experiment_outputs.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
104
3,239
luigi
examples/terasort.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
109
3,267
luigi
examples/foo.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
60
1,463
luigi
examples/top_artists_spark.py
.py
# -*- coding: utf-8 -*- import operator import sys from pyspark.sql import SparkSession def main(argv): input_paths = argv[1].split(",") output_path = argv[2] spark = SparkSession.builder.getOrCreate() streams = spark.read.option("sep", "\t").csv(input_paths[0]) for stream_path in input_paths[...
27
623
luigi
examples/execution_summary_example.py
.py
# -*- coding: utf-8 -*- # # Copyright 2015-2015 Spotify AB # # 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...
118
3,319
luigi
examples/hello_world.py
.py
""" You can run this example like this: .. code:: console $ luigi --module examples.hello_world examples.HelloWorldTask --local-scheduler If that does not work, see :ref:`CommandLine`. """ import luigi class HelloWorldTask(luigi.Task): task_namespace = "examples" def run(self): pr...
23
501
luigi
examples/foo_complex.py
.py
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
77
1,877
notebook
setup.py
.py
# setup.py shim for use with versions of JupyterLab that require # it for extensions. __import__("setuptools").setup()
4
119
notebook
ui-tests/test/jupyter_server_config.py
.py
from typing import Any from jupyterlab.galata import configure_jupyter_server c: Any c.JupyterNotebookApp.expose_app_in_browser = True configure_jupyter_server(c)
9
166
notebook
tests/test_app.py
.py
import os import pytest from jupyter_server.serverapp import flags as serverapp_flags from tornado.httpclient import HTTPClientError from notebook.app import JupyterNotebookApp, NotebookHandler, TreeHandler @pytest.fixture def notebooks(jp_create_notebook, notebookapp): nbpaths = ( "notebook1.ipynb", ...
113
3,217
notebook
tests/conftest.py
.py
import glob import json import os import os.path as osp import pathlib import shutil from importlib.resources import files import pytest from notebook.app import JupyterNotebookApp pytest_plugins = ["jupyter_server.pytest_plugin"] def mkdir(tmp_path, *parts): path = tmp_path.joinpath(*parts) if not path.ex...
135
4,365