-
Notifications
You must be signed in to change notification settings - Fork 176
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
[instrument_manager] Parse Instrument Data from CSV file #9472
Open
jeffersoncasimir
wants to merge
25
commits into
aces:main
Choose a base branch
from
jeffersoncasimir:2024_10_28_instrument_data_parser
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[instrument_manager] Parse Instrument Data from CSV file #9472
jeffersoncasimir
wants to merge
25
commits into
aces:main
from
jeffersoncasimir:2024_10_28_instrument_data_parser
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From Nov 19 LORIS call:
|
b50171d
to
73f26b9
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #9341
Brief summary of changes
Contains a new
CSVParser
class, extended by anInstrumentDataParser
class.A template file with the expected headers for the selected instrument can be downloaded from the new "Upload Instrument Data" panel's form in the Upload tab of the Instrument Manager module.
The uploaded .csv file will be saved and tracked in a new table called
instrument_data_files
.The file's headers must match the selected instrument's expected headers.
For each row, an instrument is created using the
NDB_BVL_Instrument::factory
and is then saved to the database.If an error is detected, the database transaction will be rolled back, and the list of errors will be returned to the user.
If the uploaded file exceeds a certain size (currently hard-coded to 512 MB), the task will be performed in the background as a new
server_process_manager
type calledparse_instrument_data
. This process runs theparse_instrument_data.php
script. It is expected that themonitor_instrument_data.php
script is run periodically to check the status of running tasks. When a task is done executing, theserver_process_manager
table is uploaded and the user who uploaded the file receives an email containing the "computed exit text".Testing instructions
MAX_FILE_BYTES
MriUploadServerProcess
still works as expectedScreenshots:
![Screenshot 2025-02-05 at 9 32 24 AM](https://private-user-images.githubusercontent.com/15801528/410037996-0aab64be-0040-4608-97f9-551af4b3818d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4MzcyNzMsIm5iZiI6MTczODgzNjk3MywicGF0aCI6Ii8xNTgwMTUyOC80MTAwMzc5OTYtMGFhYjY0YmUtMDA0MC00NjA4LTk3ZjktNTUxYWY0YjM4MThkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA2VDEwMTYxM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTcwY2Q4NDYyZjFmNzExN2ViNDM0MzM0ODQwODIzNTliMDVjODZmOWJjMGJhYzJhNDEyNzhlMjA2OWM4YjI1MzgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.kZobE-CLcFJEqgxITGxHabI8QP_M4X8deidh27tribU)
![Screenshot 2025-02-05 at 9 33 06 AM](https://private-user-images.githubusercontent.com/15801528/410038014-a55442ad-46a7-4b17-a386-4a07235975f9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4MzcyNzMsIm5iZiI6MTczODgzNjk3MywicGF0aCI6Ii8xNTgwMTUyOC80MTAwMzgwMTQtYTU1NDQyYWQtNDZhNy00YjE3LWEzODYtNGEwNzIzNTk3NWY5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA2VDEwMTYxM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIzZDk3YjI2Yzk4ODc3OGIxZTI1OTNjYzE5OTc5MjI5MzQ1YjhlZDE0MzJhYTlmMzY2YWY5MGRlNGMyMjA4NWUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.-6-L7vLrbEIFK_TJWqaCoGG-RX0a6YevbQwUJWcZgFA)
![Screenshot 2025-02-05 at 9 33 27 AM](https://private-user-images.githubusercontent.com/15801528/410038041-1148dd11-759b-4e1d-bc43-2e4c5bec0eb4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4MzcyNzMsIm5iZiI6MTczODgzNjk3MywicGF0aCI6Ii8xNTgwMTUyOC80MTAwMzgwNDEtMTE0OGRkMTEtNzU5Yi00ZTFkLWJjNDMtMmU0YzViZWMwZWI0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA2VDEwMTYxM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWEzYjBiZmQxY2JhZGMxNzE4ZGI0YzdhZjRiZWM3MTBiN2U5NjdhMTg2MjU2MjVlNDU2NzFjOTI2MDM1ZTZiYjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.ox52KSUhRkEwNs4LhIgP80nxDFx85DuIBJ1Tbqj2Bas)
![Screenshot 2025-02-05 at 9 37 17 AM](https://private-user-images.githubusercontent.com/15801528/410038137-05e1e0c3-a409-435a-858d-a0f930168b27.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4MzcyNzMsIm5iZiI6MTczODgzNjk3MywicGF0aCI6Ii8xNTgwMTUyOC80MTAwMzgxMzctMDVlMWUwYzMtYTQwOS00MzVhLTg1OGQtYTBmOTMwMTY4YjI3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA2VDEwMTYxM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWY0YzM4NjlmMDQ0NDE4MjNlNGRkMjk5YTVmMzE4NDRjYWVlZjczMDRjYjBiYTI5NjcwNWVkNDQzMjIwZDA2NmEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.i5V9YluimY7aoO1jn3LxpFWyCGyBEWH35x_SfmG4QFk)
![Screenshot 2025-02-05 at 9 34 20 AM](https://private-user-images.githubusercontent.com/15801528/410038212-d80c8200-7e93-4a83-84af-98ee199eb313.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4MzcyNzMsIm5iZiI6MTczODgzNjk3MywicGF0aCI6Ii8xNTgwMTUyOC80MTAwMzgyMTItZDgwYzgyMDAtN2U5My00YTgzLTg0YWYtOThlZTE5OWViMzEzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA2VDEwMTYxM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTEwZjI3NjRjMjAxNjZkOTNmMmUxNDQxYTA3ZDdmOTJhZDgwYTRlNjAxYzNlYzIzNmE1ZjMzMWJlM2ZiNTU2YWYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.tjkqcrnh884KmWT2GDc_LjWLnTfbHtu9Xv9rKh9pR9c)
![Screenshot 2025-02-05 at 9 35 11 AM](https://private-user-images.githubusercontent.com/15801528/410038250-8a7d6c92-2ac0-4089-bcb0-e38ecf7b86cf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4MzcyNzMsIm5iZiI6MTczODgzNjk3MywicGF0aCI6Ii8xNTgwMTUyOC80MTAwMzgyNTAtOGE3ZDZjOTItMmFjMC00MDg5LWJjYjAtZTM4ZWNmN2I4NmNmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA2VDEwMTYxM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE4MWNhYTE3NmI4OTc4YWRjZDJiNmY1NDVkODFkOGZlYzgzMDM4MTE3ZGU3MTJmY2Y2MmZlYmU2Y2I2NTMyNDQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.kOm7SGIZOblVRB5hc8WDuOmiuhQQ1_rqZx3z8ViNjGY)
Still unresolved: