Skip to content
This repository was archived by the owner on Dec 12, 2022. It is now read-only.

Commit 7412ee6

Browse files
authored
dep: Update dependencies (#29)
various update
1 parent bb14700 commit 7412ee6

11 files changed

+1035
-982
lines changed

.github/README.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,20 @@ git clone [email protected]:qctrl/python-pyquil.git
4747

4848
Once the clone is complete, you have two options:
4949

50-
1. Using setup.py
50+
1. Using pip
5151

5252
```shell
5353
cd python-pyquil
54-
python setup.py develop
54+
poetry export --dev -f requirements.txt --output requirements.txt --without-hashes
55+
pip install -r requirements.txt
56+
pip install -e .
5557
```
5658

57-
**Note:** We recommend installing using `develop` to point your installation
58-
at the source code in the directory where you cloned the repository.
59-
6059
1. Using Poetry
6160

6261
```shell
6362
cd python-pyquil
64-
./setup-poetry.sh
63+
poetry install
6564
```
6665

6766
**Note:** if you are on Windows, you'll need to install

.github/workflows/on-push.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
run: |
2020
source <(curl -sL http://ci.q-ctrl.com)
2121
./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }}
22-
./ci docker run qctrl/python-build:3.7 /scripts/housekeeping.sh
22+
./ci docker run qctrl/ci-images:python-3.7-ci /scripts/housekeeping.sh
2323
2424
linting:
2525
runs-on: ubuntu-latest
@@ -29,16 +29,16 @@ jobs:
2929
run: |
3030
source <(curl -sL http://ci.q-ctrl.com)
3131
./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }}
32-
./ci docker run qctrl/python-build:3.7 /scripts/install-python-dependencies.sh
32+
./ci docker run qctrl/ci-images:python-3.7-ci /scripts/install-python-dependencies.sh
3333
- name: Run Pylint
3434
run: |
35-
./ci docker run qctrl/python-build:3.7 poetry run pylint_runner || true
35+
./ci docker run qctrl/ci-images:python-3.7-ci poetry run pylint_runner || true
3636
- name: Run Pylama
3737
run: |
38-
./ci docker run qctrl/python-build:3.7 poetry run pylama || true
38+
./ci docker run qctrl/ci-images:python-3.7-ci poetry run pylama || true
3939
- name: Run Markdownlint
4040
run: |
41-
./ci docker run qctrl/python-build:3.7 mdl -- -ig . || true
41+
./ci docker run qctrl/ci-images:python-3.7-ci mdl -- -ig . || true
4242
4343
pytest:
4444
runs-on: ubuntu-latest
@@ -51,10 +51,10 @@ jobs:
5151
run: |
5252
source <(curl -sL http://ci.q-ctrl.com)
5353
./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }}
54-
./ci docker run qctrl/python-build:${{ matrix.python }} /scripts/install-python-dependencies.sh
54+
./ci docker run qctrl/ci-images:python-${{ matrix.python }}-ci /scripts/install-python-dependencies.sh
5555
- name: Run Pytest
5656
run: |
57-
./ci docker run qctrl/python-build:${{ matrix.python }} /scripts/pytest.sh
57+
./ci docker run qctrl/ci-images:python-${{ matrix.python }}-ci /scripts/pytest.sh
5858
5959
publish_internally:
6060
runs-on: ubuntu-latest
@@ -66,4 +66,4 @@ jobs:
6666
run: |
6767
source <(curl -sL http://ci.q-ctrl.com)
6868
./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }}
69-
./ci docker run qctrl/python-build:3.7 /scripts/publish-dev-version.sh
69+
./ci docker run qctrl/ci-images:python-3.7-ci /scripts/publish-dev-version.sh

.pylintrc

