daisypy-optim 0.1.0__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 (82) hide show
  1. daisypy_optim-0.1.0/.github/workflows/lint-and-test.yml +30 -0
  2. daisypy_optim-0.1.0/.github/workflows/python-publish.yml +69 -0
  3. daisypy_optim-0.1.0/.gitignore +9 -0
  4. daisypy_optim-0.1.0/LICENSE +674 -0
  5. daisypy_optim-0.1.0/MANIFEST.in +1 -0
  6. daisypy_optim-0.1.0/PKG-INFO +77 -0
  7. daisypy_optim-0.1.0/README.md +52 -0
  8. daisypy_optim-0.1.0/daisypy/optim/__init__.py +12 -0
  9. daisypy_optim-0.1.0/daisypy/optim/_version.py +34 -0
  10. daisypy_optim-0.1.0/daisypy/optim/aggregate_fns.py +13 -0
  11. daisypy_optim-0.1.0/daisypy/optim/aggregate_objective.py +70 -0
  12. daisypy_optim-0.1.0/daisypy/optim/cma_optimizer.py +177 -0
  13. daisypy_optim-0.1.0/daisypy/optim/create.py +401 -0
  14. daisypy_optim-0.1.0/daisypy/optim/csv_log.py +88 -0
  15. daisypy_optim-0.1.0/daisypy/optim/dai_file_generator.py +96 -0
  16. daisypy_optim-0.1.0/daisypy/optim/data/analyze.py +31 -0
  17. daisypy_optim-0.1.0/daisypy/optim/data/default-template.dai +58 -0
  18. daisypy_optim-0.1.0/daisypy/optim/data/optimize_template.py +257 -0
  19. daisypy_optim-0.1.0/daisypy/optim/file_generator.py +20 -0
  20. daisypy_optim-0.1.0/daisypy/optim/file_generators.py +5 -0
  21. daisypy_optim-0.1.0/daisypy/optim/formatters.py +7 -0
  22. daisypy_optim-0.1.0/daisypy/optim/log.py +23 -0
  23. daisypy_optim-0.1.0/daisypy/optim/logger.py +79 -0
  24. daisypy_optim-0.1.0/daisypy/optim/logging.py +35 -0
  25. daisypy_optim-0.1.0/daisypy/optim/loss_fns.py +16 -0
  26. daisypy_optim-0.1.0/daisypy/optim/loss_wrapper.py +56 -0
  27. daisypy_optim-0.1.0/daisypy/optim/multi_file_generator.py +39 -0
  28. daisypy_optim-0.1.0/daisypy/optim/objective.py +4 -0
  29. daisypy_optim-0.1.0/daisypy/optim/optimizer.py +16 -0
  30. daisypy_optim-0.1.0/daisypy/optim/parameter.py +41 -0
  31. daisypy_optim-0.1.0/daisypy/optim/problem.py +91 -0
  32. daisypy_optim-0.1.0/daisypy/optim/py_file_generator.py +95 -0
  33. daisypy_optim-0.1.0/daisypy/optim/runner.py +67 -0
  34. daisypy_optim-0.1.0/daisypy/optim/scalar_objective.py +53 -0
  35. daisypy_optim-0.1.0/daisypy/optim/sequential_optimizer.py +189 -0
  36. daisypy_optim-0.1.0/daisypy/optim/skopt_optimizer.py +114 -0
  37. daisypy_optim-0.1.0/daisypy/optim/terminal_log.py +31 -0
  38. daisypy_optim-0.1.0/daisypy/optim/util.py +77 -0
  39. daisypy_optim-0.1.0/daisypy/optim/visualize.py +519 -0
  40. daisypy_optim-0.1.0/daisypy_optim.egg-info/PKG-INFO +77 -0
  41. daisypy_optim-0.1.0/daisypy_optim.egg-info/SOURCES.txt +80 -0
  42. daisypy_optim-0.1.0/daisypy_optim.egg-info/dependency_links.txt +1 -0
  43. daisypy_optim-0.1.0/daisypy_optim.egg-info/entry_points.txt +2 -0
  44. daisypy_optim-0.1.0/daisypy_optim.egg-info/requires.txt +15 -0
  45. daisypy_optim-0.1.0/daisypy_optim.egg-info/top_level.txt +1 -0
  46. daisypy_optim-0.1.0/doc/development.md +13 -0
  47. daisypy_optim-0.1.0/doc/examples/README.md +4 -0
  48. daisypy_optim-0.1.0/doc/examples/example-data/field_nitrogen.dlf +32 -0
  49. daisypy_optim-0.1.0/doc/examples/example-data/measured-field-nitrogen.csv +2 -0
  50. daisypy_optim-0.1.0/doc/examples/example-data/python-chemical-reaction/daisy-react.py +4 -0
  51. daisypy_optim-0.1.0/doc/examples/example-data/python-chemical-reaction/target.csv +25 -0
  52. daisypy_optim-0.1.0/doc/examples/example-data/python-chemical-reaction/test-pyreact.dai +54 -0
  53. daisypy_optim-0.1.0/doc/examples/example-data/template.dai +44 -0
  54. daisypy_optim-0.1.0/doc/examples/single_objective_two_parameters_cma.py +114 -0
  55. daisypy_optim-0.1.0/doc/examples/single_objective_with_python.py +68 -0
  56. daisypy_optim-0.1.0/doc/getting-started-linux.md +97 -0
  57. daisypy_optim-0.1.0/doc/getting-started-win.md +99 -0
  58. daisypy_optim-0.1.0/pyproject.toml +86 -0
  59. daisypy_optim-0.1.0/setup.cfg +4 -0
  60. daisypy_optim-0.1.0/tests/hello.dai +5 -0
  61. daisypy_optim-0.1.0/tests/markers.py +15 -0
  62. daisypy_optim-0.1.0/tests/mock_problem.py +8 -0
  63. daisypy_optim-0.1.0/tests/py-files/util.py +4 -0
  64. daisypy_optim-0.1.0/tests/templates/template.dai +16 -0
  65. daisypy_optim-0.1.0/tests/templates/template.py +2 -0
  66. daisypy_optim-0.1.0/tests/templates/template2.py +4 -0
  67. daisypy_optim-0.1.0/tests/test-data/python-chemical-reaction/daisy-react.py +4 -0
  68. daisypy_optim-0.1.0/tests/test-data/python-chemical-reaction/target.csv +25 -0
  69. daisypy_optim-0.1.0/tests/test-data/python-chemical-reaction/test-pyreact.dai +53 -0
  70. daisypy_optim-0.1.0/tests/test_cma_optimizer.py +20 -0
  71. daisypy_optim-0.1.0/tests/test_csv_log.py +29 -0
  72. daisypy_optim-0.1.0/tests/test_dai_file_generator.py +45 -0
  73. daisypy_optim-0.1.0/tests/test_default_logger.py +29 -0
  74. daisypy_optim-0.1.0/tests/test_multi_file_generator.py +81 -0
  75. daisypy_optim-0.1.0/tests/test_objectives.py +16 -0
  76. daisypy_optim-0.1.0/tests/test_py_file_generator.py +30 -0
  77. daisypy_optim-0.1.0/tests/test_python_chemical_reaction.py +43 -0
  78. daisypy_optim-0.1.0/tests/test_run_with_python.py +71 -0
  79. daisypy_optim-0.1.0/tests/test_runner.py +20 -0
  80. daisypy_optim-0.1.0/tests/test_sequential_optimizer.py +70 -0
  81. daisypy_optim-0.1.0/tests/test_skopt_optimizer.py +23 -0
  82. daisypy_optim-0.1.0/tests/test_terminal_log.py +19 -0
