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

fix: bloating of sdists by setuptools-scm #195

Merged
merged 4 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .readthedocs_conda_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies:
- sphinx=3.0.4
- pytest
- pytest-cov
- importlib-metadata
- numpy
- pybedtools
- matplotlib-base
Expand Down
5 changes: 0 additions & 5 deletions MANIFEST.in

This file was deleted.

7 changes: 4 additions & 3 deletions PUBLISHING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,19 @@ Once changes have been made to develop that are ready to be published, first cho
Then go through the steps of merging the changes into the master branch:

#. Run :code:`pytest` and make sure all the tests pass. Then run :code:`./test/cmdline_tests.sh` and make sure those tests pass.
#. Update the version number listed in the :code:`pyproject.toml` file.
#. Change the 'Unreleased Changes' section of :code:`RELEASE_NOTES.rst` to the new version number.
#. Check if any changes have been made that have not yet been documented in the release notes. If so, document them.
#. Submit a pull request from develop into master on the github webiste.
#. Submit a pull request from develop into master on the github website.
#. If the code review checks pass, merge the pull request.
#. Tag the merge commit with the package version in vX.Y.Z format. (For more details on tagging, see `below`)

Then go through the steps of publishing the changed code to PyPI:

1. :code:`cd` into the root of your clone of the trtools repo, checkout master and pull the latest change. Note that the most recent commit *must* be tagged.
1. :code:`cd` into the root of your clone of the trtools repo, checkout master and pull the latest change. The most recent commit should be tagged.
2. Run :code:`rm -rf build dist *.egg-info` to make sure all previous build artifacts are removed
3. Run :code:`python -m build` to build the package with the version number you just tagged. (Note: you might need to install ``build`` first.)
5. Run :code:`twine upload dist/*` to upload the distribution to PyPI
4. Run :code:`twine upload dist/*` to upload the distribution to PyPI

Lastly, the change needs to be published to bioconda.

Expand Down
7 changes: 7 additions & 0 deletions RELEASE_NOTES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
5.1.1
-----

Bug fixes:

* Remove stray files from source distribution

5.1.0
-----

Expand Down
11 changes: 5 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[build-system]
requires = ["setuptools", "setuptools-scm"]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "trtools"
version = "5.1.1"
authors = [
{name = "Melissa Gymrek", email = "[email protected]"},
{name = "Gymrek Lab"},
Expand All @@ -20,6 +21,7 @@ classifiers = [
"Topic :: Scientific/Engineering :: Bio-Informatics",
]
dependencies = [
"importlib-metadata", # required as long as we support py<3.8
"cyvcf2",
"matplotlib",
"numpy",
Expand All @@ -31,16 +33,13 @@ dependencies = [
"statsmodels",
"pyfaidx",
]
dynamic = ["version"]

[tool.setuptools]
packages = ["trtools"]
script-files = ["trtools/testsupport/test_trtools.sh", "scripts/trtools_prep_beagle_vcf.sh"]
license-files = ["LICENSE.txt"]

[tool.setuptools_scm]
# generated automatically by setuptools when running pip install -e or python -m build
version_file = "trtools/version.py"
[tool.setuptools.packages.find]
exclude = ["trtools.testsupport.*", "doc"]

[project.scripts]
dumpSTR = "trtools.dumpSTR:run"
Expand Down
10 changes: 8 additions & 2 deletions trtools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
try:
from .version import __version__
except ModuleNotFoundError:
from importlib.metadata import version, PackageNotFoundError
except ImportError:
# handles py3.7, since importlib.metadata was introduced in py3.8
from importlib_metadata import version, PackageNotFoundError

try:
__version__ = version(__name__)
except PackageNotFoundError:
__version__ = "unknown"
Loading