-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* build: Require 3.10 * build: upgrade toolkit * build; changelog * refactor: regen * build: pydantic v1 pyproject.toml * refactor: regen
- Loading branch information
Showing
20 changed files
with
574 additions
and
661 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ on: | |
pull_request: | ||
|
||
env: | ||
PYTHON_VERSION: '3.9' | ||
PYTHON_VERSION: '3.10' | ||
|
||
jobs: | ||
lint: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ on: | |
branches: [main] | ||
|
||
env: | ||
PYTHON_VERSION: '3.9' | ||
PYTHON_VERSION: '3.10' | ||
|
||
jobs: | ||
lint: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[cdf] | ||
default_organization_dir = "tests" | ||
default_env = "dev" | ||
|
||
[modules] | ||
# This is the version of the modules. It should not be changed manually. | ||
# It will be updated by the 'cdf module upgrade' command. | ||
version = "0.3.0b3" | ||
|
||
|
||
[plugins] | ||
run = false | ||
pull = false | ||
dump = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
[tool.poetry] | ||
name = "cognite-pygen" | ||
version = "0.99.34" | ||
description = "Cognite Python SDK Generator" | ||
readme = "README.md" | ||
authors = ["Cognite <support@cognite.com>"] | ||
license = "Apache-2.0" | ||
documentation = "https://cognite-pygen.readthedocs-hosted.com/en/latest/" | ||
homepage = "https://cognite-pygen.readthedocs-hosted.com/en/latest/" | ||
repository = "https://github.com/cognitedata/pygen" | ||
packages = [{ include="cognite", from="." }] | ||
|
||
[tool.black] | ||
line-length = 120 | ||
target_version = ['py39'] | ||
include = '\.py$' | ||
|
||
[tool.ruff] | ||
# See https://beta.ruff.rs/docs/rules for an overview of ruff rules | ||
line-length = 120 | ||
target-version = "py39" | ||
exclude = ["examples","examples-pydantic-v1", "scripts"] | ||
fix = true | ||
|
||
[tool.ruff.lint] | ||
select = ["E","W","F","I","RUF","TID","UP", "B", "FLY", "PTH", "ERA"] | ||
fixable = ["E","W","F","I","RUF","TID","UP", "B", "FLY", "PTH", "ERA"] | ||
ignore = [ | ||
# This is causing issues for pydantic which does not support use of X | Y for type annotations before 3.10 | ||
"UP007", # Use X | Y for type annotations | ||
# Typer do function calls when setting up the CLI. | ||
"B008", # Do not perform function call {name} in argument defaults | ||
# This is done when setting the pygen configs, and useful for getting pretty docs. | ||
# In that case, this is also safe as the function calls produced immutable data. | ||
"RUF009", #Do not perform function call in defaults | ||
] | ||
|
||
[tool.ruff.lint.isort] | ||
known-first-party = ["markets_pydantic_v1", "movie_domain_pydantic_v1", "shop_pydantic_v1"] | ||
known-third-party = ["cognite.client"] | ||
|
||
[tool.mypy] | ||
explicit_package_bases = true | ||
mypy_path = "examples" | ||
plugins = ["pydantic.mypy"] | ||
|
||
[tool.pydantic-mypy] | ||
init_forbid_extra = true | ||
init_typed = true | ||
warn_required_dynamic_aliases = true | ||
|
||
[tool.pygen] | ||
data_models = [ | ||
["IntegrationTestsImmutable", "Movie", "2"], | ||
] | ||
tenant_id = "<tenant-id>" | ||
client_id = "<client-id>" | ||
cdf_cluster = "<cdf-cluster>" | ||
cdf_project = "<cdf-project>" | ||
top_level_package = "movie_domain.client" | ||
client_name = "MovieClient" | ||
output_dir = "docs/examples" | ||
|
||
[tool.poetry.scripts] | ||
pygen = "cognite.pygen.cli:main" | ||
|
||
|
||
[tool.poetry.dependencies] | ||
python = "^3.10" | ||
cognite-sdk = {version = "7.62.4"} | ||
pydantic = "1.10.7" | ||
Jinja2 = ">=3.1" | ||
inflect = ">=6.0" | ||
|
||
toml = {version=">=0.10", optional=true} | ||
packaging = {version=">=21.3", optional=true} | ||
typer = {version = ">=0.9", extras = ["rich"], optional=true } | ||
black = {version=">=24.4.2", optional = true} | ||
build = {version=">=1.1", optional=true} | ||
|
||
[tool.poetry.extras] | ||
cli = ["packaging", "typer", "toml", "build"] | ||
format = ["black"] | ||
all = ["packaging", "typer", "toml", "black", "build"] | ||
|
||
|
||
[tool.poetry.dev-dependencies] | ||
twine = "*" | ||
pre-commit = "*" | ||
python-dotenv = "*" | ||
pytest = "*" | ||
pytest-cov = "*" | ||
pytest-mock = "*" | ||
toml = "*" | ||
pandas = "*" | ||
pyyaml = "*" | ||
mypy = "^1.5" | ||
mkdocs = {version="^1.6.0", optional=true} | ||
mkdocs-material = {version="^9.5.26", optional=true} | ||
mkdocs-jupyter = {version="^0.24.7", optional=true} | ||
mkdocs-glightbox = {version="^0.4.0", optional=true} | ||
mkdocstrings-python = {version="^1.10.3", optional=true} | ||
pandas-stubs = "^2" | ||
typer = "^0.12" | ||
types-PyYAML = "^6" | ||
types-toml = "^0.10" | ||
IPython = "*" | ||
matplotlib = "*" | ||
tabulate = "*" | ||
pytest-icdiff = "^0.8" | ||
Faker = "*" | ||
hypothesis = "*" | ||
jupyterlab = "*" | ||
cognite-toolkit = "0.3.0b3" | ||
|
||
[tool.pytest.ini_options] | ||
filterwarnings = [ | ||
"ignore::DeprecationWarning:pkg_resources", | ||
] | ||
addopts = "--doctest-modules" | ||
markers = [ | ||
"full: Requiers all optional dependencies to run.", | ||
] | ||
pythonpath = [".", "examples", "examples-pydantic-v1"] | ||
testpaths = ["tests", "cognite/pygen"] | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.3"] | ||
build-backend = "poetry.core.masonry.api" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.