adafruit-circuitpython-mlx90395 1.0.9__tar.gz → 1.0.11__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. adafruit-circuitpython-mlx90395-1.0.11/.github/workflows/build.yml +14 -0
  2. adafruit-circuitpython-mlx90395-1.0.11/.github/workflows/release_gh.yml +19 -0
  3. adafruit-circuitpython-mlx90395-1.0.11/.github/workflows/release_pypi.yml +19 -0
  4. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/.gitignore +1 -0
  5. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/.pre-commit-config.yaml +4 -4
  6. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/.pylintrc +4 -41
  7. {adafruit-circuitpython-mlx90395-1.0.9/adafruit_circuitpython_mlx90395.egg-info → adafruit-circuitpython-mlx90395-1.0.11}/PKG-INFO +1 -1
  8. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11/adafruit_circuitpython_mlx90395.egg-info}/PKG-INFO +1 -1
  9. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/adafruit_circuitpython_mlx90395.egg-info/SOURCES.txt +2 -1
  10. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/adafruit_mlx90395.py +1 -3
  11. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/docs/conf.py +1 -0
  12. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/docs/requirements.txt +1 -0
  13. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/pyproject.toml +1 -1
  14. adafruit-circuitpython-mlx90395-1.0.9/.github/workflows/build.yml +0 -77
  15. adafruit-circuitpython-mlx90395-1.0.9/.github/workflows/release.yml +0 -88
  16. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/.github/PULL_REQUEST_TEMPLATE/adafruit_circuitpython_pr.md +0 -0
  17. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/.github/workflows/failure-help-text.yml +0 -0
  18. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/.readthedocs.yaml +0 -0
  19. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/CODE_OF_CONDUCT.md +0 -0
  20. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/LICENSE +0 -0
  21. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/LICENSES/CC-BY-4.0.txt +0 -0
  22. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/LICENSES/MIT.txt +0 -0
  23. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/LICENSES/Unlicense.txt +0 -0
  24. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/README.rst +0 -0
  25. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/README.rst.license +0 -0
  26. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/adafruit_circuitpython_mlx90395.egg-info/dependency_links.txt +0 -0
  27. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/adafruit_circuitpython_mlx90395.egg-info/requires.txt +0 -0
  28. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/adafruit_circuitpython_mlx90395.egg-info/top_level.txt +0 -0
  29. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/docs/_static/favicon.ico +0 -0
  30. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/docs/_static/favicon.ico.license +0 -0
  31. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/docs/api.rst +0 -0
  32. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/docs/api.rst.license +0 -0
  33. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/docs/examples.rst +0 -0
  34. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/docs/examples.rst.license +0 -0
  35. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/docs/index.rst +0 -0
  36. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/docs/index.rst.license +0 -0
  37. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/examples/mlx90395_simpletest.py +0 -0
  38. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/examples/mlx90395_tuning.py +0 -0
  39. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/optional_requirements.txt +0 -0
  40. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/requirements.txt +0 -0
  41. {adafruit-circuitpython-mlx90395-1.0.9 → adafruit-circuitpython-mlx90395-1.0.11}/setup.cfg +0 -0
@@ -0,0 +1,14 @@
1
+ # SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
2
+ #
3
+ # SPDX-License-Identifier: MIT
4
+
5
+ name: Build CI
6
+
7
+ on: [pull_request, push]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Run Build CI workflow
14
+ uses: adafruit/workflows-circuitpython-libs/build@main
@@ -0,0 +1,19 @@
1
+ # SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
2
+ #
3
+ # SPDX-License-Identifier: MIT
4
+
5
+ name: GitHub Release Actions
6
+
7
+ on:
8
+ release:
9
+ types: [published]
10
+
11
+ jobs:
12
+ upload-release-assets:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - name: Run GitHub Release CI workflow
16
+ uses: adafruit/workflows-circuitpython-libs/release-gh@main
17
+ with:
18
+ github-token: ${{ secrets.GITHUB_TOKEN }}
19
+ upload-url: ${{ github.event.release.upload_url }}
@@ -0,0 +1,19 @@
1
+ # SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
2
+ #
3
+ # SPDX-License-Identifier: MIT
4
+
5
+ name: PyPI Release Actions
6
+
7
+ on:
8
+ release:
9
+ types: [published]
10
+
11
+ jobs:
12
+ upload-release-assets:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - name: Run PyPI Release CI workflow
16
+ uses: adafruit/workflows-circuitpython-libs/release-pypi@main
17
+ with:
18
+ pypi-username: ${{ secrets.pypi_username }}
19
+ pypi-password: ${{ secrets.pypi_password }}
@@ -37,6 +37,7 @@ _build
37
37
 
38
38
  # Virtual environment-specific files
39
39
  .env
40
+ .venv
40
41
 
41
42
  # MacOS-specific files
42
43
  *.DS_Store
@@ -4,21 +4,21 @@
4
4
 
5
5
  repos:
6
6
  - repo: https://github.com/python/black
7
- rev: 22.3.0
7
+ rev: 23.3.0
8
8
  hooks:
9
9
  - id: black
10
10
  - repo: https://github.com/fsfe/reuse-tool
11
- rev: v0.14.0
11
+ rev: v1.1.2
12
12
  hooks:
13
13
  - id: reuse
14
14
  - repo: https://github.com/pre-commit/pre-commit-hooks
15
- rev: v4.2.0
15
+ rev: v4.4.0
16
16
  hooks:
17
17
  - id: check-yaml
18
18
  - id: end-of-file-fixer
19
19
  - id: trailing-whitespace
20
20
  - repo: https://github.com/pycqa/pylint
21
- rev: v2.11.1
21
+ rev: v2.17.4
22
22
  hooks:
23
23
  - id: pylint
24
24
  name: pylint (library code)
@@ -26,7 +26,7 @@ jobs=1
26
26
 
27
27
  # List of plugins (as comma separated values of python modules names) to load,
28
28
  # usually to register additional checkers.
29
- load-plugins=
29
+ load-plugins=pylint.extensions.no_self_use
30
30
 
31
31
  # Pickle collected data for later comparisons.
32
32
  persistent=yes
@@ -54,8 +54,8 @@ confidence=
54
54
  # --enable=similarities". If you want to run only the classes checker, but have
55
55
  # no Warning level messages displayed, use"--disable=all --enable=classes
56
56
  # --disable=W"
57
- # disable=import-error,print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call
58
- disable=print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call,import-error,bad-continuation,unspecified-encoding
57
+ # disable=import-error,raw-checker-failed,bad-inline-option,locally-disabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,deprecated-str-translate-call
58
+ disable=raw-checker-failed,bad-inline-option,locally-disabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,import-error,pointless-string-statement,unspecified-encoding
59
59
 
60
60
  # Enable the message, report, category or checker with the given id(s). You can
61
61
  # either give multiple identifier separated by comma (,) or put this option
@@ -225,12 +225,6 @@ max-line-length=100
225
225
  # Maximum number of lines in a module
226
226
  max-module-lines=1000
227
227
 
228
- # List of optional constructs for which whitespace checking is disabled. `dict-
229
- # separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
230
- # `trailing-comma` allows a space between comma and closing bracket: (a, ).
231
- # `empty-line` allows space-only lines.
232
- no-space-check=trailing-comma,dict-separator
233
-
234
228
  # Allow the body of a class to be on the same line as the declaration if body
235
229
  # contains single statement.
236
230
  single-line-class-stmt=no
@@ -257,38 +251,22 @@ min-similarity-lines=12
257
251
 
258
252
  [BASIC]
259
253
 
260
- # Naming hint for argument names
261
- argument-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
262
-
263
254
  # Regular expression matching correct argument names
264
255
  argument-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
265
256
 
266
- # Naming hint for attribute names
267
- attr-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
268
-
269
257
  # Regular expression matching correct attribute names
