diff --git a/.circleci/config.yml b/.circleci/config.yml index 03f71d0a..c953ae9f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,7 +5,7 @@ orbs: jobs: build: docker: - - image: 218546966473.dkr.ecr.us-east-1.amazonaws.com/circle-ci:stitch-tap-tester + - image: 218546966473.dkr.ecr.us-east-1.amazonaws.com/circle-ci:stitch-tap-tester-3-11-dev steps: - checkout - run: @@ -13,7 +13,7 @@ jobs: command: | python3 -mvenv /usr/local/share/virtualenvs/tap-github source /usr/local/share/virtualenvs/tap-github/bin/activate - pip install -U 'pip<19.2' 'setuptools<51.0.0' + pip install -U pip 'setuptools<51.0.0' pip install .[dev] - run: name: 'JSON Validator' @@ -24,14 +24,13 @@ jobs: name: 'pylint' command: | source /usr/local/share/virtualenvs/tap-github/bin/activate - pylint tap_github --disable 'missing-module-docstring,missing-function-docstring,missing-class-docstring,line-too-long,invalid-name,too-many-lines,consider-using-f-string,too-many-arguments,too-many-locals' + pylint tap_github --disable 'missing-module-docstring,missing-function-docstring,missing-class-docstring,line-too-long,invalid-name,too-many-lines,consider-using-f-string,too-many-arguments,too-many-locals,unnecessary-lambda-assignment' - run: name: 'Unit Tests' command: | source /usr/local/share/virtualenvs/tap-github/bin/activate - pip install nose coverage parameterized - nosetests --with-coverage --cover-erase --cover-package=tap_github --cover-html-dir=htmlcov tests/unittests - coverage html + pip install nose2 parameterized nose2[coverage_plugin]>=0.6.5 + nose2 --with-coverage -v -s tests/unittests when: always - store_test_results: path: test_output/report.xml diff --git a/CHANGELOG.md b/CHANGELOG.md index 44bf6504..ac97aab2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +# 3.1.0 + * Updates to run on python 3.11.7 [#201](https://github.com/singer-io/tap-github/pull/201) + # 3.0.0 * Allow all python versions to grab the correct key_properties/PK value [#199](https://github.com/singer-io/tap-github/pull/199) * Dependabot update [#193](https://github.com/singer-io/tap-github/pull/193) diff --git a/setup.py b/setup.py index e0c28ef3..37a05513 100644 --- a/setup.py +++ b/setup.py @@ -3,22 +3,22 @@ from setuptools import setup, find_packages setup(name='tap-github', - version='3.0.0', + version='3.1.0', description='Singer.io tap for extracting data from the GitHub API', author='Stitch', url='http://singer.io', classifiers=['Programming Language :: Python :: 3 :: Only'], py_modules=['tap_github'], install_requires=[ - 'singer-python==5.12.1', + 'singer-python==6.0.0', 'requests==2.31.0', - 'backoff==1.8.0' + 'backoff==2.2.1' ], extras_require={ 'dev': [ - 'pylint==2.6.2', + 'pylint==3.0.3', 'ipdb', - 'nose', + 'nose2', 'requests-mock==1.9.3' ] }, @@ -31,4 +31,4 @@ 'tap_github': ['tap_github/schemas/*.json'] }, include_package_data=True -) \ No newline at end of file +) diff --git a/tap_github/client.py b/tap_github/client.py index 9e846282..90a01568 100644 --- a/tap_github/client.py +++ b/tap_github/client.py @@ -277,7 +277,7 @@ def extract_repos_from_config(self): unique_repos = set() # Insert the duplicate repos found in the config repo_paths into duplicates - duplicate_repos = [x for x in repo_paths if x in unique_repos or (unique_repos.add(x) or False)] + duplicate_repos = [x for x in repo_paths if x in unique_repos or (unique_repos.add(x))] if duplicate_repos: LOGGER.warning("Duplicate repositories found: %s and will be synced only once.", duplicate_repos) diff --git a/tap_github/schema.py b/tap_github/schema.py index 6b65176c..b2790240 100644 --- a/tap_github/schema.py +++ b/tap_github/schema.py @@ -21,7 +21,7 @@ def load_schema_references(): refs = {} for shared_schema_file in shared_file_names: - with open(os.path.join(shared_schema_path, shared_schema_file)) as data_file: + with open(os.path.join(shared_schema_path, shared_schema_file), encoding='UTF-8') as data_file: refs['shared/' + shared_schema_file] = json.load(data_file) return refs @@ -37,7 +37,7 @@ def get_schemas(): for stream_name, stream_metadata in STREAMS.items(): schema_path = get_abs_path('schemas/{}.json'.format(stream_name)) - with open(schema_path) as file: + with open(schema_path, encoding='UTF-8') as file: schema = json.load(file) schemas[stream_name] = schema diff --git a/tap_github/streams.py b/tap_github/streams.py index 278dd05a..59ede0ba 100644 --- a/tap_github/streams.py +++ b/tap_github/streams.py @@ -125,7 +125,6 @@ def write_bookmarks(self, stream, selected_streams, bookmark_value, repo_path, s for child in stream_obj.children: self.write_bookmarks(child, selected_streams, bookmark_value, repo_path, state) - # pylint: disable=no-self-use def get_child_records(self, client, catalog,