Skip to content

Commit 866c30b

Browse files
committed
Add initial version
0 parents  commit 866c30b

File tree

8 files changed

+513
-0
lines changed

8 files changed

+513
-0
lines changed

.github/workflows/publish.yaml

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
2+
name: Publish to PyPI and TestPyPI
3+
4+
on: push
5+
6+
jobs:
7+
build:
8+
name: Build distribution 📦
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Set up Python
14+
uses: actions/setup-python@v5
15+
with:
16+
python-version: "3.x"
17+
- name: Rewrite image URLs
18+
run: >-
19+
sed
20+
--in-place
21+
-E 's|!\[([^]]*)\]\((\./)?([^)]*)\)|![\1](https://raw.githubusercontent.com/${{ github.repository }}/${{ github.ref_name }}/\3)|g'
22+
README.md
23+
- name: Install pypa/build
24+
run: >-
25+
python3 -m
26+
pip install
27+
build
28+
--user
29+
- name: Build a binary wheel and a source tarball
30+
run: python3 -m build
31+
- name: Store the distribution packages
32+
uses: actions/upload-artifact@v4
33+
with:
34+
name: python-package-distributions
35+
path: dist/
36+
37+
publish-to-pypi:
38+
name: >-
39+
Publish to PyPI
40+
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
41+
needs:
42+
- build
43+
runs-on: ubuntu-latest
44+
environment:
45+
name: pypi
46+
url: https://pypi.org/p/eoapi-auth-utils
47+
permissions:
48+
id-token: write # IMPORTANT: mandatory for trusted publishing
49+
50+
steps:
51+
- name: Download all the dists
52+
uses: actions/download-artifact@v4
53+
with:
54+
name: python-package-distributions
55+
path: dist/
56+
- name: Publish distribution 📦 to PyPI
57+
uses: pypa/gh-action-pypi-publish@release/v1
58+
59+
github-release:
60+
name: >-
61+
Sign the Python 🐍 distribution 📦 with Sigstore
62+
and upload them to GitHub Release
63+
needs:
64+
- publish-to-pypi
65+
runs-on: ubuntu-latest
66+
67+
permissions:
68+
contents: write # IMPORTANT: mandatory for making GitHub Releases
69+
id-token: write # IMPORTANT: mandatory for sigstore
70+
71+
steps:
72+
- name: Download all the dists
73+
uses: actions/download-artifact@v4
74+
with:
75+
name: python-package-distributions
76+
path: dist/
77+
- name: Sign the dists with Sigstore
78+
uses: sigstore/gh-action-sigstore-python@v1.2.3
79+
with:
80+
inputs: >-
81+
./dist/*.tar.gz
82+
./dist/*.whl
83+
- name: Create GitHub Release
84+
env:
85+
GITHUB_TOKEN: ${{ github.token }}
86+
run: >-
87+
gh release create
88+
'${{ github.ref_name }}'
89+
--repo '${{ github.repository }}'
90+
--notes ""
91+
- name: Upload artifact signatures to GitHub Release
92+
env:
93+
GITHUB_TOKEN: ${{ github.token }}
94+
# Upload to GitHub Release using the `gh` CLI.
95+
# `dist/` contains the built packages, and the
96+
# sigstore-produced signatures and certificates.
97+
run: >-
98+
gh release upload
99+
'${{ github.ref_name }}' dist/**
100+
--repo '${{ github.repository }}'
101+
102+
publish-to-testpypi:
103+
name: Publish to TestPyPI
104+
needs:
105+
- build
106+
runs-on: ubuntu-latest
107+
108+
environment:
109+
name: testpypi
110+
url: https://test.pypi.org/p/eoapi-auth-utils
111+
112+
permissions:
113+
id-token: write # IMPORTANT: mandatory for trusted publishing
114+
115+
steps:
116+
- name: Download all the dists
117+
uses: actions/download-artifact@v4
118+
with:
119+
name: python-package-distributions
120+
path: dist/
121+
- name: Publish distribution 📦 to TestPyPI
122+
uses: pypa/gh-action-pypi-publish@release/v1
123+
with:
124+
repository-url: https://test.pypi.org/legacy/
125+
continue-on-error: true

.gitignore

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
*.py,cover
50+
.hypothesis/
51+
.pytest_cache/
52+
cover/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
.pybuilder/
76+
target/
77+
78+
# Jupyter Notebook
79+
.ipynb_checkpoints
80+
81+
# IPython
82+
profile_default/
83+
ipython_config.py
84+
85+
# pyenv
86+
# For a library or package, you might want to ignore these files since the code is
87+
# intended to run in multiple environments; otherwise, check them in:
88+
# .python-version
89+
90+
# pipenv
91+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94+
# install all needed dependencies.
95+
#Pipfile.lock
96+
97+
# poetry
98+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99+
# This is especially recommended for binary packages to ensure reproducibility, and is more
100+
# commonly ignored for libraries.
101+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102+
#poetry.lock
103+
104+
# pdm
105+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106+
#pdm.lock
107+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108+
# in version control.
109+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
110+
.pdm.toml
111+
.pdm-python
112+
.pdm-build/
113+
114+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
115+
__pypackages__/
116+
117+
# Celery stuff
118+
celerybeat-schedule
119+
celerybeat.pid
120+
121+
# SageMath parsed files
122+
*.sage.py
123+
124+
# Environments
125+
.env
126+
.venv
127+
env/
128+
venv/
129+
ENV/
130+
env.bak/
131+
venv.bak/
132+
133+
# Spyder project settings
134+
.spyderproject
135+
.spyproject
136+
137+
# Rope project settings
138+
.ropeproject
139+
140+
# mkdocs documentation
141+
/site
142+
143+
# mypy
144+
.mypy_cache/
145+
.dmypy.json
146+
dmypy.json
147+
148+
# Pyre type checker
149+
.pyre/
150+
151+
# pytype static type analyzer
152+
.pytype/
153+
154+
# Cython debug symbols
155+
cython_debug/
156+
157+
# PyCharm
158+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
159+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
160+
# and can be added to the global gitignore or merged into this file. For a more nuclear
161+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
162+
#.idea/

README.md

Whitespace-only changes.

eoapi/auth_utils/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from .auth import OpenIdConnectAuth # noqa
2+
from .config import AuthSettings # noqa
3+
4+
__version__ = "0.1.0"

0 commit comments

Comments
 (0)