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

replace occurrences of 'name' with 'type' #176

Closed
wants to merge 1 commit into from

Conversation

PracticalMetal
Copy link

With reference to the issue #157, I've made the required changes in src/robot_interface/models/mission/task.py and the json files in src/isar/config/predefined_missions/. Do let me know what you think about it. Thanks

@aeshub
Copy link
Contributor

aeshub commented Dec 16, 2021

Thank you for the PR @PracticalMetal!

I see that the change from name to type has also affected the system to a larger extent than just these files. This is causing the tests to fail currently.

There are mainly two issues:

  1. Test data files with missions which still have name instead of type. Have a look at the mission files in this folder.
  2. The second part is related to a few places in the code where task.name is used explicitly and it should be changed to task.type instead.

f"{i:>3} {task.name:<25}" f" -- {task.status} "

f"{self.state_machine.current_task.name}, not fulfilled, "

assert task.name == "take_thermal_image"

I recommend looking at this section of the readme for running tests locally. Please reach out to us if there are any issues with running the tests.

Copy link
Contributor

@aeshub aeshub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have a look at my previous comment. In addition, we try to follow this set of rules for writing git commit messages so you should capitalize the commit message.

@PracticalMetal
Copy link
Author

Thankyou for your response, will do the required changes

@PracticalMetal
Copy link
Author

Hey I was trying to test the code locally on my machine and whenever I try to pip install -e .[dev] and do pytest ., I am encountered with several errors like

 ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/mnt/c/WSL_Pulkit/Github/isar/setup.py'"'"'; __file__='"'"'/mnt/c/WSL_Pulkit/Github/isar/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps --user --prefix=

I've tried searching the web for the solution but couldn't find any. I am using Ubuntu on my local machine. I would be great if you could guide me on how I can fix this issue.

@aeshub
Copy link
Contributor

aeshub commented Dec 17, 2021

Hey I was trying to test the code locally on my machine and whenever I try to pip install -e .[dev] and do pytest ., I am encountered with several errors like

 ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/mnt/c/WSL_Pulkit/Github/isar/setup.py'"'"'; __file__='"'"'/mnt/c/WSL_Pulkit/Github/isar/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps --user --prefix=

I've tried searching the web for the solution but couldn't find any. I am using Ubuntu on my local machine. I would be great if you could guide me on how I can fix this issue.

Mhm, it's not an error I have seen before and I suspect it's related to your local setup more than it's related to ISAR and the pip installation itself. Do you have more error logs to provide?

In any case, you can push your changes to your fork and we can verify if the tests run in the pipeline. Not an ideal and efficient solution but if you're not able to resolve the local errors it can be a workaround.

@aeshub
Copy link
Contributor

aeshub commented Feb 14, 2022

Hi @PracticalMetal!

Would you like to address the remainder of the review? Otherwise I will close this PR.

@aeshub
Copy link
Contributor

aeshub commented Feb 17, 2022

Closing due to inactivity.

@aeshub aeshub closed this Feb 17, 2022
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.

Consider using 'type' instead of 'name' for type of task in a mission
2 participants