Skip to content

Commit 700be65

Browse files
committed
init
0 parents  commit 700be65

10 files changed

Lines changed: 997 additions & 0 deletions

File tree

.gitignore

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
MANIFEST
27+
28+
# Unit test / coverage reports
29+
htmlcov/
30+
.tox/
31+
.coverage
32+
.coverage.*
33+
.cache
34+
nosetests.xml
35+
coverage.xml
36+
*.cover
37+
.hypothesis/
38+
.pytest_cache/
39+
40+
# pyenv
41+
.python-version
42+
43+
# Environments
44+
.venv
45+
46+
# mypy
47+
.mypy_cache/

.travis.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
dist: xenial
2+
language: python
3+
python:
4+
- "3.6"
5+
6+
before_install:
7+
- pip install poetry
8+
9+
install:
10+
- make install
11+
12+
script:
13+
- make

LICENSE

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Copyright 2019 Hexlet
2+
3+
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
4+
5+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
export PYTHONPATH=src
2+
3+
.PHONY: all
4+
all: lint pytest doctest
5+
@echo Done!
6+
7+
.PHONY: pytest
8+
pytest:
9+
@poetry run pytest test
10+
11+
.PHONY: doctest
12+
doctest:
13+
@poetry run python -m doctest -v README.md
14+
15+
.PHONY: lint
16+
lint:
17+
@poetry run flake8 --statistics src test
18+
19+
.PHONY: install
20+
install:
21+
@poetry install

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
### hexlet-points
2+
3+
A SICP'ish Points implemented in Python using hexlet-pairs.
4+
5+
### Usage
6+
7+
<!-- This code will be doctested. Do not touch the markup! -->
8+
9+
>>> from hexlet import points
10+
>>> p = points.make(100, 200)
11+
>>> print(points.to_string(p))
12+
(100, 200)
13+
>>> points.get_quadrant(p)
14+
1
15+
>>> points.get_x(p)
16+
100
17+
>>> points.get_y(p)
18+
200

0 commit comments

Comments
 (0)