-
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.
- Loading branch information
Showing
15 changed files
with
62 additions
and
27 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 |
---|---|---|
|
@@ -17,6 +17,7 @@ jobs: | |
tag: ${{ github.ref_name }} | ||
|
||
publish-to-dockerhub: | ||
if: false | ||
needs: [ create-release ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -49,7 +50,7 @@ jobs: | |
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
publish-pypi: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
|
@@ -58,16 +59,41 @@ jobs: | |
url: https://pypi.org/p/datashare-python | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
- name: Install build dependencies | ||
run: pip install build | ||
- name: Publish | ||
uses: pypa/[email protected] | ||
- name: Build the project | ||
run: python -m build | ||
- name: Store the distribution packages | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
|
||
publish-pypi: | ||
needs: | ||
- build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/datashare-python | ||
steps: | ||
- name: Download all the dists | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
- name: Publish to PyPi | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
|
||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: false | ||
cancel-in-progress: false |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
|
@@ -5,12 +5,9 @@ The [datashare-python](https://github.com/ICIJ/datashare-python) repository is m | |
## Clone the template repository | ||
|
||
Start by cloning the [template repository](https://github.com/ICIJ/datashare-python): | ||
|
||
<!-- termynal --> | ||
```console | ||
$ git clone [email protected]:ICIJ/datashare-python.git | ||
---> 100% | ||
``` | ||
<p align="center"> | ||
<img alt="clone_template.png" src="../../assets/clone_template.png"/> | ||
</p> | ||
|
||
## Explore the codebase | ||
|
||
|
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 |
---|---|---|
|
@@ -10,11 +10,9 @@ Make sure you've followed the [basic worker example](worker-basic.md) to underst | |
|
||
Start over and clone the [template repository](https://github.com/ICIJ/datashare-python) once again: | ||
|
||
<!-- termynal --> | ||
```console | ||
$ git clone [email protected]:ICIJ/datashare-python.git | ||
---> 100% | ||
``` | ||
<p align="center"> | ||
<img alt="clone_template.png" src="../../../assets/clone_template.png"/> | ||
</p> | ||
|
||
## Install extra dependencies | ||
|
||
|
@@ -205,11 +203,11 @@ We can then run the tests after starting test services using the `datashare-pyth | |
<!-- termynal --> | ||
```console | ||
$ ./datashare-python up -d postgresql redis elasticsearch rabbitmq datashare_web | ||
$ uv run --frozen pytest datashare_python/tests/tasks/test_vectorize.py | ||
$ uv run --frozen pytest tests/tasks/test_vectorize.py | ||
===== test session starts ===== | ||
collected 3 items | ||
|
||
datashare_python/tests/tasks/test_vectorize.py ... [100%] | ||
tests/tasks/test_vectorize.py ... [100%] | ||
|
||
====== 3 passed in 6.87s ====== | ||
.... | ||
|
@@ -224,5 +222,5 @@ Rather than copy-pasting the above code blocks, you can replace/update your code | |
- [`datashare_python/tasks/vectorize.py`](https://github.com/ICIJ/datashare-python/blob/main/docs/src/vectorize.py) | ||
- [`datashare_python/tasks/dependencies`](https://github.com/ICIJ/datashare-python/blob/main/docs/src/vector_db_dependencies.py) | ||
- [`datashare_python/app.py`](https://github.com/ICIJ/datashare-python/blob/main/docs/src/vectorize_app.py) | ||
- [`datashare_python/tests/tasks/test_vectorize.py](https://github.com/ICIJ/datashare-python/blob/main/docs/src/test_vectorize.py) | ||
- [`tests/tasks/test_vectorize.py](https://github.com/ICIJ/datashare-python/blob/main/docs/src/test_vectorize.py) | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,10 @@ | |
name = "datashare-python" | ||
version = "0.1.0" | ||
description = "Implement Datashare task in Python" | ||
authors = [{ name = "Clément Doumouro", email = "[email protected]" }] | ||
authors = [ | ||
{ name = "Clément Doumouro", email = "[email protected]" }, | ||
{ name = "Clément Doumouro", email = "[email protected]" } | ||
] | ||
readme = "README.md" | ||
requires-python = "~=3.11" | ||
dependencies = [ | ||
|
@@ -15,12 +18,13 @@ dependencies = [ | |
"transformers~=4.46.3", | ||
"pycountry>=24.6.1", | ||
"sentencepiece>=0.2.0", | ||
"termynal~=0.12.2", | ||
"typer>=0.13.1", | ||
"alive-progress>=3.2.0", | ||
] | ||
[tool.setuptools] | ||
py-modules = [] | ||
|
||
[build-system] | ||
requires = ["pdm-backend"] | ||
build-backend = "pdm.backend" | ||
|
||
[tool.uv] | ||
package = true | ||
|
@@ -51,7 +55,8 @@ dev = [ | |
"nest-asyncio>=1.6.0", | ||
] | ||
doc = [ | ||
"mkdocs-material~=9.5.48" | ||
"mkdocs-material~=9.5.48", | ||
"termynal~=0.12.2", | ||
] | ||
|
||
[tool.uv.pip] | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.