270
258
  attr-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
271
259
 
272
260
  # Bad variable names which should always be refused, separated by a comma
273
261
  bad-names=foo,bar,baz,toto,tutu,tata
274
262
 
275
- # Naming hint for class attribute names
276
- class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
277
-
278
263
  # Regular expression matching correct class attribute names
279
264
  class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
280
265
 
281
- # Naming hint for class names
282
- # class-name-hint=[A-Z_][a-zA-Z0-9]+$
283
- class-name-hint=[A-Z_][a-zA-Z0-9_]+$
284
-
285
266
  # Regular expression matching correct class names
286
267
  # class-rgx=[A-Z_][a-zA-Z0-9]+$
287
268
  class-rgx=[A-Z_][a-zA-Z0-9_]+$
288
269
 
289
- # Naming hint for constant names
290
- const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
291
-
292
270
  # Regular expression matching correct constant names
293
271
  const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
294
272
 
@@ -296,9 +274,6 @@ const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
296
274
  # ones are exempt.
297
275
  docstring-min-length=-1
298
276
 
299
- # Naming hint for function names
300
- function-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
301
-
302
277
  # Regular expression matching correct function names
303
278
  function-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
304
279
 
@@ -309,21 +284,12 @@ good-names=r,g,b,w,i,j,k,n,x,y,z,ex,ok,Run,_
309
284
  # Include a hint for the correct naming format with invalid-name
310
285
  include-naming-hint=no
311
286
 
312
- # Naming hint for inline iteration names
313
- inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
314
-
315
287
  # Regular expression matching correct inline iteration names
316
288
  inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
317
289
 
318
- # Naming hint for method names
319
- method-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
320
-
321
290
  # Regular expression matching correct method names
322
291
  method-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
323
292
 
324
- # Naming hint for module names
325
- module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
326
-
327
293
  # Regular expression matching correct module names
328
294
  module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
329
295
 
@@ -339,9 +305,6 @@ no-docstring-rgx=^_
339
305
  # to this list to register other decorators that produce valid properties.
340
306
  property-classes=abc.abstractproperty
341
307
 
342
- # Naming hint for variable names
343
- variable-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
344
-
345
308
  # Regular expression matching correct variable names
346
309
  variable-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
347
310
 
@@ -433,4 +396,4 @@ min-public-methods=1
433
396
 
434
397
  # Exceptions that will emit a warning when being caught. Defaults to
435
398
  # "Exception"
436
- overgeneral-exceptions=Exception
399
+ overgeneral-exceptions=builtins.Exception
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: adafruit-circuitpython-mlx90395
3
- Version: 1.0.9
3
+ Version: 1.0.11
4
4
  Summary: CircuitPython helper library for using the Adafruit MLX90395 tri-Axis magnetometer breakout
5
5
  Author-email: Adafruit Industries <circuitpython@adafruit.com>
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: adafruit-circuitpython-mlx90395
3
- Version: 1.0.9
3
+ Version: 1.0.11
4
4
  Summary: CircuitPython helper library for using the Adafruit MLX90395 tri-Axis magnetometer breakout
5
5
  Author-email: Adafruit Industries <circuitpython@adafruit.com>
6
6
  License: MIT
@@ -13,7 +13,8 @@ requirements.txt
13
13
  .github/PULL_REQUEST_TEMPLATE/adafruit_circuitpython_pr.md
14
14
  .github/workflows/build.yml
15
15
  .github/workflows/failure-help-text.yml
16
- .github/workflows/release.yml
16
+ .github/workflows/release_gh.yml
17
+ .github/workflows/release_pypi.yml
17
18
  LICENSES/CC-BY-4.0.txt
18
19
  LICENSES/MIT.txt
19
20
  LICENSES/Unlicense.txt
@@ -55,7 +55,7 @@ try:
55
55
  except ImportError:
56
56
  pass
57
57
 
