From 17d1d96b7cb289bfd38179f349f554112958e4b0 Mon Sep 17 00:00:00 2001 From: scbedd <45376673+scbedd@users.noreply.github.com> Date: Wed, 3 Jul 2019 13:45:03 -0700 Subject: [PATCH 1/3] enabling samples for azure-storage code --- .gitignore | 1 + doc/sphinx/conf.py | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 5d00286b1667..8c81b746955d 100644 --- a/.gitignore +++ b/.gitignore @@ -63,6 +63,7 @@ src/build *.iml /doc/_build /doc/sphinx/examples +/doc/sphinx/tests /.vs/config/applicationhost.config # Azure deployment credentials diff --git a/doc/sphinx/conf.py b/doc/sphinx/conf.py index 7100227f1843..14f5b435c164 100644 --- a/doc/sphinx/conf.py +++ b/doc/sphinx/conf.py @@ -25,11 +25,16 @@ # FIX FOR EXAMPLE REFERENCES REPO_ROOT = os.path.abspath(os.path.join(os.path.abspath(__file__), '..', '..', '..')) -glob_expansion = os.path.join(REPO_ROOT, 'sdk/*/*/examples/**/test*examples*.py') -example_files = glob.glob(glob_expansion, recursive=True) +examples_glob_expansion = os.path.join(REPO_ROOT, 'sdk/*/*/examples/**/test*example*.py') +samples_glob_expansion = os.path.join(REPO_ROOT, 'sdk/*/*/tests/**/test*sample*.py') + +example_files = glob.glob(examples_glob_expansion, recursive=True) +samples_files = glob.glob(samples_glob_expansion, recursive=True) + +all_files = [os.path.relpath(file, REPO_ROOT) for file in list(set(example_files + samples_files))] # now for each package, we need to copy it and write it to the relative path FROM THE CURRENT CWD -for example_file in [os.path.relpath(example_file, REPO_ROOT) for example_file in example_files]: +for example_file in all_files: relative_path_in_pkg = os.path.join(*(example_file.split(os.path.sep)[3:])) final_destination = os.path.abspath(os.path.join(os.path.dirname(__file__), relative_path_in_pkg)) From e668eaccc5054326864da13690d04796083f22ac Mon Sep 17 00:00:00 2001 From: scbedd <45376673+scbedd@users.noreply.github.com> Date: Mon, 15 Jul 2019 15:54:02 -0700 Subject: [PATCH 2/3] updating dev documentation with approval details --- doc/dev/release.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/dev/release.md b/doc/dev/release.md index 7b40919ef628..d94366814465 100644 --- a/doc/dev/release.md +++ b/doc/dev/release.md @@ -16,13 +16,17 @@ Python packages are uploaded to [PyPI](https://pypi.org/). Once you've uploaded ### Production - Deploy with Azure Dev Ops -Go to this Url: https://aka.ms/pysdkrelease +To avoid "accidental" pushes to our target repositories, [approval](https://docs.microsoft.com/en-us/azure/devops/pipelines/release/approvals/approvals?view=azure-devops) will be requested directly prior to the final PyPI publish. Reference this [wiki page](https://aka.ms/python-approval-groups) and click on `Release to PyPI Approvers` to add yourself to the group for PyPI publishing. + +After taking care of the above, go to this Url: https://aka.ms/pysdkrelease - Click on "Run pipeline" - Change "BuildTargetingString" to the name of your package. Example: azure-mgmt-compute - Change "CandidateForRelease" value to `True` (it should be defaulted to `False`) -Et voila :). Azure Dev Ops will tests one last time the package, dependencies, and the distributions (sdist/wheel) and push to PyPI using the user [azure-sdk](https://pypi.org/user/azure-sdk/). +Et voila :). Azure Dev Ops will tests one last time the package, dependencies, and the distributions (sdist/wheel) and ask for approval prior to pushing to PyPI using the user [azure-sdk](https://pypi.org/user/azure-sdk/). + +Validate artifacts prior to clicking `approve` on the pre-deployment approval you will have received in mail. ### Production - Deploy manually From dfdac4b4f59200846648a604e1b99712383e1856 Mon Sep 17 00:00:00 2001 From: scbedd <45376673+scbedd@users.noreply.github.com> Date: Mon, 15 Jul 2019 16:00:28 -0700 Subject: [PATCH 3/3] reworking some wording --- doc/dev/release.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/dev/release.md b/doc/dev/release.md index d94366814465..4982c2a2d6e4 100644 --- a/doc/dev/release.md +++ b/doc/dev/release.md @@ -26,7 +26,7 @@ After taking care of the above, go to this Url: https://aka.ms/pysdkrelease Et voila :). Azure Dev Ops will tests one last time the package, dependencies, and the distributions (sdist/wheel) and ask for approval prior to pushing to PyPI using the user [azure-sdk](https://pypi.org/user/azure-sdk/). -Validate artifacts prior to clicking `approve` on the pre-deployment approval you will have received in mail. +Validate artifacts prior to clicking `approve` on the pre-deployment confirmation mail waiting in your inbox. Please allow ~5 minutes for the email to be sent by Azure DevOps ### Production - Deploy manually