Skip to content

Commit

Permalink
Merge 745f265 into df9efb0
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdandm committed Nov 27, 2018
2 parents df9efb0 + 745f265 commit 8d46201
Show file tree
Hide file tree
Showing 34 changed files with 37,666 additions and 319 deletions.
1 change: 1 addition & 0 deletions .coveragerc
Expand Up @@ -8,6 +8,7 @@ exclude_lines =
pragma: no cover
def __repr__
def __str__
def main
if self\.debug
raise AssertionError
raise NotImplementedError
Expand Down
10 changes: 9 additions & 1 deletion .gitignore
Expand Up @@ -2,14 +2,22 @@
.pytest_cache/
venv/
/test.py
/json2python-models-*/

htmlcov/
.coverage
.coverage.*
coverage.xml

*.pyc
*.log
*.tmp
tmp.*

testing_tools/real_apis/*/
testing_tools/real_apis/*/

.eggs/
build/
dist/
lib/
*.egg-info/
4 changes: 2 additions & 2 deletions .travis.yml
Expand Up @@ -3,10 +3,10 @@ dist: xenial
language: python
cache: pip
install:
- pip install -r requirements.txt
- python setup.py install
- pip install pytest pytest-cov requests coveralls codacy-coverage
script:
- pytest --cov-config .coveragerc --cov=json_to_models -m "not no_expected" test/
- python setup.py test -a '--cov-config .coveragerc --cov=json_to_models -m "not no_expected" test/'
after_success:
- coverage xml
- coveralls
Expand Down
39 changes: 18 additions & 21 deletions TODO.md
@@ -1,5 +1,5 @@
- (!) README.md
- Remove OrderedDict (dictionaries in Python 3.7 are now ordered)
- Do not use OrderedDict (dictionaries in Python 3.7 are now ordered)
- Features
- Models layer
- [X] Data variant converting
Expand Down Expand Up @@ -28,20 +28,15 @@
- [ ] OptionalFieldsPolicy
- [X] Merge (default)
- [ ] Field sets
- [ ] Key as data (does not process json dict as a model but process it as a python dict)
- [X] Key as data (does not process json dict as a model but process it as a python dict)
- [ ] Complex python types annotations
- [ ] Decorator to specify field metatype
- [ ] Specify metatype in attr/dataclass argument (if dataclasses has such)
- [ ] String based types (Warning: 6 times slow down)
- [X] String based types (Warning: 6 times slow down)
- [X] ISO date
- [X] ISO time
- [X] ISO datetime
- API Layer
- [ ] Route object
- [ ] Register model as route in/out data spec
- Generate OpenAPI spec
- [ ] Meta-model -> OpenAPI model converter
- [ ] Route -> OpenAPI converter
- [ ] Cli tool

- Testing
- Models layer
Expand All @@ -62,20 +57,22 @@
- [ ] Implement existing models registration
- [ ] attrs
- [ ] dataclasses
- [X] String based types
- [X] ISO date
- [X] ISO time
- [X] ISO datetime

- Build, Deploy, CI
- [ ] setup.py
- [ ] setup.py + pytest integration
- [X] TravisCI integration
- [ ] pip package

- Long term plans
- API Layer
- [ ] Route object
- [ ] Register model as route in/out data spec
- Generate OpenAPI spec
- [ ] Meta-model -> OpenAPI model converter
- [ ] Route -> OpenAPI converter
- [ ] String based types
- [ ] ISO date
- [ ] ISO time
- [ ] ISO datetime

- Build, Deploy, CI
- [ ] setup.py
- [ ] setup.py + pytest integration
- [ ] Tox integration
- [X] TravisCI integration
- [ ] pip package
- [ ] Route -> OpenAPI converter
- [ ] Tox integration
4 changes: 4 additions & 0 deletions json_to_models/__init__.py
@@ -0,0 +1,4 @@
from pkg_resources import parse_version

__version__ = "0.1a1"
VERSION = parse_version(__version__)
4 changes: 4 additions & 0 deletions json_to_models/__main__.py
@@ -0,0 +1,4 @@
if __name__ == '__main__':
from json_to_models.cli import main

main()

0 comments on commit 8d46201

Please sign in to comment.