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

Fix issue #2. Add singer message support #10

Merged
merged 6 commits into from
Oct 29, 2018
Merged

Fix issue #2. Add singer message support #10

merged 6 commits into from
Oct 29, 2018

Conversation

gris
Copy link
Contributor

@gris gris commented Aug 15, 2017

Also, I've removed some trailing whitespaces and made the code more compliant with pep8.

@gris
Copy link
Contributor Author

gris commented Aug 15, 2017

I've changed the readme because the target is not working without a virtualenv.

@gris
Copy link
Contributor Author

gris commented Aug 22, 2017

Closing this. Not enough support by the maintainers. A pity, singer seems like it could evolve to a great project in the long run.

Best regards.

@gris gris closed this Aug 22, 2017
@gris gris reopened this Oct 26, 2018
@timvisher
Copy link
Contributor

LOL. This is awesome. Thank you! :)

installation instructions for [Mac](python-mac) or
[Ubuntu](python-ubuntu).
installation instructions for [Mac] or
[Ubuntu].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoa. Was not aware of this Markdown feature. Is this GFM or Markdown proper? (Linking to a named ref without the trailing []).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually is just proper Markdown. Check this out https://github.com/adam-p/markdown-here/wiki/Markdown-Here-Cheatsheet#links

Copy link
Contributor

@timvisher timvisher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I hadn't seen the closed PR already! And sorry it took us so long to get to. FWIW Stitch has been changing how we managed open source activity internally of late so hopefully you should see much faster turn around times for contributions like this.

Back to you! :)

README.md Outdated

```bash
> virtualenv -p python3 venv
> source venv/bin/activate
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do;

python3 -m venv ~/.virtualenvs/target-csv
source ~/.virtualenvs/target-csv/bin/activate
pip install -U pip setuptools
pip install -e '.[dev]'

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that those are without the leading > . Makes it easier to copy/paste. :)

target_csv.py Outdated
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to keep the hashbang since the file's executable, although it could be changed to python.

input_messages = io.TextIOWrapper(sys.stdin.buffer, encoding='utf-8')
state = persist_messages(config.get('delimiter', ','),
config.get('quotechar', '"'),
input_messages)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you provide a gist showing that the output hasn't changed between this and master? That way the refactoring is nice and solid.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually if you install target-csv before a new tap, like tap-exchangeratesapi, it crashes, because target-csv now requires a specific outdated version of singer-python to work. I changed the code in setup.py to fix the problem. What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah. This comes up fairly regularly and I'm not sure exactly how to make it clearer. As is outlined in the Running and Developing guide, the intended way to run taps and targets is in separate virtual environments. This avoids issues exactly like you're describing. Our official stance on loose version requirements (as official as a comment on an issue can get!) shows our Java roots but we think ultimately yields a more sane development experience. :)

So my recommendation would be to reverse the setup.py change and maybe link to that getting started guide?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, done! I think the development experience may be a bit more sane, but for newcomers to the library is very difficult to use. I mean, a lot of python users don't even know how to use a single virtualenv, imagine using two, one for each library. The end user just suffer more than it is necessary in my opinion. Just food for thought.

Do you think it is necessary to show a gist?

@dmosorast
Copy link
Contributor

@joaomarcosgris Thanks for this! I've added an issue to update the README to clarify some of the virtual environment stuff (and update it to use tap-exchangeratesapi, which is the new tap-fixerio)

I'm running a quick local test with this and will be good to merge this PR after.

@dmosorast dmosorast dismissed timvisher’s stale review October 29, 2018 19:40

Ran through a local test and confirmed state was written appropriately. No gist necessary.

@dmosorast
Copy link
Contributor

Looks good! Merging. Thank you! Addresses #2

@dmosorast dmosorast merged commit cd86237 into singer-io:master Oct 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants