Skip to content

Add versioneer script to compute a version number #1497

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 10 commits into from
Aug 2, 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
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ exclude =
conda.recipe,
tests/*.py,
tests_external/*.py,
version.py,
versioneer.py,

# Print detailed statistic if any issue detected
count = True
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/build-sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ jobs:

- name: Checkout repo
uses: actions/checkout@v3.5.2
with:
fetch-depth: 0

# https://github.com/marketplace/actions/setup-miniconda
- name: Setup miniconda
Expand Down Expand Up @@ -109,6 +111,13 @@ jobs:
run: make html
working-directory: doc

- name: Set a project number to current release
run: |
export PROJECT_NUMBER=$(git describe --tags --abbrev=0)

echo PROJECT_NUMBER=${PROJECT_NUMBER}
echo "PROJECT_NUMBER=$PROJECT_NUMBER" >> $GITHUB_ENV

# https://github.com/marketplace/actions/doxygen-action
- name: Build backend docs
uses: mattnotmitt/doxygen-action@v1.9.5
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,9 @@ jobs:
run: conda list

- name: Smoke test
run: python -c "import dpnp, dpctl; dpctl.lsplatform()"
run: |
python -c "import dpnp, dpctl; dpctl.lsplatform()"
python -c "import dpnp; print(dpnp.__version__)"

# TODO: run the whole scope once the issues on CPU are resolved
- name: Run tests
Expand Down Expand Up @@ -331,7 +333,9 @@ jobs:
Get-Content -Tail 5 -Path $cl_cfg

- name: Smoke test
run: python -c "import dpnp, dpctl; dpctl.lsplatform()"
run: |
python -c "import dpnp, dpctl; dpctl.lsplatform()"
python -c "import dpnp; print(dpnp.__version__)"

# TODO: run the whole scope once the issues on CPU are resolved
- name: Run tests
Expand Down
8 changes: 4 additions & 4 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@
with open("reference/comparison_table.rst.inc", "w") as fd:
fd.write(comparison_generator.generate())

import dpnp

# -- Project information -----------------------------------------------------

project = "dpnp"
project = "Data Parallel Extension for NumPy"
copyright = "2020-2023, Intel Corporation"
author = "Intel"

# The short X.Y version
version = "0.12"
version = dpnp.__version__.strip(".dirty")
# The full version, including alpha/beta/rc tags
release = "0.12.1"
release = dpnp.__version__.strip(".dirty")


# -- General configuration ---------------------------------------------------
Expand Down
5 changes: 4 additions & 1 deletion dpnp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@
from dpnp.dpnp_iface_types import *
from dpnp.dpnp_iface import *
from dpnp.dpnp_iface import __all__ as _iface__all__
from dpnp.version import __version__
from dpnp._version import get_versions

__all__ = _iface__all__

__version__ = get_versions()["version"]
del get_versions
Loading