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

Default file for aliases #258

Open
jgbarah opened this issue Nov 20, 2018 · 9 comments
Open

Default file for aliases #258

jgbarah opened this issue Nov 20, 2018 · 9 comments
Assignees

Comments

@jgbarah
Copy link
Contributor

jgbarah commented Nov 20, 2018

Recently, SirMordred needs a new configuration file, the alias file. Since in most deployments it would be always the same, would it be possible to have it as a default file, so that if none is specified in the .cfg file, it is used? If you want, I can produce a pull request with this...

@valeriocos
Copy link
Member

@jgbarah thank you for opening the issue.

Mordred has already something similar. As you can see at: https://github.com/chaoss/grimoirelab-sirmordred/blob/master/sirmordred/config.py#L157, the aliases_file param is optional and by default is set to aliases.json which is included in the Sirmordred repo

Does it answer your issue?

@jgbarah
Copy link
Contributor Author

jgbarah commented Nov 22, 2018

Ohh. Yes, I think so, if that means that if set no parameter, that would be applied. But I'm afraid that's not the case... Yesterday I saw it failed if aliases_file is not in the config file. If you have reasons to believe it should work that way, I will check again, just in case I'm wrong.

@sduenas
Copy link
Member

sduenas commented Nov 29, 2018

The behaviour is as Valerio says. By default, Mordred will fail if the aliases file is not found in the same place where Mordred is running.

@sduenas sduenas closed this as completed Nov 29, 2018
@jgbarah
Copy link
Contributor Author

jgbarah commented Nov 29, 2018

OK, let me reframe what I intended, because maybe it was not understood. What I was commenting is that if the SirMordred package is shipped with a default aliases.json file, and by default, if no aliases_file option is found in the configuration file, that default file is used.

That way, the naive user can have the default aliases built without needing to specify anything at all.

Currently, if there is aliases_file option, SirMorded fails except if the user provides an aliases.json file in the same directory. But if the user knows about that file, likely knows about the option too. So, it doesn't help a lot to have a simpler config file.

What do you think about this approach? (I could write a pull request to implement it, if you find it reasonable in principle).

@jgbarah jgbarah reopened this Nov 29, 2018
@sduenas
Copy link
Member

sduenas commented Dec 20, 2018

Sorry for my late reply.

Yes, let's do that. Include both files in the package. Can you provide a PR, @jgbarah ?

@jgbarah
Copy link
Contributor Author

jgbarah commented Dec 20, 2018

I'll do asap. Thanks!

@valeriocos
Copy link
Member

valeriocos commented Jan 18, 2019

can we close this issue @jgbarah @sduenas ?

@jgbarah
Copy link
Contributor Author

jgbarah commented Jan 18, 2019

I'd like to keep this here so I don't forget to write the pull request ,-)

@sduenas sduenas closed this as completed Jan 21, 2019
@sduenas sduenas reopened this Jan 21, 2019
@canasdiaz
Copy link
Contributor

Is this done @jgbarah , do u need help with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants