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

Refactor build_examples.py #110

Closed
wants to merge 3 commits into from
Closed

Refactor build_examples.py #110

wants to merge 3 commits into from

Conversation

formatc1702
Copy link
Collaborator

  • Use pathlib.Path instead of os.path
  • Fix order of files while building
  • Consolidate code for building demos, examples and tutorial
  • Change argument from tutorials to tutorial to remain consistent
  • Add some indentation in console output for better readability

- Use `pathlib.Path` instead of `os.path`
- Fix order of files while building
- Consolidate code for building demos, examples and tutorial
- Change argument from `tutorials` to `tutorial` to remain consistent
- Add some indentation in console output for better readability
@formatc1702 formatc1702 added this to the v0.2 milestone Jul 20, 2020
@kvid
Copy link
Collaborator

kvid commented Jul 20, 2020

I would like to include a new action to restore generated files using git checkout -- {all generated files} or something similar. What do you think? It does not have to replace the current clean action as I suggested in my argument copied into #63 (comment).

@formatc1702
Copy link
Collaborator Author

I would like to include a new action to restore generated files using git checkout -- {all generated files} or something similar. What do you think? It does not have to replace the current clean action as I suggested in my argument copied into #63 (comment).

Sounds like a good idea; I would welcome a code contribution for this!

@kvid
Copy link
Collaborator

kvid commented Jul 20, 2020

I don't have the time right now, maybe later in the evening.

@kvid
Copy link
Collaborator

kvid commented Jul 20, 2020

Does this PR address this issue? 0da4441#r40750948

@formatc1702
Copy link
Collaborator Author

Yes, see latest commit :) Thanks

@aakatz3
Copy link
Contributor

aakatz3 commented Jul 21, 2020

Why remove the upload action? I don't see how the build results can be verified without it, unless there is a new action that performs regression testing. Otherwise, the outputs are generated and ignored. It shouldn't count against any git quotas, I don't see a reason to remove it, but please let me know if I'm missing something. The actions are all entirely serverside.

Great work on the refactor!

@kvid kvid mentioned this pull request Jul 21, 2020
@kvid
Copy link
Collaborator

kvid commented Jul 21, 2020

@aakatz3 Can you briefly explain what the upload action does or link to a description. I want to learn. :-)

@aakatz3
Copy link
Contributor

aakatz3 commented Jul 21, 2020

Sure! This is the action it uses. The way it is configured, it essentially zips up the examples and tutorial folders after github actions runs the build test, and uploads them so that a user can download them, to manually verify them. They appear here:
image

Clicking the link will provide you with a .zip file, which has the directories that are specified in the action to upload.

image

Inside those folders are all of the files that are in the folders after running all previous tasks in the github action, I.E. installing graphviz and dependancies, and generating the examples.
image

This is a particularly useful tool because, while an individual developer's environment may differ, the VM that builds the github action is always the same, which means it is perfect for both automated and manual regression testing. You could either then take the uploaded artifact and pass it to some external testing service, or download it and manually examine the generated images and other outputs, to make sure they match the ones you generate on your system, and work as expected.

If you would like more information, I can try to find a slightly easier tutorial than the repo for the action itself, as it is slightly confusing.

@kvid kvid mentioned this pull request Jul 25, 2020
@formatc1702
Copy link
Collaborator Author

Improved refactoring is being taken care of in #118, closing.

@formatc1702 formatc1702 deleted the bugfix/build-examples branch July 27, 2020 19:22
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 this pull request may close these issues.

3 participants