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

replacing versioneer #164

Merged
merged 3 commits into from
May 9, 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
15 changes: 8 additions & 7 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ jobs:
python3 -m build
- name: Check the sdist installs and imports
run: |
mkdir -p test-sdist
cd test-sdist
python -m venv venv-sdist
venv-sdist/bin/python -m pip install ../dist/pymc-experimental*.tar.gz
echo "Checking import and version number (on release)"
venv-sdist/bin/python -c "import pymc_experimental as pmx; assert pmx.__version__ == '${{ github.ref_name }}' if '${{ github.ref_type }}' == 'tag' else pmx.__version__; print(pmx.__version__)"
cd ..
mkdir -p test-sdist
cd test-sdist
python -m venv venv-sdist
venv-sdist/bin/python -m pip install numpy
venv-sdist/bin/python -m pip install ../dist/pymc-experimental*.tar.gz
echo "Checking import and version number (on release)"
venv-sdist/bin/python -c "import pymc_experimental as pmx; assert pmx.__version__ == '${{ github.ref_name }}' if '${{ github.ref_type }}' == 'tag' else True; print(pmx.__version__)"
cd ..
- name: Check the bdist installs and imports
run: |
mkdir -p test-bdist
Expand Down
2 changes: 0 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ repos:
rev: v2.14.5
hooks:
- id: pylint
exclude: versioneer.py
args: [--rcfile=.pylintrc]
files: ^pymc_experimental/
- repo: https://github.com/MarcoGorelli/madforhooks
Expand All @@ -41,7 +40,6 @@ repos:
- repo: local
hooks:
- id: no-relative-imports
exclude: versioneer.py
name: No relative imports
entry: from \.[\.\w]* import
types: [python]
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include requirements*.txt
include *.md *.rst
include LICENSE
include versioneer.py
include pymc_experimental/version.txt
6 changes: 3 additions & 3 deletions pymc_experimental/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# limitations under the License.
import logging

from pymc_experimental.version import __version__

_log = logging.getLogger("pmx")

if not logging.root.handlers:
Expand All @@ -21,8 +23,6 @@
handler = logging.StreamHandler()
_log.addHandler(handler)

from pymc_experimental import _version, distributions, gp, utils
from pymc_experimental import distributions, gp, utils
from pymc_experimental.inference.fit import fit
from pymc_experimental.marginal_model import MarginalModel

__version__ = _version.get_versions()["version"]
Loading