58
- __version__ = "1.0.9"
58
+ __version__ = "1.0.11"
59
59
  __repo__ = "https:#github.com/adafruit/Adafruit_CircuitPython_MLX90395.git"
60
60
 
61
61
  _DEFAULT_ADDR = const(0x0C) ## Can also be 0x18, depending on IC */
@@ -233,7 +233,6 @@ class MLX90395:
233
233
  self._gain_val = value
234
234
 
235
235
  def _command(self, command_id: int) -> int:
236
-
237
236
  buffer = bytearray([0x80, command_id])
238
237
  with self.i2c_device as i2c:
239
238
  i2c.write_then_readinto(buffer, buffer, in_end=1)
@@ -254,7 +253,6 @@ class MLX90395:
254
253
  return res
255
254
 
256
255
  def _read_measurement(self) -> Tuple[float, float, float]:
257
-
258
256
  # clear the buffer
259
257
  for i in range(len(self._buffer)): # pylint: disable=consider-using-enumerate
260
258
  self._buffer[i] = 0
@@ -17,6 +17,7 @@ sys.path.insert(0, os.path.abspath(".."))
17
17
  # ones.
18
18
  extensions = [
19
19
  "sphinx.ext.autodoc",
20
+ "sphinxcontrib.jquery",
20
21
  "sphinx.ext.intersphinx",
21
22
  "sphinx.ext.napoleon",
22
23
  "sphinx.ext.todo",
@@ -3,3 +3,4 @@
3
3
  # SPDX-License-Identifier: Unlicense
4
4
 
5
5
  sphinx>=4.0.0
6
+ sphinxcontrib-jquery
@@ -12,7 +12,7 @@ requires = [
12
12
  [project]
13
13
  name = "adafruit-circuitpython-mlx90395"
14
14
  description = "CircuitPython helper library for using the Adafruit MLX90395 tri-Axis magnetometer breakout"
15
- version = "1.0.9"
15
+ version = "1.0.11"
16
16
  readme = "README.rst"
17
17
  authors = [
18
18
  {name = "Adafruit Industries", email = "circuitpython@adafruit.com"}
@@ -1,77 +0,0 @@
1
- # SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
2
- #
3
- # SPDX-License-Identifier: MIT
4
-
5
- name: Build CI
6
-
7
- on: [pull_request, push]
8
-
9
- jobs:
10
- test:
11
- runs-on: ubuntu-latest
12
- steps:
13
- - name: Dump GitHub context
14
- env:
15
- GITHUB_CONTEXT: ${{ toJson(github) }}
16
- run: echo "$GITHUB_CONTEXT"
17
- - name: Translate Repo Name For Build Tools filename_prefix
18
- id: repo-name
19
- run: |
20
- echo ::set-output name=repo-name::$(
21
- echo ${{ github.repository }} |
22
- awk -F '\/' '{ print tolower($2) }' |
23
- tr '_' '-'
24
- )
25
- - name: Set up Python 3.x
26
- uses: actions/setup-python@v2
27
- with:
28
- python-version: "3.x"
29
- - name: Versions
30
- run: |
31
- python3 --version
32
- - name: Checkout Current Repo
33
- uses: actions/checkout@v1
34
- with:
35
- submodules: true
36
- - name: Checkout tools repo
37
- uses: actions/checkout@v2
38
- with:
39
- repository: adafruit/actions-ci-circuitpython-libs
40
- path: actions-ci
41
- - name: Install dependencies
42
- # (e.g. - apt-get: gettext, etc; pip: circuitpython-build-tools, requirements.txt; etc.)
43
- run: |
44
- source actions-ci/install.sh
45
- - name: Pip install Sphinx, pre-commit
46
- run: |
47
- pip install --force-reinstall Sphinx sphinx-rtd-theme pre-commit
48
- - name: Library version
49
- run: git describe --dirty --always --tags
50
- - name: Setup problem matchers
51
- uses: adafruit/circuitpython-action-library-ci-problem-matchers@v1
52
- - name: Pre-commit hooks
53
- run: |
54
- pre-commit run --all-files
55
- - name: Build assets
56
- run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location .
57
- - name: Archive bundles
58
- uses: actions/upload-artifact@v2
59
- with:
60
- name: bundles
61
- path: ${{ github.workspace }}/bundles/
62
- - name: Build docs
63
- working-directory: docs
64
- run: sphinx-build -E -W -b html . _build/html
65
- - name: Check For pyproject.toml
66
- id: need-pypi
67
- run: |
68
- echo ::set-output name=pyproject-toml::$( find . -wholename './pyproject.toml' )
69
- - name: Build Python package
70
- if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
71
- run: |
72
- pip install --upgrade build twine
73
- for file in $(find -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) ); do
74
- sed -i -e "s/0.0.0+auto.0/1.2.3/" $file;
75
- done;
76
- python -m build
77
- twine check dist/*
@@ -1,88 +0,0 @@
1
- # SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
2
- #
3
- # SPDX-License-Identifier: MIT
4
-
5
- name: Release Actions
6
-
7
- on:
8
- release:
9
- types: [published]
10
-
11
- jobs:
12
- upload-release-assets:
13
- runs-on: ubuntu-latest
14
- steps:
15
- - name: Dump GitHub context
16
- env:
17
- GITHUB_CONTEXT: ${{ toJson(github) }}
18
- run: echo "$GITHUB_CONTEXT"
19
- - name: Translate Repo Name For Build Tools filename_prefix
20
- id: repo-name
21
- run: |
22
- echo ::set-output name=repo-name::$(
23
- echo ${{ github.repository }} |
24
- awk -F '\/' '{ print tolower($2) }' |
25
- tr '_' '-'
26
- )
27
- - name: Set up Python 3.x
28
- uses: actions/setup-python@v2
29
- with:
30
- python-version: "3.x"
31
- - name: Versions
32
- run: |
33
- python3 --version
34
- - name: Checkout Current Repo
35
- uses: actions/checkout@v1
36
- with:
37
- submodules: true
38
- - name: Checkout tools repo
39
- uses: actions/checkout@v2
40
- with:
41
- repository: adafruit/actions-ci-circuitpython-libs
42
- path: actions-ci
43
- - name: Install deps
44
- run: |
45
- source actions-ci/install.sh
46
- - name: Build assets
47
- run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location .
48
- - name: Upload Release Assets
49
- # the 'official' actions version does not yet support dynamically
50
- # supplying asset names to upload. @csexton's version chosen based on
51
- # discussion in the issue below, as its the simplest to implement and
52
- # allows for selecting files with a pattern.
53
- # https://github.com/actions/upload-release-asset/issues/4
54
- #uses: actions/upload-release-asset@v1.0.1
55
- uses: csexton/release-asset-action@master
56
- with:
57
- pattern: "bundles/*"
58
- github-token: ${{ secrets.GITHUB_TOKEN }}
59
-
60
- upload-pypi:
61
- runs-on: ubuntu-latest
62
- steps:
63
- - uses: actions/checkout@v1
64
- - name: Check For pyproject.toml
65
- id: need-pypi
66
- run: |
67
- echo ::set-output name=pyproject-toml::$( find . -wholename './pyproject.toml' )
68
- - name: Set up Python
69
- if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
70
- uses: actions/setup-python@v2
71
- with:
72
- python-version: '3.x'
73
- - name: Install dependencies
74
- if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
75
- run: |
76
- python -m pip install --upgrade pip
77
- pip install --upgrade build twine
78
- - name: Build and publish
79
- if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
80
- env:
81
- TWINE_USERNAME: ${{ secrets.pypi_username }}
82
- TWINE_PASSWORD: ${{ secrets.pypi_password }}
83
- run: |
84
- for file in $(find -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) ); do
85
- sed -i -e "s/0.0.0+auto.0/${{github.event.release.tag_name}}/" $file;
86
- done;
87
- python -m build
88
- twine upload dist/*