scyjava 1.10.0__tar.gz → 1.10.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. {scyjava-1.10.0 → scyjava-1.10.2}/Makefile +3 -0
  2. {scyjava-1.10.0/src/scyjava.egg-info → scyjava-1.10.2}/PKG-INFO +6 -8
  3. scyjava-1.10.2/bin/fmt.sh +11 -0
  4. {scyjava-1.10.0 → scyjava-1.10.2}/bin/lint.sh +2 -4
  5. {scyjava-1.10.0 → scyjava-1.10.2}/dev-environment.yml +4 -9
  6. {scyjava-1.10.0 → scyjava-1.10.2}/environment.yml +0 -1
  7. {scyjava-1.10.0 → scyjava-1.10.2}/pyproject.toml +17 -17
  8. scyjava-1.10.2/src/scyjava/.__init__.py.swp +0 -0
  9. {scyjava-1.10.0 → scyjava-1.10.2/src/scyjava.egg-info}/PKG-INFO +6 -8
  10. {scyjava-1.10.0 → scyjava-1.10.2}/src/scyjava.egg-info/SOURCES.txt +8 -0
  11. {scyjava-1.10.0 → scyjava-1.10.2}/src/scyjava.egg-info/requires.txt +2 -6
  12. scyjava-1.10.2/tests/.pytest_cache/.gitignore +2 -0
  13. scyjava-1.10.2/tests/.pytest_cache/CACHEDIR.TAG +4 -0
  14. scyjava-1.10.2/tests/.pytest_cache/README.md +8 -0
  15. scyjava-1.10.2/tests/.pytest_cache/v/cache/lastfailed +3 -0
  16. scyjava-1.10.2/tests/.pytest_cache/v/cache/nodeids +4 -0
  17. scyjava-1.10.2/tests/.pytest_cache/v/cache/stepwise +1 -0
  18. scyjava-1.10.2/tests/it/java_heap.py +35 -0
  19. scyjava-1.10.0/tests/it/java_heap.py +0 -34
  20. {scyjava-1.10.0 → scyjava-1.10.2}/MANIFEST.in +0 -0
  21. {scyjava-1.10.0 → scyjava-1.10.2}/README.md +0 -0
  22. {scyjava-1.10.0 → scyjava-1.10.2}/UNLICENSE +0 -0
  23. {scyjava-1.10.0 → scyjava-1.10.2}/bin/check.sh +0 -0
  24. {scyjava-1.10.0 → scyjava-1.10.2}/bin/clean.sh +0 -0
  25. {scyjava-1.10.0 → scyjava-1.10.2}/bin/setup.sh +0 -0
  26. {scyjava-1.10.0 → scyjava-1.10.2}/bin/test.sh +0 -0
  27. {scyjava-1.10.0 → scyjava-1.10.2}/setup.cfg +0 -0
  28. {scyjava-1.10.0 → scyjava-1.10.2}/src/scyjava/__init__.py +0 -0
  29. {scyjava-1.10.0 → scyjava-1.10.2}/src/scyjava/_arrays.py +0 -0
  30. {scyjava-1.10.0 → scyjava-1.10.2}/src/scyjava/_convert.py +0 -0
  31. {scyjava-1.10.0 → scyjava-1.10.2}/src/scyjava/_jvm.py +0 -0
  32. {scyjava-1.10.0 → scyjava-1.10.2}/src/scyjava/_script.py +0 -0
  33. {scyjava-1.10.0 → scyjava-1.10.2}/src/scyjava/_types.py +0 -0
  34. {scyjava-1.10.0 → scyjava-1.10.2}/src/scyjava/_versions.py +0 -0
  35. {scyjava-1.10.0 → scyjava-1.10.2}/src/scyjava/config.py +0 -0
  36. {scyjava-1.10.0 → scyjava-1.10.2}/src/scyjava.egg-info/dependency_links.txt +0 -0
  37. {scyjava-1.10.0 → scyjava-1.10.2}/src/scyjava.egg-info/top_level.txt +0 -0
  38. {scyjava-1.10.0 → scyjava-1.10.2}/tests/it/awt.py +0 -0
  39. {scyjava-1.10.0 → scyjava-1.10.2}/tests/it/headless.py +0 -0
  40. {scyjava-1.10.0 → scyjava-1.10.2}/tests/it/jvm_version.py +0 -0
  41. {scyjava-1.10.0 → scyjava-1.10.2}/tests/it/scripting.py +0 -0
  42. {scyjava-1.10.0 → scyjava-1.10.2}/tests/test_arrays.py +0 -0
  43. {scyjava-1.10.0 → scyjava-1.10.2}/tests/test_basics.py +0 -0
  44. {scyjava-1.10.0 → scyjava-1.10.2}/tests/test_convert.py +0 -0
  45. {scyjava-1.10.0 → scyjava-1.10.2}/tests/test_pandas.py +0 -0
  46. {scyjava-1.10.0 → scyjava-1.10.2}/tests/test_types.py +0 -0
  47. {scyjava-1.10.0 → scyjava-1.10.2}/tests/test_version.py +0 -0
