From 1c4695d3919422de169af08a2b00308651e9c011 Mon Sep 17 00:00:00 2001 From: Chris McCarthy Date: Wed, 26 Jul 2023 20:05:44 +0100 Subject: [PATCH] Dropped the ADF build files and updated the package name install step in python-package.yml. Added bug_report.md and feature_request.md files for GitHub --- .azure/.pypirc | 6 -- .azure/artifact-release-pipeline.yaml | 38 --------- .azure/azure-build-deploy-docs-pipeline.yml | 49 ----------- .azure/azure-ci-build-pipeline.yaml | 90 --------------------- .azuredevops/pull_request_template.md | 12 --- .github/ISSUE_TEMPLATE/bug_report.md | 41 ++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 24 ++++++ .github/workflows/python-package.yml | 6 +- README.md | 4 - 9 files changed, 68 insertions(+), 202 deletions(-) delete mode 100644 .azure/.pypirc delete mode 100644 .azure/artifact-release-pipeline.yaml delete mode 100644 .azure/azure-build-deploy-docs-pipeline.yml delete mode 100644 .azure/azure-ci-build-pipeline.yaml delete mode 100644 .azuredevops/pull_request_template.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.azure/.pypirc b/.azure/.pypirc deleted file mode 100644 index 9f89d0ea..00000000 --- a/.azure/.pypirc +++ /dev/null @@ -1,6 +0,0 @@ -[distutils] -Index-servers = - PrimAITE - -[PrimAITE] -Repository = https://pkgs.dev.azure.com/ma-dev-uk/PrimAITE/_packaging/PrimAITE/pypi/upload/ diff --git a/.azure/artifact-release-pipeline.yaml b/.azure/artifact-release-pipeline.yaml deleted file mode 100644 index 47e9aacc..00000000 --- a/.azure/artifact-release-pipeline.yaml +++ /dev/null @@ -1,38 +0,0 @@ -trigger: -- main - -pool: - vmImage: ubuntu-latest -strategy: - matrix: - Python310: - python.version: '3.10' - -steps: -- task: UsePythonVersion@0 - inputs: - versionSpec: '$(python.version)' - displayName: 'Use Python $(python.version)' - -- script: | - python -m pip install --upgrade pip==23.0.1 - pip install wheel==0.38.4 --upgrade - pip install setuptools==66 --upgrade - pip install build==0.10.0 - pip install twine - pip install keyring - pip install artifacts-keyring - displayName: 'Install build dependencies' - -- script: | - python -m build - displayName: 'Build PrimAITE sdist and wheel' - -- task: TwineAuthenticate@1 - displayName: 'Twine Authenticate' - inputs: - artifactFeed: PrimAITE/PrimAITE - -- script: | - python -m twine upload --verbose -r PrimAITE --config-file $(PYPIRC_PATH) dist/*.whl - displayName: 'Artifact Upload' diff --git a/.azure/azure-build-deploy-docs-pipeline.yml b/.azure/azure-build-deploy-docs-pipeline.yml deleted file mode 100644 index 0f44b0c8..00000000 --- a/.azure/azure-build-deploy-docs-pipeline.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Azure Static Web Apps CI/CD - -pr: none -trigger: - branches: - include: - - dev - -jobs: -- job: build_and_deploy_job - displayName: Build and Deploy Job - condition: or(eq(variables['Build.Reason'], 'Manual'),or(eq(variables['Build.Reason'], 'PullRequest'),eq(variables['Build.Reason'], 'IndividualCI'))) - pool: - vmImage: ubuntu-latest - variables: - - group: Azure-Static-Web-Apps-nice-bay-0ad032c03-variable-group - steps: - - checkout: self - submodules: true - - - script: | - python -m pip install --upgrade pip==23.0.1 - pip install wheel==0.38.4 --upgrade - pip install setuptools==66 --upgrade - pip install build==0.10.0 - displayName: 'Install build dependencies' - - - script: | - pip install -e .[dev] - displayName: 'Install Yawning-Titan for docs autosummary' - - - script: | - primaite setup - displayName: 'Perform PrimAITE Setup' - - - script: | - cd docs - make html - cd .. - cd .. - displayName: 'Build Docs' - - - task: AzureStaticWebApp@0 - inputs: - azure_static_web_apps_api_token: $(AZURE_STATIC_WEB_APPS_API_TOKEN_NICE_BAY_0AD032C03) - app_location: "/docs/_build/html" - api_location: "" - output_location: "/" - displayName: 'Deploy Docs to nice-bay-0ad032c03' diff --git a/.azure/azure-ci-build-pipeline.yaml b/.azure/azure-ci-build-pipeline.yaml deleted file mode 100644 index 0bb03594..00000000 --- a/.azure/azure-ci-build-pipeline.yaml +++ /dev/null @@ -1,90 +0,0 @@ -trigger: -- main -- dev -- feature/* -- hotfix/* -- bugfix/* -- release/* - -parameters: - # https://stackoverflow.com/a/70046417 - - name: matrix - type: object - default: - - job_name: 'UbuntuPython38' - py: '3.8' - img: 'ubuntu-latest' - every_time: false - - job_name: 'UbuntuPython310' - py: '3.10' - img: 'ubuntu-latest' - every_time: true - - job_name: 'WindowsPython38' - py: '3.8' - img: 'windows-latest' - every_time: false - - job_name: 'WindowsPython310' - py: '3.10' - img: 'windows-latest' - every_time: false - - job_name: 'MacOSPython38' - py: '3.8' - img: 'macOS-latest' - every_time: false - - job_name: 'MacOSPython310' - py: '3.10' - img: 'macOS-latest' - every_time: false - -stages: - - stage: Test - jobs: - - ${{ each item in parameters.matrix }}: - - job: ${{ item.job_name }} - pool: - vmImage: ${{ item.img }} - - condition: or( eq(variables['Build.Reason'], 'PullRequest'), ${{ item.every_time }} ) - - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: ${{ item.py }} - displayName: 'Use Python ${{ item.py }}' - - - script: | - python -m pip install pre-commit - pre-commit install - pre-commit run --all-files - displayName: 'Run pre-commits' - - - script: | - python -m pip install --upgrade pip==23.0.1 - pip install wheel==0.38.4 --upgrade - pip install setuptools==66 --upgrade - pip install build==0.10.0 - pip install pytest-azurepipelines - displayName: 'Install build dependencies' - - - script: | - python -m build - displayName: 'Build PrimAITE' - - - script: | - PRIMAITE_WHEEL=$(ls ./dist/primaite*.whl) - python -m pip install $PRIMAITE_WHEEL[dev] - displayName: 'Install PrimAITE' - condition: or(eq( variables['Agent.OS'], 'Linux' ), eq( variables['Agent.OS'], 'Darwin' )) - - - script: | - forfiles /p dist\ /m *.whl /c "cmd /c python -m pip install @file[dev]" - displayName: 'Install PrimAITE' - condition: eq( variables['Agent.OS'], 'Windows_NT' ) - - - script: | - primaite setup - displayName: 'Perform PrimAITE Setup' - - - script: | - pytest -n 4 - displayName: 'Run tests' diff --git a/.azuredevops/pull_request_template.md b/.azuredevops/pull_request_template.md deleted file mode 100644 index 538baf5c..00000000 --- a/.azuredevops/pull_request_template.md +++ /dev/null @@ -1,12 +0,0 @@ -## Summary -*Replace this text with an explanation of what the changes are and how you implemented them. Can this impact any other parts of the codebase that we should keep in mind?* - -## Test process -*How have you tested this (if applicable)?* - -## Checklist -- [ ] This PR is linked to a **work item** -- [ ] I have performed **self-review** of the code -- [ ] I have written **tests** for any new functionality added with this PR -- [ ] I have updated the **documentation** if this PR changes or adds functionality -- [ ] I have run **pre-commit** checks for code style diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..1ee05bfa --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,41 @@ +--- +name: Bug report +about: Create a report to help us improve +title: "[BUG] - " +labels: bug +assignees: '' + +--- + +### Describe the bug: + +A clear and concise description of what the bug is. + +### To Reproduce: + +Steps to reproduce the behaviour: + +1. Import '...' +2. Instantiate '....' +3. Pass to '....' +4. Run '....' +5. See error + +### Expected behaviour + +A clear and concise description of what you expected to happen. + +### Screenshots/Outputs + +If applicable, add screenshots to help explain your problem. + +### Environment (please complete the following information) + + - **OS:** [e.g. Ubuntu 22.04] + - **Python:** [e.g. 3.10.11] + - **PrimAITE Version:** [e.g. v2.0.0] + - **Software:** [e.g. cli, Jupyter, PyCharm, VSCode etc.] + +### Additional context + +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..c0a20642 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,24 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: "[REQUEST] - " +labels: feature_request +assignees: '' + +--- + +### Is your feature request related to a problem? + +If so, please give a concise description of what the problem is. Ex. I'm always frustrated when [...] + +### Describe the solution you'd like: + +A clear and concise description of what you want to happen. + +### Describe alternatives you've considered: + +A clear and concise description of any alternative solutions or features you've considered. + +### Additional context: + +Add any other context or screenshots about the feature request here. diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 055882d2..ed94ad97 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -45,11 +45,11 @@ jobs: run: | python -m build - - name: Install Yawning-Titan + - name: Install PrimAITE run: | PRIMAITE_WHEEL=$(ls ./dist/primaite*.whl) python -m pip install $PRIMAITE_WHEEL[dev] - + - name: Perform PrimAITE Setup run: | primaite setup @@ -61,6 +61,6 @@ jobs: # exit-zero treats all errors as warnings. flake8 . --count --exit-zero --max-complexity=10 --max-line-length=120 --statistics - - name: Run unmarked tests + - name: Run tests run: | pytest tests/ diff --git a/README.md b/README.md index 066a8af3..d078829e 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,3 @@ make html cd docs .\make.bat html ``` - -This will build the documentation as a collection of HTML files which uses the Read The Docs sphinx theme. Other build -options are available but may require additional dependencies such as LaTeX and PDF. Please refer to the Sphinx documentation -for your specific output requirements.