I am trying to figure out how to properly publish a geoprocessing tool and get it to work when published. The tool works fine in Pro and can be shared out. However, when it is shared it is only copying the .pyt file to the ArcGIS Server and it is not copying any of the required files. I am following the recommended file structure from ESRI's documentation of:
-project
--file.pyt
--file.pyt.xml
--__init__.py
--models
---required.py
---__init__.py
--utils
---utils.py
---__init__.py
However, when sharing as a GP service, nothing in the models or utils directories gets copied over.
What is the suggested best practices for publishing a geoprocessing tool that contains nested python files?