Skip to content

Commit

Permalink
Fix versioning (#18)
Browse files Browse the repository at this point in the history
* Fix versioning

* Fix versioning

* keep the git history

* fix pip install in order to install the build dependencies

* fix setuptools_scm configuration
  • Loading branch information
xmnlab authored Nov 19, 2021
1 parent db400e9 commit 6fc3a8c
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 7 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: conda-incubator/setup-miniconda@v2
with:
Expand All @@ -32,7 +34,7 @@ jobs:

- name: install dependencies
run: |
python -m pip install --no-deps .
python -m pip install .
# Build the book
- name: Build the book
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: conda-incubator/setup-miniconda@v2
with:
Expand All @@ -44,7 +46,7 @@ jobs:

- name: install dependencies
run: |
python -m pip install --no-deps -e .
python -m pip install -e .
- name: show environment
run: conda list
Expand Down Expand Up @@ -77,7 +79,7 @@ jobs:

- name: install dependencies
run: |
python -m pip install --no-deps -e .
python -m pip install -e .
pre-commit install
- name: show environment
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: conda-incubator/setup-miniconda@v2
with:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# scm versioning
sqlalchemy_omnisci/_version.py

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
[build-system]
requires = ["setuptools", "setuptools_scm"]
requires = ["setuptools", "wheel", "setuptools_scm"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
write_to = "sqlalchemy_omnisci/_version.py"

[tool.black]
line-length = 79
target-version = ["py36", "py37", "py38"]
Expand Down
3 changes: 0 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
"pyomnisci>=0.27.0",
]

setup_requirements = ["setuptools-scm"]

test_requirements = ["pytest"]
lint_requirements = [
"black",
Expand Down Expand Up @@ -71,7 +69,6 @@
keywords="sqlalchemy_omnisci",
name="sqlalchemy-omnisci",
packages=find_packages(include=["sqlalchemy_omnisci"]),
setup_requires=setup_requirements,
test_suite="tests",
tests_require=test_requirements,
url="https://github.com/omnisci/sqlalchemy-omnisci",
Expand Down
7 changes: 7 additions & 0 deletions tests/test_package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"""Tests for the package."""
import sqlalchemy_omnisci


def test_versioning():
"""Check if the version is set correctly."""
assert sqlalchemy_omnisci.__version__ not in (None, "", "0.0.0")

0 comments on commit 6fc3a8c

Please sign in to comment.