@@ -0,0 +1,30 @@
1
+ name: Lint and test
2
+
3
+ on:
4
+ push:
5
+ branches: [ "main" ]
6
+ pull_request:
7
+ branches: [ "main" ]
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ build:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ - name: Set up Python
18
+ uses: actions/setup-python@v3
19
+ with:
20
+ python-version: "3.11"
21
+ - name: Install dependencies
22
+ run: |
23
+ python -m pip install --upgrade pip
24
+ pip install .[dev,cma,skopt]
25
+ - name: Lint
26
+ run: |
27
+ pylint --disable fixme .
28
+ - name: Test with pytest
29
+ run: |
30
+ pytest . -m "not slow"
@@ -0,0 +1,69 @@
1
+ # This workflow will upload a Python Package to PyPI when a release is created
2
+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3
+
4
+ # This workflow uses actions that are not certified by GitHub.
5
+ # They are provided by a third-party and are governed by
6
+ # separate terms of service, privacy policy, and support
7
+ # documentation.
8
+
9
+ name: Upload Python Package
10
+
11
+ on:
12
+ release:
13
+ types: [published]
14
+
15
+ permissions:
16
+ contents: read
17
+
18
+ jobs:
19
+ release-build:
20
+ runs-on: ubuntu-latest
21
+
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+
25
+ - uses: actions/setup-python@v5
26
+ with:
27
+ python-version: "3.x"
28
+
29
+ - name: Build release distribution
30
+ run: |
31
+ python -m pip install -U build
32
+ python -m build
33
+
34
+ - name: Upload distributions
35
+ uses: actions/upload-artifact@v4
36
+ with:
37
+ name: release-dists
38
+ path: dist/
39
+
40
+ pypi-publish:
41
+ runs-on: ubuntu-latest
42
+ needs:
43
+ - release-build
44
+ permissions:
45
+ # IMPORTANT: this permission is mandatory for trusted publishing
46
+ id-token: write
47
+
48
+ # Dedicated environments with protections for publishing are strongly recommended.
49
+ # For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
50
+ environment:
51
+ name: pypi
52
+ # OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
53
+ url: https://pypi.org/project/daisypy-optim
54
+ #
55
+ # ALTERNATIVE: if your GitHub Release name is the PyPI project version string
56
+ # ALTERNATIVE: exactly, uncomment the following line instead:
57
+ # url: https://pypi.org/project/YOURPROJECT/${{ github.event.release.name }}
58
+
59
+ steps:
60
+ - name: Retrieve release distributions
61
+ uses: actions/download-artifact@v4
62
+ with:
63
+ name: release-dists
64
+ path: dist/
65
+
66
+ - name: Publish release distributions to PyPI
67
+ uses: pypa/gh-action-pypi-publish@release/v1
68
+ with:
69
+ packages-dir: dist/
@@ -0,0 +1,9 @@
1
+ # Emacs autosave
2
+ *~
3
+
4
+ __pycache__/
5
+ dist/
6
+ *.egg-info/
7
+ _version.py
8
+
9
+ .coverage