On multiple occasions I asked a question, and people asked for example code. Often the nature of the problem called for a relatively complex example, with multiple files, sometimes in different folders. In these cases I have given a GitHub repository as an answer. I understand that I am supposed to create a minimal example, and that a GitHub repository changes over time.
So what is the Right Way(tm) to give such complex examples?
Update: this question is not about how to reduce the example to be minimal. That would worth another discussion. I also would not like to debate whether there are problems which actually need more files/folders to present, that would be yet another discussion. The only question here is that once I have a minimal example on my filesystem which still contains more files and directories, how it is best to present that structure in a question.
Here is an example, presented in a way which requires efforts to be recreated. There should be better way to present than this:
src/categorizerai
src/categorizerai/__init__.py
src/categorizerai/ExampleService.py
Where __init__.py
is empty, and ExampleService.py
have the following code:
from winterboot.Autowired import Autowired
underlyingService = Autowired('underlyingService')
@Service
ExampleService(object):
def serviceCall(foo: int = 0) -> int:
return foo+1;
Update: I am not asking what to provide. I am interested in how to provide. The way I have provided it above does not satisfy me, as it takes effort to recreate. I see nice solutions for some problem domains, like rextester.com for sql. I am looking something like this for domains as generic as "eclipse project".