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

Vers/test versioneer #1203

Merged
merged 6 commits into from
Aug 12, 2024
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 .github/workflows/publish_to_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Setup the Python install
uses: actions/setup-python@v4
with:
Expand Down
25 changes: 8 additions & 17 deletions .github/workflows/publish_to_test_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Setup the Python install
uses: actions/setup-python@v4
with:
Expand All @@ -45,7 +46,7 @@ jobs:
pip install
build
--user

- name: Build a binary wheel and source tarball
run: >-
python -m
Expand All @@ -55,19 +56,9 @@ jobs:
--outdir dist/
.

- name: Having a peek
run: >-
ls

- name: Show me the vers
run: >-
python setup.py version

# # Then the module is published to the test PyPI index
# - name: Publish to TestPyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
# repository_url: https://test.pypi.org/legacy/


# Then the module is published to the test PyPI index
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
7 changes: 5 additions & 2 deletions versioneer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

# This code is a part of X-ray: Generate and Analyse (XGA), a module designed for the XMM Cluster Survey (XCS).
# Last modified by David J Turner (turne540@msu.edu) 12/08/2024, 16:50. Copyright (c) The Contributors

# Version: 0.29

"""The Versioneer - like a rocketeer, but for versions.
Expand Down Expand Up @@ -310,6 +313,7 @@

import configparser
import errno
import functools
import json
import os
import re
Expand All @@ -318,7 +322,6 @@
from pathlib import Path
from typing import Any, Callable, cast, Dict, List, Optional, Tuple, Union
from typing import NoReturn
import functools

have_tomllib = True
if sys.version_info >= (3, 11):
Expand Down Expand Up @@ -1322,7 +1325,7 @@ def git_pieces_from_vcs(
# if there isn't one, this yields HEX[-dirty] (no NUM)
describe_out, rc = runner(GITS, [
"describe", "--tags", "--dirty", "--always", "--long",
"--match", f"{tag_prefix}[[:digit:]]*"
"--match", f"v*" # TODO THIS IS WHERE I BODGED IT - IDENTICAL TO _version.py
], cwd=root)
# --long was added in git-1.5.5
if describe_out is None:
Expand Down