Replies: 1 comment
-
|
Hi @nagyj2, I think it would be good if we put our thoughts into the official docs, though it's hard to give a definitive answer because Prefect is pretty agnostic about repo layouts. Basically the hard requirements are:
A personally-opinionated suggestion for a single project: By breaking pieces of your code apart and separating them into different modules like flows, tasks, common, etc., it makes it easier to perform unit tests on (if that's something you're interested in doing). I'd also look at using a .prefectignore file if you're using a Docker-based deployment, otherwise your entire project structure gets copied into the Docker container. The .prefectignore file has the same syntax and operates exactly like a .gitignore file does. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Im looking to start using prefect and am trying to find best practices for how to structure my git project but have been unable to find many references in the documentation. I did find a discussion on flow storage which had the intention of delivering guidance but I couldnt find anything that came out of it. It also doesnt cover on how other aspects of the project are stored.
From what Ive found, tasks and flows should be kept together at the project root level along with any scripts to deploy the flows to the prefect server (though maybe they should go in a dedicated
scriptsfolder?) Other project standard, liketestsanddocsalso are at root. The root should contain theprefect.yamloutput ofprefect init. I am currently using a docker compose to set up my prefect server but I am unsure if the docker fields in theprefect.yamlare meaning the prefect server or some docker image that represents my output application. Currently the compose file is inadockerdirectory.Below is the structure I have been thinking about
I dont have any experience with prefect or airflow so any help would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions