-
Notifications
You must be signed in to change notification settings - Fork 3
Replaced progressbar with tqdm + Replaced pkg_resources with importlib.resources + Edit to .github/workflows/main.yaml #113
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
Draft
dnearing
wants to merge
17
commits into
main
Choose a base branch
from
pipeline_test1
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.
Draft
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
4f626af
A couple comments were added to some code.
15e8bd2
A couple comments were added to some code.
ef410fd
Merge branch 'main' into pipeline_test1
bd6041c
Updating lincal.py to use tqdm for progress bar
33dcd6b
Both lincal.py and wavecal.py updated to use tqdm for progress bar.
a0aba43
Some pyproject.toml changes
47ff592
Merge branch 'main' into pipeline_test1
c0f0dde
Correction to definitions.py and temporary edit to wavecal.py
121e110
Merge branch 'main' into pipeline_test1
a7c7cae
Reverted edit to wavecal.py
dd65486
Some changes from merging with main
4b6e8ff
Change to correct imports.
2b57127
Fixed spacing in pyproject.toml and print statement in lincal.py
ec1792e
Replaced pkg_resources with importlib.resources for mkidpipeline
11635e8
Unfinished tqdm test and run_mkidpipeline.py file
723c00a
Modified test_tqdm.py
196eec5
Changed main.yaml in .github/workflows to have if statement under pub…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
|
|
||
| # Run script for mkidpipeline | ||
| # Execute in command line with: python3 run_mkidpipeline.py | ||
| import subprocess | ||
| def run_mkidpipe(): | ||
| command = ['mkidpipe', '--make-dir', '--make-outputs'] | ||
| try: | ||
| # Run the command | ||
| subprocess.run(command, check=True) | ||
| print("Command executed successfully.") | ||
| except subprocess.CalledProcessError as e: | ||
| print(f"An error occurred while running the command: {e}") | ||
| if __name__ == '__main__': | ||
| run_mkidpipe() |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # Unit test for tqdm (used in lincal.py and wavecal.py) | ||
| # Note that I have seen the progress bar show up successfully, though only when manually changing verbose to verbose = True by default. | ||
|
|
||
| import unittest | ||
| import os | ||
|
|
||
| class TestTqdm(unittest.TestCase): | ||
|
|
||
| def test_imports(self): | ||
| import mkidpipeline.steps.wavecal | ||
| import mkidpipeline.steps.lincal | ||
| import tqdm | ||
|
|
||
| ''' | ||
| def test_progressbar(self): | ||
| # Test to see if progress bar shows up when passing data through | ||
| os.chdir(r'/home/dnearing/pipelineconfig/targets/HIP109427') | ||
| command1a = "echo 'BELOW IS THE PWD'" | ||
| command1b = 'pwd' | ||
| command1c = "echo 'ABOVE IS THE PWD'" | ||
| command2 = 'mkidpipe --make-outputs' | ||
| try: | ||
| # Run the command | ||
| os.system(command1a) | ||
| os.system(command1b) | ||
| os.system(command1c) | ||
| os.system(command2) | ||
| print("Command executed successfully.") | ||
| except: | ||
| print(f"An error occurred while running the command. ") | ||
| ''' | ||
|
|
||
|
|
||
| if __name__ == '__main__': | ||
| unittest.main() |
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.
Uh oh!
There was an error while loading. Please reload this page.