File tree 12 files changed +2339
-58
lines changed
12 files changed +2339
-58
lines changed Original file line number Diff line number Diff line change
1
+ # This workflow publishes the package to pypi.
2
+ # For more details:
3
+ # https://docs.github.com/en/actions/guides/building-and-testing-python#publishing-to-package-registries
4
+ name : Publish to PyPi
5
+
6
+ on :
7
+ release :
8
+ types : [created]
9
+ workflow_dispatch :
10
+
11
+ jobs :
12
+ deploy :
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - uses : actions/checkout@v2
16
+ # fetch all tags so `versioneer` can properly determine current version
17
+ with :
18
+ fetch-depth : 0
19
+ - name : Check if current commit is tagged
20
+ # fails and cancels release if the current commit is not tagged
21
+ run : |
22
+ git describe --exact-match --tags
23
+ - name : Set up Python
24
+ uses : actions/setup-python@v2
25
+ with :
26
+ python-version : ' 3.11'
27
+ - name : Install dependencies
28
+ run : |
29
+ python -m pip install --upgrade pip
30
+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
31
+ if [ -f requirements-ml.txt ]; then pip install -r requirements-ml.txt; fi
32
+ if [ -f requirements-reports.txt ]; then pip install -r requirements-reports.txt; fi
33
+ pip install setuptools wheel twine
34
+ - name : Build
35
+ env :
36
+ TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
37
+ TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
38
+ TWINE_REPOSITORY : pypi
39
+ run : |
40
+ python setup.py sdist bdist_wheel
41
+ - name : Test build
42
+ # fails and cancels release if the built package fails to import
43
+ run : |
44
+ pip install dist/*.whl
45
+ python -c 'import data_profiler; print(data_profiler.__version__)'
46
+ - name : Publish
47
+ env :
48
+ TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
49
+ TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
50
+ TWINE_REPOSITORY : pypi
51
+ run : |
52
+ twine upload dist/*
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 7
7
pull_request :
8
8
branches :
9
9
- ' main'
10
- - ' feature/**'
11
- - ' dev'
12
10
13
11
jobs :
14
12
build :
Original file line number Diff line number Diff line change 5
5
rev : 22.3.0
6
6
hooks :
7
7
- id : black
8
+ exclude : (versioneer.py|dataprofiler/_version.py)
8
9
types : [file, python]
9
10
language_version : python3
10
11
# Isort: sort import statements
41
42
rev : v0.982
42
43
hooks :
43
44
- id : mypy
44
- exclude : (^dataprofiler/tests/|^resources/|^examples|venv*/)
45
+ exclude : (^dataprofiler/tests/|^resources/|^examples|venv*/|versioneer.py|dataprofiler/_version.py )
45
46
language_version : python3
46
47
additional_dependencies : # Keep up-to-date with the respective requirement files
47
48
[
@@ -117,6 +118,7 @@ repos:
117
118
hooks :
118
119
- id : pyupgrade
119
120
args : ["--py38-plus"]
121
+ exclude : (versioneer.py|dataprofiler/_version.py)
120
122
# Autoflake - cleanup unused variables and imports
121
123
- repo : https://github.com/PyCQA/autoflake
122
124
rev : v2.0.0
Original file line number Diff line number Diff line change @@ -18,3 +18,5 @@ recursive-include resources *.pb
18
18
recursive-include resources *.py
19
19
20
20
recursive-include dataprofiler/labelers/embeddings/ *.txt
21
+ include versioneer.py
22
+ include dataprofiler/_version.py
Original file line number Diff line number Diff line change 1
1
"""Package for dataprofiler."""
2
2
from . import settings
3
+ from ._version import get_versions
3
4
from .data_readers .data import Data
4
5
from .dp_logging import get_logger , set_verbosity
5
6
from .labelers .data_labelers import (
18
19
from .profilers .profiler_options import ProfilerOptions
19
20
from .reports import graphs
20
21
from .validators .base_validators import Validator
21
- from .version import __version__
22
+
23
+ __version__ = get_versions ()["version" ]
22
24
23
25
24
26
def set_seed (seed = None ):
You can’t perform that action at this time.
0 commit comments