where do you guys keep your repo for you custom ta...
# singer-taps
i
where do you guys keep your repo for you custom taps and how do you reference that tap in your meltano.yml plugins?
p
You can store them where ever you'd like really. As long as theyre pip installable. If theyre in a public repo then its usually easiest to install and helps the community too 😉 . If its in a private repo then you'll need to make sure you have access to that repo when you run your
meltano install
commands. You can reference git repos as pip urls in your meltano.yml using something like
git+<https://github.com/MeltanoLabs/tap-github.git@main>
or use a release tag at the end like
@v0.1.0
instead of
main
.
👍 1
I havent seen many people do this but honestly you can also put your taps directly in your meltano project itself if you want. This is our internal project called squared , you can see I built a custom utility that I just kept completely in the repo itself rather than having a standalone repo since it was pretty custom.
p
We put them directly in our meltano project in a
taps
directory and then you set the pip url like
pip_url: taps/my_tap
🙌 3
c
We put them in the meltano repo as well to facilitate the first few iterations, maybe will migrate to an external repo later on
a
@ptd how do you manage local development of the tap? I've been making separate repos with each of my forks, which works well for activiting the tap venv and testing via vscode. But I would rather they be in a single repo tbh, it would greatly simplify deployment.
Could I just run cookiecutter into the `taps/my_new_tap`directory and take it from there?
p
Yes, if you’re using cookiecutter your should be able to do that. If you want to do an editable install from your local, I think you can do that by making your pip url have an
-e
after it, but generally I do local development within the tap with tests/etc. then do
meltano install
to test with meltano
p
Interesting! Sounds like more people are storing them in their meltano project than I thought 💡
i
@ptd do you run the
meltano install
command within your meltano/taps/my_tap directory? or /taps? or /meltano? Or do you add it to the meltano.yml with the pip_url and then run "meltano install extractors" or something? does that override your local install each time? just trying to get a better understanding
r
For local development, I can also recommend
pip_url: -e tap
-> that way you don’t have to run
meltano install
after each change
👍 1
@Ian
meltano install
will install each known plugin into a completely separate installation under
.meltano/extractors
etc. So you run it once from your meltano project, so
/meltano
in your case, next to
meltano.yml
. It took me a while to realise it doesn’t really care where taps live. You can have them in the same repository, or I keep mine in a separate repository each