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

Ignore DB files in pyproject.toml build opts #109

Open
spwoodcock opened this issue Mar 26, 2023 · 3 comments
Open

Ignore DB files in pyproject.toml build opts #109

spwoodcock opened this issue Mar 26, 2023 · 3 comments
Labels
bug Something isn't working good first issue Issues that welcome contributions

Comments

@spwoodcock
Copy link
Member

spwoodcock commented Mar 26, 2023

During development it is useful to pip install odkconvert from a local directory.

If the user has downloaded files into the directory, e.g. a taginfo database, then the pip install takes a long time (as it includes GBs of data).

In the tool.pdm.build section for pyproject.toml we should have an excludes wildcard for .db and .sql files.

The install should then be tested to see if packaging time is still minimal.

@spwoodcock spwoodcock added bug Something isn't working good first issue Issues that welcome contributions labels Mar 26, 2023
@spwoodcock spwoodcock changed the title Ignore DB files in pyproject.toml package opts Ignore DB files in pyproject.toml build opts Mar 26, 2023
@mohammadareeb95
Copy link
Contributor

exclude = ["*.db", "*.sql"]

Then pip install -e . --no-cache-dir
to prevent it from using any cached files from previous installations. This will ensure that the package is built from scratch using the modified pyproject.toml file.

I think this should fix the issue. What do you think @spwoodcock ?

@robsavoye
Copy link
Collaborator

The smartest thing to do is not drop the huge taginfo database files file in the source tree, where pip tries to install them. which is what I unfortunately did. :-)

@spwoodcock
Copy link
Member Author

exclude = ["*.db", "*.sql"]

Then pip install -e . --no-cache-dir to prevent it from using any cached files from previous installations. This will ensure that the package is built from scratch using the modified pyproject.toml file.

I think this should fix the issue. What do you think @spwoodcock ?

That syntax would only exclude files in the root directory. In standard wildcard syntax we would need something like **.*.sql. However, I'm not certain if this is supported as docs for setuptools and pdm are a bit sparse.

In this case I would exclude from the odkconvert directory, where the scripts are:

excludes = ["odkconvert/*.db", "odkconvert/*.sql"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Issues that welcome contributions
Projects
None yet
Development

No branches or pull requests

3 participants