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

DOCS: Add examples section #42

Closed
SMoraisAnsys opened this issue May 29, 2024 · 5 comments · Fixed by #43
Closed

DOCS: Add examples section #42

SMoraisAnsys opened this issue May 29, 2024 · 5 comments · Fixed by #43
Assignees

Comments

@SMoraisAnsys
Copy link
Contributor

Following OSS guidance, we should add an "Examples" section to the documentation.
This working I worked on it and I'll propose changes allowing us to have examples in the documentation.

The current approach I'm following is to use a python file such that:

  • examples are at root level of the repo (easier to find for users)
  • examples can be executed as python scripts (with some extra labels to help following bullet point)
  • examples can be run as notebooks with jupyterlab (you would see texte cells and code cells)
    However, this approach comes with the following price : we can't provide pre run notebooks (I mean with code cells results)

Another approach would be to execute the example on my laptop and to provide the final result as a notebook (with pre filled code cells results which would be my own execution). This approach does not provide the previous listed benefits of the other approach and comes at the price of having to re run manually the examples if they happen to be updated or their code cells results differs.

If there was a way to have a VM + github runner which could use the project to run the examples that would be great. I can take care of the VM creation + github runner setting but I don't know how to make it work with concepev.

@philipjusher Let me know which approach suits you best (I'll propose a PR with the first one) and if there is a way to use a VM or not.

@SMoraisAnsys SMoraisAnsys self-assigned this May 29, 2024
@philipjusher
Copy link
Collaborator

I think we can use /examples/simple_workflow.py as the examples. Do you mean the example script should be up one directory then? We will need to add some auth things to the github repo to get environment variables set for authenticating with the server. Then this script should be "runnable" in a github runner. Is that what we need?

@SMoraisAnsys
Copy link
Contributor Author

I think we can use /examples/simple_workflow.py as the examples. Do you mean the example script should be up one directory then? We will need to add some auth things to the github repo to get environment variables set for authenticating with the server. Then this script should be "runnable" in a github runner. Is that what we need?

I was suggesting to having a directory with examples and simple_workflows.py would be one of them. However, that's just the beginning and you might want to extend it.
As for running the example in Github, we could use one of our self-hosted runner but we need to discuss about how we must configure the env. variables / secrets values to make it work.

@philipjusher
Copy link
Collaborator

So we can use the github secrets to set up the env and it will use those envs in a github action. We wont need a self hosted runner can just use a github hosted runner.

@SMoraisAnsys
Copy link
Contributor Author

So we can use the github secrets to set up the env and it will use those envs in a github action. We wont need a self hosted runner can just use a github hosted runner.

Awesome, I though we would require to install specific stuff.
Can you handle the creation of the secret values ?

@philipjusher
Copy link
Collaborator

image
yeah there are secret values. They should read from dotenv.

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

Successfully merging a pull request may close this issue.

2 participants