Skip to content

Commit

Permalink
Add Versioneer to Fidesctl (#18)
Browse files Browse the repository at this point in the history
* Add Versioneer to Fidesctl

* added versioneer scaffolding

* rename some things

* add the version check

* fixed the checks for the CLI
  • Loading branch information
Thomas La Piana authored Jun 16, 2021
1 parent 9e4137c commit 00a6adb
Show file tree
Hide file tree
Showing 31 changed files with 2,534 additions and 35 deletions.
1 change: 1 addition & 0 deletions fides_cli/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/fides/_version.py export-subst
2 changes: 2 additions & 0 deletions fides_cli/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include LICENSE
include requirements.txt
include dev-requirements.txt
include versioneer.py
include src/fides/_version.py
6 changes: 4 additions & 2 deletions fides_cli/mypy.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

[mypy]
files = src/**/**.py
warn_unused_configs = true
Expand All @@ -8,6 +7,9 @@ plugins = pydantic.mypy
disallow_any_explicit = true
disallow_untyped_defs = true

[mypy-src.fides.core.models]
[mypy-src.fidesctl.core.models]
# Got an error saying BaseModel was explicit type Any
disallow_any_explicit = false

[mypy-src.fidesctl._version]
ignore_errors = true
5 changes: 3 additions & 2 deletions fides_cli/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools", "wheel"] # PEP 508 specifications.
requires = ["setuptools", "wheel", "versioneer-518"] # PEP 508 specifications.

######
# MyPy
Expand Down Expand Up @@ -66,7 +66,8 @@ good-names="_,i,j,k,e,qs,pk,setUp,tearDown,maxDiff,default_app_config"
[tool.pytest.ini_options]
testpaths="tests"
log_level = "DEBUG"
addopts = ["--cov=fides",
addopts = ["--cov=fidesctl.core",
"--cov=fidesctl.cli",
"--cov-report=term-missing",
"-vv",
"--no-cov-on-fail",
Expand Down
1 change: 1 addition & 0 deletions fides_cli/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ pyyaml==5.4.1
requests==2.25.1
sqlalchemy==1.4.14
toml==0.10.2
versioneer==0.19
7 changes: 7 additions & 0 deletions fides_cli/setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[versioneer]
VCS = git
style = pep440
versionfile_source = src/fides/_version.py
versionfile_build = fides_cli/_version.py
tag_prefix =
parentdir_prefix =
10 changes: 5 additions & 5 deletions fides_cli/setup.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import os
import pathlib
from setuptools import setup, find_packages
import versioneer

here = pathlib.Path(__file__).parent.resolve()
long_description = open("README.md").read()

# Requirements
install_requires = open("requirements.txt").read().strip().split("\n")
dev_requires = open("dev-requirements.txt").read().strip().split("\n")
version = "0.0.9"

setup(
name="fidesctl",
version=version,
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
description="CLI for Fides",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://gitlab.com/ethyca/fides-core",
entry_points={"console_scripts": ["fidesctl=fides.cli:cli"]},
url="https://github.com/ethyca/fides",
entry_points={"console_scripts": ["fidesctl=fidesctl.cli:cli"]},
python_requires=">=3.7, <4",
package_dir={"": "src"},
packages=find_packages(where="src"),
Expand Down
1 change: 0 additions & 1 deletion fides_cli/src/fides/__init__.py

This file was deleted.

6 changes: 6 additions & 0 deletions fides_cli/src/fidesctl/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"""Fides CLI"""

from ._version import get_versions

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

0 comments on commit 00a6adb

Please sign in to comment.