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

Inconsistency in initial project setup for actions running via rasa or via sdk #5368

Closed
erohmensing opened this issue Mar 4, 2020 · 8 comments · Fixed by #6611
Closed

Inconsistency in initial project setup for actions running via rasa or via sdk #5368

erohmensing opened this issue Mar 4, 2020 · 8 comments · Fixed by #6611
Assignees
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework area:rasa-sdk 🧑‍💻 Everything that touches our python Rasa SDK type:enhancement ✨ Additions of new features or changes to existing ones, should be doable in a single PR

Comments

@erohmensing
Copy link
Contributor

erohmensing commented Mar 4, 2020

Currently, when running an action server with rasa run actions, the default looks in actions.py in the base of your project directory. actions.py is created there as part of the initial project.

However, if you build in docker, the default place to find actions is in actions/actions.py. https://github.com/RasaHQ/rasa-sdk/blob/master/Dockerfile#L40

This makes it confusing -- when teaching the user to create custom actions in Docker, we have to tell them to create the new folder with an actions file, when actions.py already exists: https://rasa.com/docs/rasa/user-guide/how-to-deploy/#creating-a-custom-action

This seems to also have caused confusion here: RasaHQ/rasa-sdk#140 (comment)

We should make the default behavior consistent. I'm partial to having an actions folder as it's probably quite normal for a larger actions file to reference other files. However that will probably involve changing a decent amount of references in e.g. tutorials.

@erohmensing erohmensing added type:enhancement ✨ Additions of new features or changes to existing ones, should be doable in a single PR area:rasa-oss 🎡 Anything related to the open source Rasa framework area:rasa-sdk 🧑‍💻 Everything that touches our python Rasa SDK labels Mar 4, 2020
@erohmensing erohmensing self-assigned this Mar 4, 2020
@akelad
Copy link
Contributor

akelad commented Apr 20, 2020

@erohmensing are you working on this atm? if not, please unassign

@erohmensing erohmensing removed their assignment Apr 20, 2020
@tmbo
Copy link
Member

tmbo commented Sep 1, 2020

I'd agree, let's change the default project (rasa init) as well as the examples to use an actions folder instead of a file. so the resulting structure should be:

moodbot/
├── domain.yml
├── actions/
│   ├── __init__.py
│   └── actions.py
├── ...

I think there might be a __init__.py at a rasa bots root directory by default (so in moodbot), I am not sure we need that one

@wochinge
Copy link
Contributor

wochinge commented Sep 1, 2020

@erohmensing Imo this needs to go in before the RC next week. Do you have this on your radar or should our squad take this over?

@wochinge wochinge added this to the 2.0rc1 Rasa Open Source milestone Sep 1, 2020
@akelad
Copy link
Contributor

akelad commented Sep 1, 2020

i'm gonna speak for our team and say that we are slammed with customers + 2.0 docs at the moment, so it'd be nice if your squad takes it :)

@wochinge
Copy link
Contributor

wochinge commented Sep 1, 2020

@alwx @tczekajlo is it ok for you if we take on this time critical task? Rick is also back onboard then, so I think we do this despite our decoupling commitment

@tczekajlo
Copy link
Contributor

@alwx @tczekajlo is it ok for you if we take on this time critical task? Rick is also back onboard then, so I think we do this despite our decoupling commitment

I'm ok with that, not sure If I'm the best person to do this if it's time-critical task though 😄

@wochinge
Copy link
Contributor

wochinge commented Sep 3, 2020

It's time critical in a sense that it should be done until next week. I'll add it to our board.

@akelad
Copy link
Contributor

akelad commented Sep 7, 2020

reminder to update the CLI documentation and others on initial project setup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework area:rasa-sdk 🧑‍💻 Everything that touches our python Rasa SDK type:enhancement ✨ Additions of new features or changes to existing ones, should be doable in a single PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants