Skip to content

Consolidate project config under pyproject #151

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

Merged
merged 4 commits into from
Apr 29, 2024

Conversation

ravwojdyla
Copy link
Contributor

@ravwojdyla ravwojdyla commented Apr 29, 2024

See the latest docs at: https://packaging.python.org/en/latest/ and a sample project at: https://github.com/pypa/sampleproject

Summary of changes:

  • consolidate project setup/config under pyproject.toml
  • git-ignore bio2zarr/_version.py
    • scm was configured to write this file, I'm not entire sure we need it, but to keep this consistent I have copied it over, but that also means we probably want to gitignore it?
  • configure build-system
  • include readme in the project config
  • urls include links to both documentation and repo
  • zip-safe is deprecated, and include-package-data is true by default
  • update tool.ruff target version to the minimal specified supported python - py3.9
    • this also forces to use list vs typing.List etc
  • use ruff's isort support
    • some setting are not available in ruff - do we need them?
  • remove obsolete flake8 config
  • git-ignore IDE directories including .idea and .vscode
  • update pre-commit ruff version from 0.3.7 to 0.4.2

@ravwojdyla
Copy link
Contributor Author

I have tested this setup using:

python3 -m build --wheel

The resulting package:

unzip -l dist/bio2zarr-0.0.7.dev6+gc03b708-py3-none-any.whl

Archive:  dist/bio2zarr-0.0.7.dev6+gc03b708-py3-none-any.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
       49  04-29-2024 08:11   bio2zarr/__init__.py
      527  04-29-2024 08:11   bio2zarr/__main__.py
      445  04-29-2024 10:01   bio2zarr/_version.py
    14397  04-29-2024 08:11   bio2zarr/cli.py
     9006  04-29-2024 08:11   bio2zarr/core.py
     6768  04-29-2024 08:11   bio2zarr/plink.py
      142  04-29-2024 08:11   bio2zarr/provenance.py
       79  04-29-2024 08:11   bio2zarr/typing.py
    83310  04-29-2024 09:56   bio2zarr/vcf.py
    17328  04-29-2024 09:56   bio2zarr/vcf_utils.py
    11357  04-29-2024 10:01   bio2zarr-0.0.7.dev6+gc03b708.dist-info/LICENSE
    16931  04-29-2024 10:01   bio2zarr-0.0.7.dev6+gc03b708.dist-info/METADATA
       92  04-29-2024 10:01   bio2zarr-0.0.7.dev6+gc03b708.dist-info/WHEEL
      131  04-29-2024 10:01   bio2zarr-0.0.7.dev6+gc03b708.dist-info/entry_points.txt
        9  04-29-2024 10:01   bio2zarr-0.0.7.dev6+gc03b708.dist-info/top_level.txt
     1323  04-29-2024 10:01   bio2zarr-0.0.7.dev6+gc03b708.dist-info/RECORD
---------                     -------
   161894                     16 files

You can see the files included in the dist-info in a gist here.

Test install/run was successful:

pip install projects/bio2zarr/dist/bio2zarr-0.0.7.dev6+gc03b708-py3-none-any.whl

Follow by:

vcf2zarr explode sample.vcf.gz sample.exploded

Copy link
Contributor

@jeromekelleher jeromekelleher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jeromekelleher jeromekelleher merged commit 9cf7c6c into sgkit-dev:main Apr 29, 2024
4 checks passed
@ravwojdyla ravwojdyla deleted the rav-use-pyproject branch April 29, 2024 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants