Skip to content

Commit 216fb88

Browse files
aalmazanAllan Almazan
authored andcommitted
Initial PyPI release
1 parent 830a8bc commit 216fb88

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+2317
-1156
lines changed

.appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ install:
1515
- set PATH=C:\Python%PYTHON_MAJOR%%PYTHON_MINOR%;%PATH%
1616
- set PATH=C:\Python%PYTHON_MAJOR%%PYTHON_MINOR%\Scripts;%PATH%
1717
# Install system dependencies
18-
- curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
18+
- curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
1919
- set PATH=%USERPROFILE%\.poetry\bin;%PATH%
2020
- make doctor
2121
# Install project dependencies

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,7 @@ Icon*
4545

4646
# Eclipse
4747
.settings
48+
49+
.tox
50+
.idea
51+
.vscode

.isort.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
multi_line_output = 3
44

55
known_standard_library = dataclasses,typing_extensions
6-
known_third_party = click,log
7-
known_first_party = anvil_api
6+
known_third_party = click
7+
known_first_party = python_anvil
88

99
combine_as_imports = true
1010
force_grid_wrap = false

.pylint.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ disable=
129129
singleton-comparison,
130130
bad-continuation,
131131
wrong-import-order,
132+
unsubscriptable-object,
132133

133134
# Enable the message, report, category or checker with the given id(s). You can
134135
# either give multiple identifier separated by comma (,) or put this option

.python-version

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
3.7.9
21
3.6.12
2+
3.7.9
33
3.8.6
4+
3.9.1

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ env:
1414
- RANDOM_SEED=0
1515

1616
before_install:
17-
- curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
17+
- curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
1818
- source $HOME/.poetry/env
1919
- make doctor
2020

CHANGELOG.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1-
# 0.0.0 (YYYY-MM-DD)
1+
# 0.1.0 (2021-01-30)
22

3-
- TBD
3+
#### Initial public release
4+
5+
- Added GraphQL queries
6+
- Raw queries
7+
- casts
8+
- etchPackets
9+
- currentUser
10+
- availableQueries
11+
- welds
12+
- weldData
13+
- Added GraphQL mutations
14+
- TODO: sendEtchPacket
15+
- createEtchPacket
16+
- generateEtchSignURL
17+
- Added other requests
18+
- Fill PDF
19+
- Generate PDF
20+
- Download Documents

CREDITS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This project was generated with [cookiecutter](https://github.com/audreyr/cookiecutter) using [jacebrowning/template-python](https://github.com/jacebrowning/template-python).

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
**The MIT License (MIT)**
22

3-
Copyright © 2020, Allan Almazan
3+
Copyright © 2020, useanvil.com
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

Lines changed: 36 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
# Project settings
2-
PROJECT := python_anvil
3-
PACKAGE := anvil_api
4-
REPOSITORY := aalmazan/python-anvil
2+
PROJECT := python-anvil
3+
PACKAGE := python_anvil
4+
REPOSITORY := anvilco/python-anvil
55

66
# Project paths
77
PACKAGES := $(PACKAGE) tests
88
CONFIG := $(wildcard *.py)
99
MODULES := $(wildcard $(PACKAGE)/*.py)
1010

11-
# Virtual environment paths
12-
VIRTUAL_ENV ?= .venv
13-
1411
# MAIN TASKS ##################################################################
1512

1613
.PHONY: all
@@ -27,10 +24,6 @@ watch: install .clean-test ## Continuously run all CI tasks when files chanage
2724
run: install
2825
poetry run python $(PACKAGE)/__main__.py
2926

30-
.PHONY: ipython ## Launch an IPython session
31-
ipython: install
32-
poetry run ipython --ipython-dir=notebooks
33-
3427
# SYSTEM DEPENDENCIES #########################################################
3528

3629
.PHONY: doctor
@@ -39,12 +32,14 @@ doctor: ## Confirm system dependencies are available
3932

4033
# PROJECT DEPENDENCIES ########################################################
4134

35+
VIRTUAL_ENV ?= .venv
4236
DEPENDENCIES := $(VIRTUAL_ENV)/.poetry-$(shell bin/checksum pyproject.toml poetry.lock)
4337

4438
.PHONY: install
4539
install: $(DEPENDENCIES) .cache
4640

4741
$(DEPENDENCIES): poetry.lock
42+
@ rm -rf $(VIRTUAL_ENV)/.poetry-*
4843
@ poetry config virtualenvs.in-project true
4944
poetry install
5045
@ touch $@
@@ -62,18 +57,18 @@ endif
6257

6358
.PHONY: format
6459
format: install
65-
poetry run isort $(PACKAGES) notebooks
66-
poetry run black $(PACKAGES) notebooks
60+
poetry run isort $(PACKAGE) tests
61+
poetry run black $(PACKAGE) tests
6762
@ echo
6863

6964
.PHONY: check
7065
check: install format ## Run formaters, linters, and static analysis
7166
ifdef CI
7267
git diff --exit-code
7368
endif
74-
poetry run mypy $(PACKAGES) --config-file=.mypy.ini
75-
poetry run pylint $(PACKAGES) --rcfile=.pylint.ini
76-
poetry run pydocstyle $(PACKAGES) $(CONFIG)
69+
poetry run mypy $(PACKAGE) tests --config-file=.mypy.ini
70+
poetry run pylint $(PACKAGE) tests --rcfile=.pylint.ini
71+
poetry run pydocstyle $(PACKAGE) tests
7772

7873
# TESTS #######################################################################
7974

@@ -94,21 +89,33 @@ test-unit: install
9489
@ ( mv $(FAILURES) $(FAILURES).bak || true ) > /dev/null 2>&1
9590
poetry run pytest $(PACKAGE) $(PYTEST_OPTIONS)
9691
@ ( mv $(FAILURES).bak $(FAILURES) || true ) > /dev/null 2>&1
97-
poetry run coveragespace $(REPOSITORY) unit
92+
ifndef DISABLE_COVERAGE
93+
poetry run coveragespace update unit
94+
endif
9895

9996
.PHONY: test-int
10097
test-int: install
10198
@ if test -e $(FAILURES); then poetry run pytest tests $(PYTEST_RERUN_OPTIONS); fi
10299
@ rm -rf $(FAILURES)
103100
poetry run pytest tests $(PYTEST_OPTIONS)
104-
poetry run coveragespace $(REPOSITORY) integration
101+
ifndef DISABLE_COVERAGE
102+
poetry run coveragespace update integration
103+
endif
105104

106105
.PHONY: test-all
107106
test-all: install
108-
@ if test -e $(FAILURES); then poetry run pytest $(PACKAGES) $(PYTEST_RERUN_OPTIONS); fi
107+
@ if test -e $(FAILURES); then poetry run pytest $(PACKAGE) tests $(PYTEST_RERUN_OPTIONS); fi
109108
@ rm -rf $(FAILURES)
110-
poetry run pytest $(PACKAGES) $(PYTEST_OPTIONS)
111-
poetry run coveragespace $(REPOSITORY) overall
109+
poetry run pytest $(PACKAGE) tests $(PYTEST_OPTIONS)
110+
ifndef DISABLE_COVERAGE
111+
poetry run coveragespace update overall
112+
endif
113+
114+
.PHONY: tox
115+
# Export PACKAGES so tox doesn't have to be reconfigured if these change
116+
tox: export TESTS = $(PACKAGE) tests
117+
tox: install
118+
poetry run tox
112119

113120
.PHONY: read-coverage
114121
read-coverage:
@@ -132,8 +139,8 @@ $(MKDOCS_INDEX): docs/requirements.txt mkdocs.yml docs/*.md
132139
poetry run mkdocs build --clean --strict
133140

134141
docs/requirements.txt: poetry.lock
135-
@ poetry run pip freeze -qqq | grep mkdocs > $@
136-
@ poetry run pip freeze -qqq | grep Pygments >> $@
142+
@ poetry export --dev --without-hashes | grep mkdocs > $@
143+
@ poetry export --dev --without-hashes | grep pygments >> $@
137144

138145
.PHONY: uml
139146
uml: install docs/*.png
@@ -150,7 +157,7 @@ mkdocs-serve: mkdocs
150157
# BUILD #######################################################################
151158

152159
DIST_FILES := dist/*.tar.gz dist/*.whl
153-
EXE_FILES := dist/$(PROJECT).*
160+
EXE_FILES := dist/$(PACKAGE).*
154161

155162
.PHONY: dist
156163
dist: install $(DIST_FILES)
@@ -160,20 +167,20 @@ $(DIST_FILES): $(MODULES) pyproject.toml
160167

161168
.PHONY: exe
162169
exe: install $(EXE_FILES)
163-
$(EXE_FILES): $(MODULES) $(PROJECT).spec
170+
$(EXE_FILES): $(MODULES) $(PACKAGE).spec
164171
# For framework/shared support: https://github.com/yyuu/pyenv/wiki
165-
poetry run pyinstaller $(PROJECT).spec --noconfirm --clean
172+
poetry run pyinstaller $(PACKAGE).spec --noconfirm --clean
166173

167-
$(PROJECT).spec:
168-
poetry run pyi-makespec $(PACKAGE)/__main__.py --onefile --windowed --name=$(PROJECT)
174+
$(PACKAGE).spec:
175+
poetry run pyi-makespec $(PACKAGE)/__main__.py --onefile --windowed --name=$(PACKAGE)
169176

170177
# RELEASE #####################################################################
171178

172179
.PHONY: upload
173180
upload: dist ## Upload the current version to PyPI
174181
git diff --name-only --exit-code
175182
poetry publish
176-
bin/open https://pypi.org/project/$(PROJECT)
183+
bin/open https://pypi.org/project/$(PACKAGE)
177184

178185
# CLEANUP #####################################################################
179186

@@ -186,7 +193,7 @@ clean-all: clean
186193

187194
.PHONY: .clean-install
188195
.clean-install:
189-
find $(PACKAGES) -name '__pycache__' -delete
196+
find $(PACKAGE) tests -name '__pycache__' -delete
190197
rm -rf *.egg-info
191198

192199
.PHONY: .clean-test

0 commit comments

Comments
 (0)