Publish on PyPI
Hello @arjendeetman,
I'm one of the GEMSEO developers, would it be possible to publish this package on PyPI? This would make it easier for other published packages to use your package as a dependency without having to copy it internally.
Cheers.
Hi @AntoineD,
That would be possible. I will look into it.
Best,
Arjen
Hi @AntoineD,
I pushed it to the test environment. It is available at: https://test.pypi.org/project/gcmma-mma-python/
Install via:
pip install -i https://test.pypi.org/simple/ gcmma-mma-python
Import with:
import mma
The methods asymp, concheck, gcmmasub, kktcheck, mma, mmasub, raaupdate, subsolv are available.
This is the first time I've made a PyPi package. Would you be willing to have a look and check it? If everything is fine, I will remove it from the test environment and push it to the real PyPi index.
Best,
Arjen
Thank you very much!
I find it surprising that the package and the importable module have different names, would it be possible to name the package like the module (mma)?
The copy of mma.py used in gemseo-mma added the ability to set some of the hard coded constants, would you accept to add optional arguments to some of the functions (while keeping the same default behavior)?
I'd be happy to make a PR for both of these, please let me know.
Cheers.
Hi @AntoineD,
I am a bit unsure about the module name. I want to keep the package name the same since people know it by this name (it has been with this name since 2019 on GitHub). I find the style guide a bit confusing since it says that underscores are allowed, but they are discouraged. I would result in import gcmma_mma_python or import gcmma_mma. I made it import mma to keep it as simple and short as possible. Is this a thing since I don't see the issue here?
Did you mean these constants?
external_move_limit = 0.01
internal_limit = 10.0
asyinit = 0.5
asyincr = 1.2
asydecr = 0.7
We would then need to add it to mmasub and asymp (for gcmma). I can add them, or you can make a PR, if you prefer.
Best,
Arjen
I think that suffixing with python is redundant and seems spurious since we are in the python world here.
Naming the package distribution gcmma-mma (the normalized naming should use -) or mma is fine for me as long as it matches the name of what users import.
Yes these are the constants in question. I would prefer that you add them and choose a naming that suits you.
Thank you for sharing the link. I will try to change this the coming week and push it to PyPi after.
@AntoineD I just made a new release. The optional arguments are available now. I also added raa0 and albefa as optional arguments. Svanberg wrote in his paper that 'all these values can be carefully changed by the user' so I added these as well.
I named the package mmapy (mma is already used): pip install mmapy and import mmapy