Closed zain-sohail closed 10 months ago
So we indeed have to change the repo name to something different (e.g sed-processor), if we want that as our distribution name. scikit's repo and package name differ but their repo name and distribution name (pypi name) are the same: https://github.com/scikit-learn/scikit-learn and https://pypi.org/project/scikit-learn/
@steinnymir @rettigl
Saying this after also experiementing and reading at many places and I couldn't figure out a way. Basically, the name in the pyproject.toml should correspond with where the pyproject.toml folder resides. In our case, sed.
If I understand, we need to rename the github repo to, say, sed-processor
. This renames our web page to https://github.com/OpenCOMPES/sed-processor
. Then the toml file will have sed-processor
as project name in it, and the pypi page would be https://pypi.org/project/sed-processor/
The internal folder can still be sed
and when we import, we do import sed.
is this correct?
to double check, i locally made necessary changes and pushed to test pypi
you can install by first setting up a new environment and then running
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ sed-processor
If I understand, we need to rename the github repo to, say,
sed-processor
. This renames our web page tohttps://github.com/OpenCOMPES/sed-processor
. Then the toml file will havesed-processor
as project name in it, and the pypi page would behttps://pypi.org/project/sed-processor/
The internal folder can still be
sed
and when we import, we do import sed. is this correct?
To answer your question, yes. I'd suggest you test it out too. The only problem with changing repo name is that everyone who has cloned the repo has to reset the url associated with it (not such a big issue I guess if we email everyone)
Let me understand again: You can make a pypi package even without having a repository or github at all, no? So the requirement whould be to the name of the folder where you check the repository out to, no? This you can very easily change for the build process, without changing the repository name...
The PyPi package isn't the problem but building is. Our package name in pyproject.toml should be same as our main directory. So for what I published on PyPi, it looks like this (additional metadata added. Using my github email till we find another, or someone else can suggest)
[tool.poetry]
name = "sed-processor"
packages = [
{include = "sed"}
]
version = "0.1.2"
description = "Single Event Data Frame Processor: Backend to handle photoelectron resolved datastreams"
authors = ["OpenCOMPES team <zainsohail04@gmail.com>"]
readme = "README.md"
repository = "https://github.com/OpenCOMPES/sed"
documentation = "https://opencompes.github.io/sed/"
keywords = ["sed", "mpes", "flash", "arpes"]
license = "MIT"
Now of course we can hack around in the workflow and change both dir name and name under tool.poetry only for building. But I find that really unintuitive. Would be confusing for future maintainers.
I don't see a problem. I think you can just do
and change the name in the project file. Seems more simple to me than chaning the repository name.
Ok I will try it out and inform how that goes
For that, create a github workflow that does it when tagged, and depends on all other workflows passing.