-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from AllenInstitute/feature/DT-6858-make-packag…
…e-public Adding License, docs and placeholder workflows to make package public
- Loading branch information
Showing
6 changed files
with
210 additions
and
10 deletions.
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,65 @@ | ||
name: Publish to PyPI | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
part: | ||
description: "Semver part to bump (major, minor, patch)" | ||
type: choice | ||
required: true | ||
default: "patch" | ||
options: ["major", "minor", "patch"] | ||
dry-run: | ||
description: "Dry run" | ||
type: boolean | ||
required: true | ||
default: true | ||
|
||
jobs: | ||
|
||
build: | ||
name: Build distribution | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.9", "3.10", "3.11", "3.12"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
- name: Set up AllenInstitute Repo Authorization | ||
uses: ./.github/actions/setup-ai-github-urls | ||
with: | ||
token: ${{ secrets.AI_PACKAGES_TOKEN }} | ||
- name: Run Release | ||
run: | | ||
make dist | ||
shell: bash | ||
- name: Store the distribution packages | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
|
||
publish-to-pypi: | ||
name: Publish to PyPI | ||
needs: build | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/aibs-informatics-test-resources | ||
permissions: | ||
id-token: write # IMPORTANT: mandatory for trusted publishing | ||
steps: | ||
- name: Download all the dists | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
- name: Publish distribution to PyPI | ||
if: ${{ github.event.inputs.dry-run == 'false' }} | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
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,29 @@ | ||
# Contributing to `aibs-informatics-test-resources` | ||
|
||
Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given. | ||
|
||
## Types of Contributions | ||
|
||
### Reporting Bugs | ||
|
||
Report bugs to our [issues page](https://github.com/aibs-informatics-test-resources/issues). | ||
|
||
If you are reporting a bug, please include: | ||
|
||
- Your operating system name and version. | ||
- Any details about your local setup that might be helpful in troubleshooting. | ||
- Detailed steps to reproduce the bug, in the form of a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example). | ||
|
||
### Making Changes | ||
|
||
Look through the GitHub issues for bugs, features, and other requests. Most issues will have a label that can help you identify the type of issue. | ||
|
||
### Submitting Feedback | ||
|
||
The best way to send feedback is to [create an issue](https://github.com/aibs-informatics-test-resources/issues/new) on GitHub. | ||
|
||
If you are proposing a feature: | ||
|
||
- Explain in detail how it would work. | ||
- Keep the scope as narrow as possible, to make it easier to implement. | ||
- Remember that while contributions are welcome, developer/maintainer time is limited. |
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,33 @@ | ||
Allen Institute Software License – This software license is the 2-clause BSD | ||
license plus a third clause that prohibits redistribution and use for | ||
commercial purposes without further permission. | ||
|
||
Copyright © 2024. Allen Institute. All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
1. Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
2. Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
3. Redistributions and use for commercial purposes are not permitted without | ||
the Allen Institute’s written permission. For purposes of this license, | ||
commercial purposes are the incorporation of the Allen Institute's software | ||
into anything for which you will charge fees or other compensation or use of | ||
the software to perform a commercial service for a third party. Contact | ||
[email protected] for commercial licensing opportunities. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
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
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 |
---|---|---|
|
@@ -3,38 +3,49 @@ | |
# https://setuptools.pypa.io/en/latest/setuptools.html#building-and-distributing-packages-with-setuptools | ||
# ----------------------------------------------------------------------------- | ||
|
||
# [build-system] | ||
# requires = ["setuptools>=61", "setuptools_scm[toml]>=6.2", "wheel"] | ||
# build-backend = "setuptools.build_meta" | ||
# [tool.setuptools_scm] | ||
|
||
[build-system] | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
# ----------------------------------------------------------------------------- | ||
[project] | ||
name = "aibs-informatics-test-resources" | ||
description = "unit test resources for informatics packages" | ||
authors = [{ name = "AIBS Informatics Group"}] | ||
maintainers = [{ name = "AIBS Informatics Group", email = "[email protected]"}] | ||
description = "unit test resources for AIBS informatics packages" | ||
license = { file = "LICENSE" } | ||
dynamic = ["version"] | ||
|
||
requires-python = ">=3.9" | ||
dependencies = [ | ||
"black==23.11.0", | ||
"coverage[toml]~=7.3.2", | ||
"coverage[toml]~=7.3", | ||
"flake8~=6.1.0", | ||
"isort~=5.10", | ||
"mypy~=1.6.1", | ||
"pytest~=7.4.3", | ||
"mypy~=1.6", | ||
"pytest~=7.4", | ||
"pytest-cov", | ||
] | ||
|
||
[project.optional-dependencies] | ||
|
||
release = [ | ||
"build", | ||
"twine", | ||
"wheel", | ||
] | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["src"] | ||
|
||
[tool.hatch.version] | ||
path = "src/aibs_informatics_test_resources/__version__.py" | ||
|
||
[project.urls] | ||
Documentation = "https://.github.io/aibs-informatics-test-resources/" | ||
Homepage = "https://github.com/AllenInstitute/aibs-informatics-test-resources/" | ||
Issues = "https://github.com/AllenInstitute/aibs-informatics-test-resources/issues" | ||
Repository = "https://github.com/AllenInstitute/aibs-informatics-test-resources/" | ||
|
||
# ----------------------------------------------------------------------------- | ||
## Pyright Configurations | ||
|