+11-77
Original file line numberDiff line numberDiff line change
@@ -54,82 +54,23 @@ confidence=
5454
# --enable=similarities". If you want to run only the classes checker, but have
5555
# no Warning level messages displayed, use"--disable=all --enable=classes
5656
# --disable=W"
57-
disable=duplicate-code,
58-
print-statement,
59-
parameter-unpacking,
60-
unpacking-in-except,
61-
old-raise-syntax,
62-
backtick,
63-
long-suffix,
64-
old-ne-operator,
65-
old-octal-literal,
66-
import-star-module-level,
67-
non-ascii-bytes-literal,
68-
raw-checker-failed,
57+
disable=raw-checker-failed,
6958
bad-inline-option,
7059
locally-disabled,
71-
locally-enabled,
7260
file-ignored,
7361
suppressed-message,
7462
useless-suppression,
7563
deprecated-pragma,
76-
apply-builtin,
77-
basestring-builtin,
78-
buffer-builtin,
79-
cmp-builtin,
80-
coerce-builtin,
81-
execfile-builtin,
82-
file-builtin,
83-
long-builtin,
84-
raw_input-builtin,
85-
reduce-builtin,
86-
standarderror-builtin,
87-
unicode-builtin,
88-
xran
89-
ge-builtin,
90-
coerce-method,
91-
delslice-method,
92-
getslice-method,
93-
setslice-method,
94-
no-absolute-import,
95-
old-division,
96-
dict-iter-method,
97-
dict-view-method,
98-
next-method-called,
99-
metaclass-assignment,
100-
indexing-exception,
101-
raising-string,
102-
reload-builtin,
103-
oct-method,
104-
hex-method,
105-
nonzero-method,
106-
cmp-method,
107-
input-builtin,
108-
round-builtin,
109-
intern-builtin,
110-
unichr-builtin,
111-
map-builtin-not-iterating,
112-
zip-builtin-not-iterating,
113-
range-builtin-not-iterating,
114-
filter-builtin-not-iterating,
115-
using-cmp-argument,
116-
eq-without-hash,
117-
div-method,
118-
idiv-method,
119-
rdiv-method,
120-
exception-message-attribute,
121-
invalid-str-codec,
122-
sys-max-int,
123-
bad-python3-import,
124-
deprecated-string-function,
125-
deprecated-str-translate-call,
126-
deprecated-itertools-function,
127-
deprecated-types-field,
128-
next-method-defined,
129-
dict-items-not-iterating,
130-
dict-keys-not-iterating,
131-
dict-values-not-iterating,
132-
useless-object-inheritance
64+
use-symbolic-message-instead,
65+
## Excessive false positives
66+
duplicate-code,
67+
## We have code review to ensure readability, no need for the following
68+
## highly-opinionated checks
69+
too-many-arguments,
70+
too-many-branches,
71+
too-many-lines,
72+
too-many-locals,
73+
too-many-statements,
13374

13475
# Enable the message, report, category or checker with the given id(s). You can
13576
# either give multiple identifier separated by comma (,) or put this option
@@ -324,13 +265,6 @@ max-line-length=100
324265
# Maximum number of lines in a module
325266
max-module-lines=1000
326267

327-
# List of optional constructs for which whitespace checking is disabled. `dict-
328-
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
329-
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
330-
# `empty-line` allows space-only lines.
331-
no-space-check=trailing-comma,
332-
dict-separator
333-
334268
# Allow the body of a class to be on the same line as the declaration if body
335269
# contains single statement.
336270
single-line-class-stmt=no

README.rst

-10
This file was deleted.

docs/conf.py

+19-15
Original file line numberDiff line numberDiff line change
@@ -21,40 +21,44 @@
2121

2222
# -- Path setup --------------------------------------------------------------
2323

24+
import datetime
25+
2426
# If extensions (or modules to document with autodoc) are in another directory,
2527
# add these directories to sys.path here. If the directory is relative to the
2628
# documentation root, use os.path.abspath to make it absolute, like shown here.
2729
#
2830
import os
2931
import sys
32+
3033
import toml
3134

32-
sys.path.insert(0, os.path.abspath('..'))
35+
# pylint:disable=invalid-name
36+
sys.path.insert(0, os.path.abspath(".."))
3337

3438
# -- Project information -----------------------------------------------------
3539
parsed = toml.load("../pyproject.toml")
36-
package_info = parsed['tool']['poetry']
37-
project = package_info['description']
38-
author = ", ".join(package_info['authors'])
39-
release = package_info['version']
40-
copyright = f"{datetime.datetime.now().year}, Q-CTRL <[email protected]>"
40+
package_info = parsed["tool"]["poetry"]
41+
project = package_info["description"]
42+
author = ", ".join(package_info["authors"])
43+
release = package_info["version"]
44+
copyright = f"{datetime.datetime.now().year}, Q-CTRL <[email protected]>" # pylint: disable=redefined-builtin
4145

4246
# -- General configuration ---------------------------------------------------
4347

4448
# Add any Sphinx extension module names here, as strings. They can be
4549
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
4650
# ones.
4751
extensions = [
48-
'sphinx.ext.autodoc',
49-
'sphinx.ext.coverage',
50-
'sphinx.ext.mathjax',
51-
'sphinx.ext.napoleon'
52+
"sphinx.ext.autodoc",
53+
"sphinx.ext.coverage",
54+
"sphinx.ext.mathjax",
55+
"sphinx.ext.napoleon",
5256
]
5357

54-
master_doc = 'index'
58+
master_doc = "index"
5559

5660
# Add any paths that contain templates here, relative to this directory.
57-
templates_path = ['_templates']
61+
templates_path = ["_templates"]
5862

5963
# List of patterns, relative to source directory, that match files and
6064
# directories to ignore when looking for source files.
@@ -67,12 +71,12 @@
6771
# The theme to use for HTML and HTML Help pages. See the documentation for
6872
# a list of builtin themes.
6973
#
70-
html_theme = 'default'
74+
html_theme = "default"
7175

7276
# Add any paths that contain custom static files (such as style sheets) here,
7377
# relative to this directory. They are copied after the builtin static files,
7478
# so a file named "default.css" will overwrite the builtin "default.css".
75-
html_static_path = ['_static']
79+
html_static_path = ["_static"]
7680
html_css_files = [
77-
'css/custom.css',
81+
"css/custom.css",
7882
]

0 commit comments

Comments
 (0)