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

Custom configuration path does not work #201

Open
rernst opened this issue Aug 2, 2017 · 5 comments
Open

Custom configuration path does not work #201

rernst opened this issue Aug 2, 2017 · 5 comments
Assignees

Comments

@rernst
Copy link

rernst commented Aug 2, 2017

In #146 a flexible way declaring the configuration file location was implemented. Unfortunately, I can't get it to work.

This is how my (very simple) test script looks like:

from genologics import config

When I run this it immediately starts complaining about the missing config files.

/venv/lib/python2.7/site-packages/genologics/config.py:52: UserWarning: Please make sure you've created or indicated your own Genologics configuration file (i.e: ~/.genologicsrc) as stated in README.md
  warnings.warn("Please make sure you've created or indicated your own Genologics configuration file (i.e: ~/.genologicsrc) as stated in README.md")

I am using the latest (pip) version of the package. Any idea how to get this to work?

@Galithil
Copy link

Galithil commented Aug 4, 2017

Okay, can you tell me where is your configuration file located, so I can try to replicate the issue ?

@Galithil Galithil self-assigned this Aug 4, 2017
@rernst
Copy link
Author

rernst commented Aug 4, 2017 via email

@Galithil
Copy link

Galithil commented Aug 4, 2017

Yes, you can only use the api if you provide a valid configuration to connect to a LIMS instance. We allow this file to be placed in several predetermined locations.

I'm not quite sure what the issue is with this, could you explain your issue further ?

@rernst
Copy link
Author

rernst commented Aug 4, 2017 via email

@Galithil
Copy link

Galithil commented Aug 4, 2017

Interesting, as you noticed, that definitely won't work.
We do require a configuration file in one of the hardcoded locations.
If you want to overwrite that one and provide your own, you need to do it on top of the hardcoded one. I'm guessing that is how the Bigelow lab handles this.

I do not have an issue with allowing people to provide their own conf without using the default hardcoded ones, so if you're interested, you're welcome to put in a PR for that.

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

No branches or pull requests

2 participants