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

snactor discover doesn't detect tags and topics #377

Open
vojtechsokol opened this issue Nov 13, 2018 · 1 comment
Open

snactor discover doesn't detect tags and topics #377

vojtechsokol opened this issue Nov 13, 2018 · 1 comment

Comments

@vojtechsokol
Copy link
Member

Reproducer:
Create new repository with tag and/or topic:

$ snactor repo new NewRepo
New repository NewRepo has been created in /home/user/NewRepo
$ snactor new-tag Tag
New tag Tag has been created in /home/user/NewRepo/tags/tag.py
$ snactor new-topic Topic
New topic Topic has been created in /home/user/NewRepo/topics/topic.py

Running snactor discover doesn't detect the created tag and topic:

$ snactor discover
Repository:
  Name: NewRepo
  Path: /home/user/NewRepo

Actors(0):

Models(0):

Tags(0):

Topics(0):

Workflows(0):

Expected behavior:

$ snactor discover
Repository:
  Name: NewRepo
  Path: /home/user/NewRepo

Actors(0):

Models(0):

Tags(1):
   - Tag                          tags/tag.py

Topics(1):
   - Topic                        topics/topic.py

Workflows(0):

Note:
When creating new workflow, workflow tag is automatically created:

$ snactor workflow new Workflow
New tag WorkflowTag has been created in /home/user/NewRepo/tags/workflow.py
New workflow Workflow has been created in /home/user/NewRepo/workflows/workflow.py

However this tag is detected by snactor discover but with wrong path:

$ snactor discover
Repository:
  Name: NewRepo
  Path: /home/user/NewRepo

Actors(0):

Models(0):

Tags(1):
   - WorkflowTag                         workflows/workflow.py

Topics(0):

Workflows(1):
   - Workflow                            workflows/workflow.py
@vojtechsokol
Copy link
Member Author

The problem is probably in the special names of created tags and topics - when the name of the created tag is Tag, the resulting code for the tag is

class Tag(Tag):

And the same problem has topic with name Topic and model with name Model. The snactor command should therefore prohibit creating objects with same name as their base class, even for actors and workflows where the snactor discover command works as expected.

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

No branches or pull requests

1 participant