Skip to content

Add /adbc/drivers/.gitignore #80

Closed

Description

@ianmcook

When dbc first creates the /adbc/drivers directory in a location determined by the environment (ADBC_DRIVER_PATH, VIRTUAL_ENV, or CONDA_PREFIX), create a .gitignore file in it containing * to prevent Git from tracking dbc-installed driver files.

Activity

  1. amoeba commented on Sep 23, 2025

    @amoeba
    Member

    Could you sketch this out a bit more explicitly? I'm not sure I understand. Are you talking about a scenario where $ADBC_DRIVER_PATH is pointing to a directory under a git root? Some steps to show the behavior you're talking about would help.

  2. ianmcook commented on Sep 23, 2025

    @ianmcook
    MemberAuthor

    This is motivated by seeing that uv init does something similar to prevent Git from tracking the package files that it installs in .venv:

    $ mkdir myproj
    
    $ cd myproj
    
    $ uv init
    Initialized project `myproj`
    
    $ ls -a
    .		..		.git		.gitignore	.python-version	main.py		pyproject.toml	README.md
    
    $ more .gitignore 
    # Python-generated files
    __pycache__/
    *.py[oc]
    build/
    dist/
    wheels/
    *.egg-info
    # Virtual environments
    .venv

    Notice the last line in the .gitignore, which prevents Git from tracking everything in .venv. uv creates this .gitignore file irrespective of whether you're working in a Git repo.

    I think it will be relatively common for dbc users to run dbc install or dbc sync to install drivers in project environments tracked by Git. (Either that already are tracked by Git or that will later be tracked by Git.) Adding this .gitignore seems like a good use of a few bytes on disk to prevent the dbc-installed drivers from being tracked when a user does git add . and to prevent noise in git status.

  3. added
    idea
    on Sep 23, 2025
  4. amoeba commented on Sep 23, 2025

    @amoeba
    Member

    Interesting. I didn't understand at first (reading comprehension) but now see the trick that's involved with your suggestion. uv venv creates ./.venv/.gitignore with * in it. Seems like a solid idea to me.

  5. added this to the 0.1 milestone on Sep 23, 2025
  6. self-assigned this
    on Sep 23, 2025
  7. changed the title [-]Idea: Add `/adbc/drivers/.gitignore`[/-] [+]Add `/adbc/drivers/.gitignore`[/+] on Sep 24, 2025
  8. added
    enhancement
    and removed
    idea
    on Sep 24, 2025
  9. modified the milestones: 0.1, 0.0.1 on Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions