Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for python 3.11 #201

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ 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:
name: 'Setup virtual env'
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'
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
12 changes: 6 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
]
},
Expand All @@ -31,4 +31,4 @@
'tap_github': ['tap_github/schemas/*.json']
},
include_package_data=True
)
)
2 changes: 1 addition & 1 deletion tap_github/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions tap_github/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion tap_github/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down