@@ -20,6 +20,9 @@ check:
20
20
  lint: check
21
21
  bin/lint.sh
22
22
 
23
+ fmt: check
24
+ bin/fmt.sh
25
+
23
26
  test: check
24
27
  bin/test.sh
25
28
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: scyjava
3
- Version: 1.10.0
3
+ Version: 1.10.2
4
4
  Summary: Supercharged Java access from Python
5
5
  Author-email: SciJava developers <ctrueden@wisc.edu>
6
6
  License: The Unlicense
@@ -18,6 +18,8 @@ Classifier: Programming Language :: Python :: 3 :: Only
18
18
  Classifier: Programming Language :: Python :: 3.8
19
19
  Classifier: Programming Language :: Python :: 3.9
20
20
  Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
21
23
  Classifier: License :: OSI Approved :: The Unlicense (Unlicense)
22
24
  Classifier: Operating System :: Microsoft :: Windows
23
25
  Classifier: Operating System :: Unix
@@ -31,18 +33,14 @@ Description-Content-Type: text/markdown
31
33
  Requires-Dist: jpype1>=1.3.0
32
34
  Requires-Dist: jgo
33
35
  Provides-Extra: dev
34
- Requires-Dist: autopep8; extra == "dev"
35
- Requires-Dist: black; extra == "dev"
36
+ Requires-Dist: assertpy; extra == "dev"
36
37
  Requires-Dist: build; extra == "dev"
37
- Requires-Dist: flake8; extra == "dev"
38
- Requires-Dist: flake8-pyproject; extra == "dev"
39
- Requires-Dist: flake8-typing-imports; extra == "dev"
40
- Requires-Dist: isort; extra == "dev"
41
38
  Requires-Dist: jep; extra == "dev"
42
39
  Requires-Dist: pytest; extra == "dev"
43
40
  Requires-Dist: pytest-cov; extra == "dev"
44
41
  Requires-Dist: numpy; extra == "dev"
45
42
  Requires-Dist: pandas; extra == "dev"
43
+ Requires-Dist: ruff; extra == "dev"
46
44
  Requires-Dist: toml; extra == "dev"
47
45
  Requires-Dist: validate-pyproject[all]; extra == "dev"
48
46
 
@@ -0,0 +1,11 @@
1
+ #!/bin/sh
2
+
3
+ dir=$(dirname "$0")
4
+ cd "$dir/.."
5
+
6
+ exitCode=0
7
+ ruff check --fix
8
+ code=$?; test $code -eq 0 || exitCode=$code
9
+ ruff format
10
+ code=$?; test $code -eq 0 || exitCode=$code
11
+ exit $exitCode
@@ -4,11 +4,9 @@ dir=$(dirname "$0")
4
4
  cd "$dir/.."
5
5
 
6
6
  exitCode=0
7
- black src tests
7
+ ruff check
8
8
  code=$?; test $code -eq 0 || exitCode=$code
9
- isort src tests
10
- code=$?; test $code -eq 0 || exitCode=$code
11
- python -m flake8 src tests
9
+ ruff format --check
12
10
  code=$?; test $code -eq 0 || exitCode=$code
13
11
  validate-pyproject pyproject.toml
14
12
  code=$?; test $code -eq 0 || exitCode=$code
@@ -17,7 +17,6 @@
17
17
  name: scyjava-dev
18
18
  channels:
19
19
  - conda-forge
20
- - defaults
21
20
  dependencies:
22
21
  - python >= 3.8
23
22
  # Project dependencies
@@ -28,19 +27,15 @@ dependencies:
28
27
  - numpy
29
28
  - pandas
30
29
  # Developer tools
31
- - autopep8
32
- - black
33
- - build
34
- - flake8
35
- - flake8-typing-imports
36
- - isort
30
+ - assertpy
37
31
  - pytest
38
32
  - pytest-cov
33
+ - python-build
34
+ - ruff
39
35
  - toml
36
+ - validate-pyproject
40
37
  # Project from source
41
38
  - pip
42
39
  - pip:
43
40
  - git+https://github.com/ninia/jep.git@cfca63f8b3398daa6d2685428660dc4b2bfab67d
44
- - flake8-pyproject
45
- - validate-pyproject[all]
46
41
  - -e .
@@ -18,7 +18,6 @@
18
18
  name: scyjava
19
19
  channels:
20
20
  - conda-forge
21
- - defaults
22
21
  dependencies:
23
22
  - python >= 3.8
24
23
  # Project dependencies
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "scyjava"
7
- version = "1.10.0"
7
+ version = "1.10.2"
8
8
  description = "Supercharged Java access from Python"
9
9
  license = {text = "The Unlicense"}
10
10
  authors = [{name = "SciJava developers", email = "ctrueden@wisc.edu"}]
@@ -19,6 +19,8 @@ classifiers = [
19
19
  "Programming Language :: Python :: 3.8",
20
20
  "Programming Language :: Python :: 3.9",
21
21
  "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Programming Language :: Python :: 3.12",
22
24
  "License :: OSI Approved :: The Unlicense (Unlicense)",
23
25
  "Operating System :: Microsoft :: Windows",
24
26
  "Operating System :: Unix",
@@ -39,20 +41,16 @@ dependencies = [
39
41
  [project.optional-dependencies]
40
42
  # NB: Keep this in sync with dev-environment.yml!
41
43
  dev = [
42
- "autopep8",
43
- "black",
44
+ "assertpy",
44
45
  "build",
45
- "flake8",
46
- "flake8-pyproject",
47
- "flake8-typing-imports",
48
- "isort",
49
46
  "jep",
50
47
  "pytest",
51
48
  "pytest-cov",
52
49
  "numpy",
53
50
  "pandas",
51
+ "ruff",
54
52
  "toml",
55
- "validate-pyproject[all]",
53
+ "validate-pyproject[all]"
56
54
  ]
57
55
 
58
56
  [project.urls]
@@ -70,14 +68,16 @@ include-package-data = false
70
68
  where = ["src"]
71
69
  namespaces = false
72
70
 
73
- # Thanks to Flake8-pyproject, we can configure flake8 here!
74
- [tool.flake8]
75
- exclude = ["bin", "build", "dist"]
71
+ # ruff configuration
72
+ [tool.ruff]
73
+ line-length = 88
74
+ src = ["src", "tests"]
75
+ include = ["pyproject.toml", "src/**/*.py", "tests/**/*.py"]
76
+ extend-exclude = ["bin", "build", "dist"]
77
+
78
+ [tool.ruff.lint]
76
79
  extend-ignore = ["E203"]
77
- # See https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#flake8
78
- max-line-length = 88
79
- min_python_version = "3.8"
80
- per-file-ignores = "__init__.py:F401"
81
80
 
82
- [tool.isort]
83
- profile = "black"
81
+ [tool.ruff.lint.per-file-ignores]
82
+ # Ignore `E402` (import violations) in all `__init__.py` files, and in `path/to/file.py`.
83
+ "__init__.py" = ["E402", "F401"]
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: scyjava
3
- Version: 1.10.0
3
+ Version: 1.10.2
4
4
  Summary: Supercharged Java access from Python
5
5
  Author-email: SciJava developers <ctrueden@wisc.edu>
6
6
  License: The Unlicense
@@ -18,6 +18,8 @@ Classifier: Programming Language :: Python :: 3 :: Only
18
18
  Classifier: Programming Language :: Python :: 3.8
19
19
  Classifier: Programming Language :: Python :: 3.9
20
20
  Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
21
23
  Classifier: License :: OSI Approved :: The Unlicense (Unlicense)
22
24
  Classifier: Operating System :: Microsoft :: Windows
23
25
  Classifier: Operating System :: Unix
@@ -31,18 +33,14 @@ Description-Content-Type: text/markdown
31
33
  Requires-Dist: jpype1>=1.3.0
32
34
  Requires-Dist: jgo
33
35
  Provides-Extra: dev
34
- Requires-Dist: autopep8; extra == "dev"
35
- Requires-Dist: black; extra == "dev"
36
+ Requires-Dist: assertpy; extra == "dev"
36
37
  Requires-Dist: build; extra == "dev"
37
- Requires-Dist: flake8; extra == "dev"
38
- Requires-Dist: flake8-pyproject; extra == "dev"
39
- Requires-Dist: flake8-typing-imports; extra == "dev"
40
- Requires-Dist: isort; extra == "dev"
41
38
  Requires-Dist: jep; extra == "dev"
42
39
  Requires-Dist: pytest; extra == "dev"
43
40
  Requires-Dist: pytest-cov; extra == "dev"
44
41
  Requires-Dist: numpy; extra == "dev"
45
42
  Requires-Dist: pandas; extra == "dev"
43
+ Requires-Dist: ruff; extra == "dev"
46
44
  Requires-Dist: toml; extra == "dev"
47
45
  Requires-Dist: validate-pyproject[all]; extra == "dev"
48
46
 
@@ -7,9 +7,11 @@ environment.yml
7
7
  pyproject.toml
8
8
  bin/check.sh
9
9
  bin/clean.sh
10
+ bin/fmt.sh
10
11
  bin/lint.sh
11
12
  bin/setup.sh
12
13
  bin/test.sh
14
+ src/scyjava/.__init__.py.swp
13
15
  src/scyjava/__init__.py
14
16
  src/scyjava/_arrays.py
15
17
  src/scyjava/_convert.py
@@ -29,6 +31,12 @@ tests/test_convert.py
29
31
  tests/test_pandas.py
30
32
  tests/test_types.py
31
33
  tests/test_version.py
34
+ tests/.pytest_cache/.gitignore
35
+ tests/.pytest_cache/CACHEDIR.TAG
36
+ tests/.pytest_cache/README.md
37
+ tests/.pytest_cache/v/cache/lastfailed
38
+ tests/.pytest_cache/v/cache/nodeids
39
+ tests/.pytest_cache/v/cache/stepwise
32
40
  tests/it/awt.py
33
41
  tests/it/headless.py
34
42
  tests/it/java_heap.py
@@ -2,17 +2,13 @@ jpype1>=1.3.0
2
2
  jgo
3
3
 
4
4
  [dev]
5
- autopep8
6
- black
5
+ assertpy
7
6
  build
8
- flake8
9
- flake8-pyproject
10
- flake8-typing-imports
11
- isort
12
7
  jep
13
8
  pytest
14
9
  pytest-cov
15
10
  numpy
16
11
  pandas
12
+ ruff
17
13
  toml
18
14
  validate-pyproject[all]
@@ -0,0 +1,2 @@
1
+ # Created by pytest automatically.
2
+ *
@@ -0,0 +1,4 @@
1
+ Signature: 8a477f597d28d172789f06886806bc55
2
+ # This file is a cache directory tag created by pytest.
3
+ # For information about cache directory tags, see:
4
+ # https://bford.info/cachedir/spec.html
@@ -0,0 +1,8 @@
1
+ # pytest cache directory #
2
+
3
+ This directory contains data from the pytest's cache plugin,
4
+ which provides the `--lf` and `--ff` options, as well as the `cache` fixture.
5
+
6
+ **Do not** commit this to version control.
7
+
8
+ See [the docs](https://docs.pytest.org/en/stable/how-to/cache.html) for more information.
@@ -0,0 +1,3 @@
1
+ {
2
+ "test_arrays.py": true
3
+ }
@@ -0,0 +1,4 @@
1
+ [
2
+ "test_types.py::TestTypes::test_numeric_bounds",
3
+ "test_types.py::TestTypes::test_value_bounds"
4
+ ]
@@ -0,0 +1,35 @@
1
+ """
2
+ Test scyjava JVM memory-related functions.
3
+ """
4
+
5
+ from assertpy import assert_that
6
+
7
+ import scyjava
8
+
9
+ mb_initial = 50 # initial MB of memory to snarf up
10
+ mb_tolerance = 10 # ceiling of expected MB in use
11
+
12
+ scyjava.config.set_heap_min(mb=mb_initial)
13
+ scyjava.config.set_heap_max(gb=1)
14
+
15
+ assert not scyjava.jvm_started()
16
+ scyjava.start_jvm()
17
+
18
+ assert scyjava.available_processors() >= 1
19
+
20
+ mb_max = scyjava.memory_max() // 1024 // 1024
21
+ mb_total = scyjava.memory_total() // 1024 // 1024
22
+ mb_used = scyjava.memory_used() // 1024 // 1024
23
+
24
+ assert_that(
25
+ mb_used, "Used memory should be less than the current memory total"
26
+ ).is_less_than_or_equal_to(mb_total)
27
+ assert_that(
28
+ mb_total, "current memory total should be less than maximum memory"
29
+ ).is_less_than_or_equal_to(mb_max)
30
+ assert_that(mb_max, "maximum heap size should be approx. 1 GB").is_between(900, 1024)
31
+
32
+ assert_that(mb_used, "most memory should be available").is_less_than(mb_tolerance)
33
+ assert_that(mb_total, "total memory should be close to initial").is_close_to(
34
+ mb_initial, tolerance=mb_tolerance
35
+ )
@@ -1,34 +0,0 @@
1
- """
2
- Test scyjava JVM memory-related functions.
3
- """
4
-
5
- import scyjava
6
-
7
- mb_initial = 50 # initial MB of memory to snarf up
8
-
9
- scyjava.config.set_heap_min(mb=mb_initial)
10
- scyjava.config.set_heap_max(gb=1)
11
-
12
- assert not scyjava.jvm_started()
13
- scyjava.start_jvm()
14
-
15
- assert scyjava.available_processors() >= 1
16
-
17
- mb_max = scyjava.memory_max() // 1024 // 1024
18
- mb_total = scyjava.memory_total() // 1024 // 1024
19
- mb_used = scyjava.memory_used() // 1024 // 1024
20
-
21
- # Used memory should be less than the current memory total,
22
- # which should be less than the maximum heap size.
23
- assert mb_used <= mb_total <= mb_max, f"{mb_used=} {mb_total=} {mb_max=}"
24
-
25
- # The maximum heap size should be approximately 1 GB.
26
- assert 900 <= mb_max <= 1024, f"{mb_max=}"
27
-
28
- # Most of that memory should still be free; i.e.,
29
- # we should not be using more than a few MB yet.
30
- assert mb_used <= 5, f"{mb_used=}"
31
-
32
- # The total MB available to Java at this moment
33
- # should be close to our requested initial amount.
34
- assert abs(mb_total - mb_initial) < 5, f"{mb_total=} {mb_initial=}"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes