Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue663 update python dependancies #690

Open
wants to merge 247 commits into
base: master
Choose a base branch
from

Conversation

EttoreZ
Copy link
Contributor

@EttoreZ EttoreZ commented Oct 8, 2024

This PR is for #663.

  • [ Removed scipy and matplotlib dependency from worker container. ]
  • [scipy.integrate.trapz was substitued with numpy.trapezoid in kpis/kpi_calculator.py, scipy.interp1d linear with numpy.interp, and scipy.inter1d zero with custmo zero hold interpolation in data/data_manager.py.]
  • [Updated worker Python from 3.10 to 3.11, and miniconda version from py310_24.30-1-Linux-x86_64 to py311_24.7.1-0-Linux-x86_64.]
  • [Updated pyfmi from 2.12 to 2.14, update numpy from 1.26.4 to 2.2.1, update pandas from 1.5.3 to 2.2.3.

kbenne and others added 30 commits June 26, 2020 23:36
This commit introduces the concept of separate worker and web server processes. The worker is a distinct docker container that is respnsible for carrying out a simulation. The web server is within a separate container is only responsible for serving http requests. A redis database is used to communicate between the worker and web server. The web server and worker may scale indpendently and it is expected that a deployment would involve many workers to manage multiple simultaneous simulations/tests.

This commit is organized such that it adds to the existing boptest project layout, but it does not disturb any of the existing project layout. The worker depends on and makes extensive use of the existing boptest libraries, especially those APIs in testcase.py as well as the forecast and kpi source code directories.

Currently the web api presented by the web server is conceptually equilvant, but not api compatiable with the existing boptest/master API. A future commit will resolve this difference.

To test this commit:

cd <project-root>
docker-compose build
docker-compose up web worker

After starting the services defined by docker-compose, a web application should be viewable in the browser at http://localhost

* There is a graphql https://graphql.org api viewable at http://localhost/graphql
* This architecture depends on bulk file storage such as Amazon S3. In development mode a mino https://min.io container stands in for S3, and is available at http://localhost:9000. From this interface it is possible to view raw file (test case) uploads and simulation files. The default authentication can be found in the .env file that is included in this commit
* A forecast API has been added, which was not previously available in Alfalfa
Working (although incomplete) twoday example
Update API and add example controller
There is global attribution at the project root
Use redis messages to generate results as they are requested, instead of
the very time consuming approach of computing them on every step
Remove some unwanted Alfalfa isms
dhblum and others added 28 commits August 30, 2024 08:04
* Within worker, add logs when a message is received and immediatly
  after a response has been sent.

* Include HOSTNAME in the test metadata that is stored in Redis. For a
  K8s deployment, HOSTNAME will correspond to the name of the pod
  running the test. This will make it possible to retreive worker logs
  for a misbehaving test.

* When a test is complete, the worker and the associated logs, may no
  longer exist, however the logs will still be available in the log file
  contained within the test payload that is pushed to long term storage.

* These changes pertain to worker, however there is an existing log
  message within the web implementation that logs when a message is sent to
  the worker, but no response is received. Additionally, each message
  between web and worker is given a unique ID, therefore with all of
  this togethor there will be breadcrumbs if a message is dropped.
* The default message timeout is now 20 minutes, and the value is configurable using the
BOPTEST_MESSAGE_TIMEOUT environment variable.
The message subscription timeout is now configured as
BOPTEST_MESSAGE_TIMEOUT + 60 seconds
…ory2

Issue617 refactor service with history2
@EttoreZ EttoreZ requested a review from dhblum October 8, 2024 18:06
@EttoreZ EttoreZ self-assigned this Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants