Skip to content

Commit

Permalink
simplify packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
Guts committed Aug 12, 2019
1 parent e367adc commit a5a54c0
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
exclude: ^(.venv_packaging/|.venv*/|tests/dev/|tests/fixtures/)
exclude: ^(.venv_packaging/|.venv_tests/|.venv*/|tests/dev/|tests/fixtures/)
repos:
- repo: https://github.com/python/black
rev: 19.3b0
Expand Down
4 changes: 2 additions & 2 deletions isogeo_pysdk/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
#! python3

"""
This module is an abstraction class about the Isogeo REST API.
Expand Down
3 changes: 3 additions & 0 deletions isogeo_pysdk/isogeo_sdk_oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,5 +333,8 @@ def header(self) -> dict:
METADATA_TEST_FIXTURE_UUID = environ.get("ISOGEO_FIXTURES_METADATA_COMPLETE")
WORKGROUP_TEST_FIXTURE_UUID = environ.get("ISOGEO_WORKGROUP_TEST_UUID")

search = isogeo.search()
print(search.total, len(search.results))

# -- END -------
isogeo.close() # close session
32 changes: 16 additions & 16 deletions isogeo_pysdk/models/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ class Metadata(object):
"editionProfile": str,
"encoding": str,
"envelope": dict,
"events": dict,
"featureAttributes": dict,
"events": list,
"featureAttributes": list,
"features": int,
"format": str,
"formatVersion": str,
Expand Down Expand Up @@ -233,8 +233,8 @@ def __init__(
editionProfile: str = None,
encoding: str = None,
envelope: dict = None,
events: dict = None,
featureAttributes: dict = None,
events: list = None,
featureAttributes: list = None,
features: int = None,
format: str = None,
formatVersion: str = None,
Expand Down Expand Up @@ -654,57 +654,57 @@ def envelope(self, envelope: str):

# events
@property
def events(self) -> str:
def events(self) -> list:
"""Gets the events of this Metadata.
:return: The events of this Metadata.
:rtype: str
:rtype: list
"""
return self._events

@events.setter
def events(self, events: str):
def events(self, events: list):
"""Sets the of this Metadata.
:param str events: to be set
:param list events: to be set
"""

self._events = events

# featureAttributes
@property
def featureAttributes(self) -> str:
def featureAttributes(self) -> list:
"""Gets the featureAttributes of this Metadata.
:return: The featureAttributes of this Metadata.
:rtype: str
:rtype: list
"""
return self._featureAttributes

@featureAttributes.setter
def featureAttributes(self, featureAttributes: str):
def featureAttributes(self, featureAttributes: list):
"""Sets the of this Metadata.
:param str featureAttributes: to be set
:param list featureAttributes: to be set
"""

self._featureAttributes = featureAttributes

# features
@property
def features(self) -> str:
def features(self) -> int:
"""Gets the features of this Metadata.
:return: The features of this Metadata.
:rtype: str
:rtype: int
"""
return self._features

@features.setter
def features(self, features: str):
def features(self, features: int):
"""Sets the of this Metadata.
:param str features: to be set
:param int features: to be set
"""

self._features = features
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
# dependencies
install_requires=["requests>=2.20.0", "requests-oauthlib>=1.2.0"],
extras_require={
"api-write": ["requests-oauthlib"],
"dev": ["black", "python-dotenv"],
"test": ["codecov", "coverage", "pytest", "pytest-cov"],
},
Expand Down

0 comments on commit a5a54c0

Please sign in to comment.