-
Notifications
You must be signed in to change notification settings - Fork 0
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
9-publish to PyPi #15
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
ca5dfb1
ADBPY-9: ADBPY-9: Add deploy workflow
Angelina-C dbc7669
ADBPY-9: Add changelog and up version
Angelina-C cec8f3a
ADBPY-9: Rename deploy.yml to publish.yml
Angelina-C 9164cca
ADBPY-9: Add inofrmation in setup
Angelina-C de33569
Merge pull request #10 from NetherlandsForensicInstitute/ADBPY-9
Angelina-C 56a6869
main: Add info in setup.py
Angelina-C a40bb5c
main: Add long description to setup
Angelina-C ad97e34
main: Merge branch 'main' of ssh://ssh.github.com:443/NetherlandsFore…
Angelina-C cffccb3
main: Add long description type and run tests before publishing
Angelina-C 9a2e67e
main: Remove test step
Angelina-C b63cfd6
Trigger test before publishing
Angelina-C 10654a1
Move triggered pipeline out of steps
Angelina-C 7123adb
Change workflow call to workflow dispatch
Angelina-C a67d890
Add inputs to test
Angelina-C 28a7cce
Duplicate test workflow in publish.yml
Angelina-C 3c058f4
Start publish only after test has been finished
Angelina-C b02d754
fix needs reference
Angelina-C 386b946
Change repository name to adb-pywrapper
Angelina-C 9c4b9ea
Change name to adb-pywrapper and publish to PyPi
Angelina-C 4f6d3b3
Fix naming of test_adb_pywrapper
Angelina-C 637ca51
Add CONTRIBUTING.md including how to push to PyPi
Angelina-C a2f5ed7
Update README.md
Angelina-C 553e9e7
Update README.md
Angelina-C 6584a27
Update CONTRIBUTING.md
Angelina-C cddf5ad
Add RELEASE-PROCESS.md
Angelina-C 060a3e1
Merge branch '9-publish' of ssh://ssh.github.com:443/NetherlandsForen…
Angelina-C 507e62d
Remove releases dir and change github publish action commit hash to r…
Angelina-C File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# This workflow will upload a Python Package using Twine when a release is created | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries | ||
|
||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: Upload Python Package | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
# TODO issue #11: deduplicate this, and trigger the test.yml directly | ||
test: | ||
name: Test job | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [ "3.9", "3.10", "3.11" ] | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{matrix.python-version}} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
|
||
- name: Modify sys.path and export it | ||
id: modify-sys-path | ||
run: | | ||
echo "::set-output name=sys-path::$(realpath .)" | ||
shell: bash | ||
|
||
# Add your build/test steps here | ||
- name: Run Tests | ||
working-directory: test | ||
run: python test_adb_pywrapper.py | ||
env: | ||
PYTHONPATH: ${{ steps.modify-sys-path.outputs.sys-path }} | ||
|
||
publish: | ||
needs: test | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This makes sure the |
||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.11' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install build | ||
- name: Build package | ||
run: python -m build | ||
- name: Publish package | ||
uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
adb_py.egg-info | ||
*egg-info | ||
build | ||
venv | ||
dist | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. adding this file closes #3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Contributing Guidelines | ||
|
||
Thank you for considering contributing to our project! Please take a moment to review the following guidelines. | ||
|
||
## Pull Requests | ||
|
||
- All contributions to the project must be submitted via pull request. | ||
- Ensure that your pull request addresses a specific issue or feature request. If none exists, please open a new issue first to discuss the changes you'd like to make. | ||
- Follow the [GitHub Flow](https://guides.github.com/introduction/flow/) workflow: | ||
1. Create a new branch from `main`. The branch name should start with the issue number. | ||
2. Make your changes and commit them with descriptive commit messages. | ||
3. Submit a pull request to the main repository's `main` branch. | ||
- Ensure that your code adheres to the project's coding standards and conventions. | ||
- Include unit tests if applicable and ensure that existing tests pass. | ||
- Provide a clear and detailed description of your changes in the pull request description. | ||
|
||
## Issues | ||
|
||
- Feel free to open an issue for bug reports, feature requests, or general feedback. | ||
- When opening an issue, please provide as much detail as possible, including steps to reproduce for bug reports. | ||
|
||
## License | ||
|
||
By contributing to this project, you agree that your contributions will be licensed under the project's [LICENSE](LICENSE.txt). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Release process | ||
|
||
## Versioning | ||
Semantic versioning should be used, eg 1.2.3. | ||
|
||
## Tag | ||
The tag should be of the form v{version}. | ||
|
||
## Creating a release | ||
- In GitHub, go to releases. | ||
- Select `Draft a new release`. | ||
- Choose a tag - you can create a new tag here. Make sure it is the same as the version in `setup.py`. | ||
- Click `Generate release ntoes`. | ||
- Make sure `Set as latest release` is selected. | ||
- Click `Publish release`. | ||
|
||
- Creating a release in GitHub automatically triggers publication on PyPI. |
File renamed without changes
File renamed without changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
from setuptools import setup | ||
|
||
setup( | ||
name="adb_py", | ||
version="0.8", | ||
py_modules=["adb_py", "adb_init"], | ||
name="adb-pywrapper", | ||
version="1.0.0", | ||
description="adb-pywrapper facilitates seamless interaction with Android devices using the Android Debug Bridge (ADB) " | ||
Angelina-C marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"directly within Python scripts.", | ||
long_description=f"{open('README.md').read()}", | ||
long_description_content_type="text/markdown", | ||
author="Netherlands Forensic Institute", | ||
author_email="[email protected]", | ||
url="https://github.com/NetherlandsForensicInstitute/adb-pywrapper", | ||
licence="EUPL-1.2", | ||
py_modules=["adb-pywrapper", "adb_init"], | ||
test_suite="test", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not very happy with duplicating test.yml here, but I couldn't get it to work and did not want to spend more time on this, so created a separate issue