Skip to content

[BUG]: Fix Python package build and publish commands with Hatch and improve PyPI publishing documentation #195

@smorin

Description

@smorin

Severity

Breaking Bug (functionality doesn't work at all)

Priority

High (significantly impacts usability)

Steps to Reproduce

  1. Run just build to attempt building the Python distribution packages
  2. Observe that the command uvx --with-editable . build fails
  3. just publish doesn't exist which should depend on the build step
  4. Observe that the package cannot be published to PyPI

Expected Behavior

  1. just build should create both source distribution (.tar.gz) and wheel (.whl) files using Hatch as the build system
  2. just publish should take these built distributions and upload them to PyPI successfully
  3. Documentation should be available explaining the step-by-step process for configuring and setting up PyPI publishing for first-time users
  4. Clear instructions should exist for securing and managing PyPI credentials without exposing them in the public repository

Actual Behavior

The build command fails with the current implementation: uvx --with-editable . build #TODO: fix this does not work
As a result, the publish command also fails since it depends on build. Additionally, there's inadequate documentation about the PyPI setup and credential management process.

System Information

N/A

Screenshots

No response

Logs

Possible Solution

  1. Replace the current build command with Hatch:```

Build distribution packages using Hatch

@build: check
ADD CORRECT COMMANDS


2. Update the publish command to use Hatch:

Publish to PyPI using Hatch (CHECK THAT HATCH DOES THIS)

@publish: build
ADD CORRECT COMMAND


3. Add comprehensive documentation that covers:
   - Setting up a new project for PyPI distribution
   - Step-by-step guide for first-time PyPI publication
   - Managing PyPI API tokens securely
   - Using environment variables
   - CI/CD integration options for automated publishing

4. Implement a secure credential management solution:
   - Document how to use environment variables to store credentials
   - Provide examples of using GitHub Secrets or similar for CI/CD pipelines
   - Include warning notes about avoiding credential exposure in public repositories


### Contribution

Yes, I'd be willing to work on a fix

### Pre-submission Confirmation

Yes

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions