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

Make config file optional #29

Open
benmuth opened this issue Jul 1, 2024 · 1 comment · May be fixed by #30
Open

Make config file optional #29

benmuth opened this issue Jul 1, 2024 · 1 comment · May be fixed by #30

Comments

@benmuth
Copy link

benmuth commented Jul 1, 2024

pdf2doi currently reads or creates an INI file every time it's imported (in the __init__.py file). When used as a Python dependency in a Docker project, this file is created in the system-wide Python installation directory, causing permissions issues.

There might be a better workaround I'm not aware of, but to fix this, I'm just manually changing the permissions for the pdf2doi installation directory in the Dockerfile, to allow writing and execution, which is a bit of a hack. It's also for something not really necessary for my particular use case. I would be happy to just set the configuration in memory every time my script is run instead of having it be read from a file.

Would it be acceptable to make use of the config file optional, especially when used as a package instead of a standalone script? If this makes sense, I'd be willing to open a PR to implement it.

Thanks for the tool, it's very helpful :)

@MicheleCotrufo
Copy link
Owner

That sounds like a nice suggestion. I dont have much time to work on it in the next future, but you are very welcome to submit a PR! :)

@benmuth benmuth linked a pull request Jul 4, 2024 that will close this issue
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 a pull request may close this issue.

2 participants