genomoncology / related

Nested Object Models in Python with dictionary, YAML, and JSON transformation support
MIT License
198 stars 15 forks source link

Tag the source #57

Closed fabaff closed 1 year ago

fabaff commented 1 year ago

On PyPI is only a wheel available. It would be very helpful if you could tag releases as well. This would enable distributions to build the module from the source.

Thanks

mweinelt commented 1 year ago

It would also be helpful if the source distribution would be uploaded to PyPi.

imaurer commented 1 year ago

@mweinelt Any docs that describe how this would be done?

Our setup file is here: https://github.com/genomoncology/related/blob/master/setup.py

The twine "publish" command I use is describe here: https://github.com/genomoncology/related/blob/master/Makefile#L39

Unfortunately the word "source" makes googling difficult. Happy to spend some time figuring things out, but would appreciate any tips.

imaurer commented 1 year ago

@fabaff does this help?

https://github.com/genomoncology/related/releases/tag/0.7.3

mweinelt commented 1 year ago

Using python -m build (https://pypi.org/project/build/) you get both a tar.gz (source distribution, or short sdist) as well as a .whl (binary distribution).

❯ python3 -m build
* Creating virtualenv isolated environment...
* Installing packages in isolated environment... (setuptools >= 40.8.0, wheel)
* Getting dependencies for sdist...
* Installing packages in isolated environment... (pytest-runner)
* Building sdist...
running sdist
running egg_info
creating src/related.egg-info
writing src/related.egg-info/PKG-INFO
writing dependency_links to src/related.egg-info/dependency_links.txt
writing requirements to src/related.egg-info/requires.txt
writing top-level names to src/related.egg-info/top_level.txt
writing manifest file 'src/related.egg-info/SOURCES.txt'
reading manifest file 'src/related.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files found matching '.travis.yml'
warning: no files found matching '.coveragerc'
warning: no files found matching 'conftest.py'
warning: no files found matching 'docs/Makefile'
warning: no files found matching '*.png' under directory 'docs'
warning: no files found matching '*.py' under directory 'docs'
no previously-included directories found matching 'docs/_build'
adding license file 'LICENSE'
writing manifest file 'src/related.egg-info/SOURCES.txt'
running check
creating related-0.7.3
creating related-0.7.3/src
creating related-0.7.3/src/related
creating related-0.7.3/src/related.egg-info
creating related-0.7.3/tests
creating related-0.7.3/tests/ex00_sets_hashes
creating related-0.7.3/tests/ex01_compose_v2
creating related-0.7.3/tests/ex02_compose_v3_2
creating related-0.7.3/tests/ex03_company
creating related-0.7.3/tests/ex04_contact
creating related-0.7.3/tests/ex05_field_names
creating related-0.7.3/tests/ex06_json
creating related-0.7.3/tests/ex07_serializer
creating related-0.7.3/tests/ex08_self_reference
creating related-0.7.3/tests/issues
copying files to related-0.7.3...
copying CHANGELOG.md -> related-0.7.3
copying LICENSE -> related-0.7.3
copying MANIFEST.in -> related-0.7.3
copying README.md -> related-0.7.3
copying dev-requirements.txt -> related-0.7.3
copying setup.cfg -> related-0.7.3
copying setup.py -> related-0.7.3
copying tox.ini -> related-0.7.3
copying src/related/__init__.py -> related-0.7.3/src/related
copying src/related/_init_fields.py -> related-0.7.3/src/related
copying src/related/converters.py -> related-0.7.3/src/related
copying src/related/decorators.py -> related-0.7.3/src/related
copying src/related/dispatchers.py -> related-0.7.3/src/related
copying src/related/fields.py -> related-0.7.3/src/related
copying src/related/functions.py -> related-0.7.3/src/related
copying src/related/types.py -> related-0.7.3/src/related
copying src/related/validators.py -> related-0.7.3/src/related
copying src/related.egg-info/PKG-INFO -> related-0.7.3/src/related.egg-info
copying src/related.egg-info/SOURCES.txt -> related-0.7.3/src/related.egg-info
copying src/related.egg-info/dependency_links.txt -> related-0.7.3/src/related.egg-info
copying src/related.egg-info/requires.txt -> related-0.7.3/src/related.egg-info
copying src/related.egg-info/top_level.txt -> related-0.7.3/src/related.egg-info
copying tests/test_types.py -> related-0.7.3/tests
copying tests/ex00_sets_hashes/__init__.py -> related-0.7.3/tests/ex00_sets_hashes
copying tests/ex00_sets_hashes/models.py -> related-0.7.3/tests/ex00_sets_hashes
copying tests/ex00_sets_hashes/test_sets_hashes.py -> related-0.7.3/tests/ex00_sets_hashes
copying tests/ex01_compose_v2/__init__.py -> related-0.7.3/tests/ex01_compose_v2
copying tests/ex01_compose_v2/models.py -> related-0.7.3/tests/ex01_compose_v2
copying tests/ex01_compose_v2/test_compose_v2.py -> related-0.7.3/tests/ex01_compose_v2
copying tests/ex02_compose_v3_2/__init__.py -> related-0.7.3/tests/ex02_compose_v3_2
copying tests/ex02_compose_v3_2/models.py -> related-0.7.3/tests/ex02_compose_v3_2
copying tests/ex02_compose_v3_2/test_compose_v3_2.py -> related-0.7.3/tests/ex02_compose_v3_2
copying tests/ex03_company/__init__.py -> related-0.7.3/tests/ex03_company
copying tests/ex03_company/models.py -> related-0.7.3/tests/ex03_company
copying tests/ex03_company/test_company.py -> related-0.7.3/tests/ex03_company
copying tests/ex04_contact/__init__.py -> related-0.7.3/tests/ex04_contact
copying tests/ex04_contact/models.py -> related-0.7.3/tests/ex04_contact
copying tests/ex04_contact/test_contact.py -> related-0.7.3/tests/ex04_contact
copying tests/ex05_field_names/test_renamed.py -> related-0.7.3/tests/ex05_field_names
copying tests/ex06_json/__init__.py -> related-0.7.3/tests/ex06_json
copying tests/ex06_json/models.py -> related-0.7.3/tests/ex06_json
copying tests/ex06_json/test_json.py -> related-0.7.3/tests/ex06_json
copying tests/ex07_serializer/__init__.py -> related-0.7.3/tests/ex07_serializer
copying tests/ex07_serializer/models.py -> related-0.7.3/tests/ex07_serializer
copying tests/ex07_serializer/test_serializer.py -> related-0.7.3/tests/ex07_serializer
copying tests/ex08_self_reference/__init__.py -> related-0.7.3/tests/ex08_self_reference
copying tests/ex08_self_reference/models.py -> related-0.7.3/tests/ex08_self_reference
copying tests/ex08_self_reference/test_self_reference.py -> related-0.7.3/tests/ex08_self_reference
copying tests/issues/test_issue_009.py -> related-0.7.3/tests/issues
copying tests/issues/test_issue_020.py -> related-0.7.3/tests/issues
copying tests/issues/test_issue_033.py -> related-0.7.3/tests/issues
Writing related-0.7.3/setup.cfg
Creating tar archive
removing 'related-0.7.3' (and everything under it)
* Building wheel from sdist
* Creating virtualenv isolated environment...
* Installing packages in isolated environment... (setuptools >= 40.8.0, wheel)
* Getting dependencies for wheel...
* Installing packages in isolated environment... (pytest-runner, wheel)
* Building wheel...
running bdist_wheel
running build
running build_py
creating build
creating build/lib
creating build/lib/related
copying src/related/validators.py -> build/lib/related
copying src/related/types.py -> build/lib/related
copying src/related/functions.py -> build/lib/related
copying src/related/fields.py -> build/lib/related
copying src/related/dispatchers.py -> build/lib/related
copying src/related/decorators.py -> build/lib/related
copying src/related/converters.py -> build/lib/related
copying src/related/_init_fields.py -> build/lib/related
copying src/related/__init__.py -> build/lib/related
running egg_info
writing src/related.egg-info/PKG-INFO
writing dependency_links to src/related.egg-info/dependency_links.txt
writing requirements to src/related.egg-info/requires.txt
writing top-level names to src/related.egg-info/top_level.txt
reading manifest file 'src/related.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files found matching '.travis.yml'
warning: no files found matching '.coveragerc'
warning: no files found matching 'conftest.py'
warning: no files found matching 'docs/Makefile'
warning: no files found matching '*.png' under directory 'docs'
warning: no files found matching '*.py' under directory 'docs'
no previously-included directories found matching 'docs/_build'
adding license file 'LICENSE'
writing manifest file 'src/related.egg-info/SOURCES.txt'
warning: build_py: byte-compiling is disabled, skipping.

installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/related
copying build/lib/related/__init__.py -> build/bdist.linux-x86_64/wheel/related
copying build/lib/related/_init_fields.py -> build/bdist.linux-x86_64/wheel/related
copying build/lib/related/converters.py -> build/bdist.linux-x86_64/wheel/related
copying build/lib/related/decorators.py -> build/bdist.linux-x86_64/wheel/related
copying build/lib/related/dispatchers.py -> build/bdist.linux-x86_64/wheel/related
copying build/lib/related/fields.py -> build/bdist.linux-x86_64/wheel/related
copying build/lib/related/functions.py -> build/bdist.linux-x86_64/wheel/related
copying build/lib/related/types.py -> build/bdist.linux-x86_64/wheel/related
copying build/lib/related/validators.py -> build/bdist.linux-x86_64/wheel/related
warning: install_lib: byte-compiling is disabled, skipping.

running install_egg_info
Copying src/related.egg-info to build/bdist.linux-x86_64/wheel/related-0.7.3-py3.10.egg-info
running install_scripts
adding license file "LICENSE" (matched pattern "LICEN[CS]E*")
creating build/bdist.linux-x86_64/wheel/related-0.7.3.dist-info/WHEEL
creating '/tmp/related/dist/tmpw1qku0e9/related-0.7.3-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'related/__init__.py'
adding 'related/_init_fields.py'
adding 'related/converters.py'
adding 'related/decorators.py'
adding 'related/dispatchers.py'
adding 'related/fields.py'
adding 'related/functions.py'
adding 'related/types.py'
adding 'related/validators.py'
adding 'related-0.7.3.dist-info/LICENSE'
adding 'related-0.7.3.dist-info/METADATA'
adding 'related-0.7.3.dist-info/WHEEL'
adding 'related-0.7.3.dist-info/top_level.txt'
adding 'related-0.7.3.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Successfully built related-0.7.3.tar.gz and related-0.7.3-py3-none-any.whl
❯ ls dist
related-0.7.3-py3-none-any.whl  related-0.7.3.tar.gz

Then point twine at the dist folder and it should upload both.

imaurer commented 1 year ago

Not sure if something went differently when I ran 0.7.3 previously, but I was able to get the source to publish this time:

https://pypi.org/project/related/0.7.3/#files

I check the other 0.7.# releases and the sources were there before.

Apologies for the confusion.