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

PyPi Setup #37

Merged
merged 8 commits into from
Dec 20, 2024
Merged

PyPi Setup #37

merged 8 commits into from
Dec 20, 2024

Conversation

moleculekayak
Copy link
Owner

No description provided.

Comment on lines +25 to +26
pip install uv
uv pip install -r pyproject.toml --system --all-extras
Copy link
Contributor

Choose a reason for hiding this comment

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

I think if you use uv sync ., you can avoid the pythonpath shenanigans for pytest.

Copy link
Owner Author

Choose a reason for hiding this comment

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

That didn't work immediately, but it looks like uv pip install -e . --system did! Good enough for me

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah yes, I think because you want a system-wide installation. uv sync creates a virtual environment at $PWD/.venv.

Comment on lines +1 to +20
#!/bin/bash

# Get current version from pyproject.toml
CURRENT_VERSION=$(grep "^version = " pyproject.toml | sed "s/^version = \"\(.*\)\"/\1/g")
# Get the new version from stdin
NEW_VERSION=$1

echo "Bumping from $CURRENT_VERSION to $NEW_VERSION"

# Check that the user wants to continue. exit if not
read -p "Continue? (y/n) " -n 1 -r
echo # move to a new line

if [[ $REPLY =~ ^[Yy]$ ]]; then
# Update the version in the pyproject.toml file
sed -i "" "s/^version = \".*\"/version = \"$NEW_VERSION\"/g" "pyproject.toml"

# Set the git tag
git tag "v$NEW_VERSION"
fi
Copy link
Owner Author

Choose a reason for hiding this comment

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

I can't be bothered to set up a gh action to bump versions so instead I'll run this locally and it'll handle all the bumping required

@moleculekayak
Copy link
Owner Author

@ambroisie Thank you for the help! Would you mind taking a quick look over these changes and let me know if I've done anything stupid?

@moleculekayak moleculekayak merged commit 46e5555 into master Dec 20, 2024
1 check passed
@moleculekayak moleculekayak deleted the mk/pypi-setup branch December 20, 2024 17:46
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