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

[AT-3970] enable pylint for initialization #561

Merged
merged 16 commits into from
Mar 14, 2024

Conversation

seedlit
Copy link
Contributor

@seedlit seedlit commented Mar 12, 2024

Jira ticket here.
Scope: enable pylint for all initialization files

Items:

  • Ran test & live-tests
  • Implemented (new) unit tests
  • Removed credentials
  • Removed argument pointing to staging
  • Updated documentation

For release:

  • Bumped version
  • Added changelog
  • Updated announcement banner

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
up42/initialization.py Outdated Show resolved Hide resolved
pylintrc Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved

with pytest.raises(RuntimeError):
up42.initialize_project()
up42.initialization.initialize_project()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes are not needed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And we actually need to check that the signature used by users works

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And the same below

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair point.
If I remove .initialization, mypy complains with error: Module has no attribute "initialize_project"

Any suggestions?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proposed below

with pytest.raises(RuntimeError):
up42.initialize_asset(asset_id=ASSET_ID)
up42.initialization.initialize_asset(asset_id=constants.ASSET_ID)


# pylint: disable=unused-argument
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's drop this

up42/__init__.py Outdated Show resolved Hide resolved
up42/__init__.py Outdated Show resolved Hide resolved
up42/main.py Outdated Show resolved Hide resolved
up42/main.py Outdated Show resolved Hide resolved
tests/test_main.py Outdated Show resolved Hide resolved
tests/test_main.py Show resolved Hide resolved
up42/__init__.py Outdated Show resolved Hide resolved

with pytest.raises(RuntimeError):
up42.initialize_project()
up42.initialization.initialize_project()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proposed below

pylintrc Outdated Show resolved Hide resolved
tests/test_main.py Show resolved Hide resolved
Copy link

sonarcloud bot commented Mar 14, 2024

@seedlit seedlit merged commit 00af083 into master Mar 14, 2024
3 checks passed
@seedlit seedlit deleted the AT_3970_enable_pylint_for_initialization branch March 14, 2024 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants