Skip to content
This repository has been archived by the owner on Jul 13, 2021. It is now read-only.

rename API modules -- finally #187

Open
AloisMahdal opened this issue Dec 6, 2016 · 3 comments
Open

rename API modules -- finally #187

AloisMahdal opened this issue Dec 6, 2016 · 3 comments

Comments

@AloisMahdal
Copy link
Collaborator

Currently, we have two ports of upgrade module API:

  • preupg.script_api - a Python port,

  • common.sh - a Bash port.

Neither of names used here is good.

Whatever context these names might be encountered in (read: existing modules, man pages, our docs, our trackers), terms "API", "script" and "common" are all already implied. In fact, they are implied by almost any (Python) programming context: any Python or Bash programs can be called "scripts", Python module or a sourced Bash file already is an API and any API is "common" by definition.

We need to come up with better, usable and final name.

Following is what should be considered for the debate:

  • In future, we might want to expose outer preupgrade-assistant API (eg. to allow people write Ansible modules). That is, we might want to reserve preupg for that.

  • Name should be brief but specific.

  • Name should be informative, i.e. not include obvious words as mentioned above.

@AloisMahdal
Copy link
Collaborator Author

One name I was thinking about is upm. This is based on the idea that if what preupgrade-assistant employs here is called "upgrade path", then the element forming that could be called "upgrade path module", ie. UPM.

That would mean:

#!/usr/bin/python
import preupg.upm
preupg.upm.debug("hello")
preupg.upm.exit('informational')

and

#!/bin/bash
. /usr/share/preupg/preupg_upm.sh
preupg_upm_debug hello
preupg_upm_exit informational

or (depending on output of discussions in #186):

#!/bin/bash
. /usr/share/preupg/preupg_upm.sh
upm_debug hello
upm_exit informational

@AloisMahdal
Copy link
Collaborator Author

7am brainstorming: upathm, preupm, preupgm, preupgmod...

@AloisMahdal
Copy link
Collaborator Author

AloisMahdal commented Dec 6, 2016

We had a meetng with @bocekm and @jmazanek today.

Result: preupgm it is!

Also, It will live separately from current preupg Python package, ie. import preupgm, not import preupg.preupgm.

@AloisMahdal AloisMahdal added this to the el610toel75b0 milestone Apr 4, 2018
@bocekm bocekm removed this from the el610toel75b0 milestone Apr 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants