Skip to content
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

🐍 Add CI-CD jobs for releasing to PyPI and Github #96

Merged
merged 21 commits into from
Jan 27, 2024

Conversation

Michele-Alberti
Copy link
Owner

Feature

  • Add azure as oauth provider and improve config files to handle different auth approaches
  • Add an /health endpoint

Fix

  • Fix reference to psw_special_chars
  • Fix error when returning the result of is_basic_auth_active
  • Fix error in version evaluation

Refactor
Change package name from data_lunch_app to dlunch.

Build

  • Merge ci-cd environments under the same env and improve makefile
  • Change relevant files to be compatible with a python package building process

Docs
Add missing env variables to README.md.

CI

  • Add support for pre-release flag to GitHub action
  • Improve ci-cd pipeline with PyPI package build and Github release
  • Update actions versions, add unique (post) version for uploads to TestPyPI
  • Use short names on actions names and jobs
  • Change release environment of manual_build.yaml to test-release
  • Fix and add makefile utility commands to install package from PyPI and TestPyPI

github-actions bot and others added 21 commits January 2, 2024 21:30
…different auth approaches

add a username evaluation function (pn_user) and replace pn.state.user with pn_user(config), thus allowing username cleaning steps (e.g. email domain removal)

move config related to basic authentication in a dedicated config file (e.g. config.server.auth_provider become config.basic_auth.auth_provider)
basic auth attribute are available only if the server is set to basic_auth

now the whole config passed as parameter dict to panel.serve is instantiated by hydra so that object inside the config are recursively instantiated
add server/common.yaml has a _target_ attribute and a _conversion_ attribute

add a check to test if basic authentication is active to set_guest_user_password (otherwise it may search for inexistent config attributes
add checks on is_guest and is_admin functions to show the right sodget if authentication is not active (server=no_oauth)
add a check on authorize callback to authorize every user if authentication is not active

add config file for azure oauth
add a new group of config for basic_auth (is an optional group, used only for basic_auth at the moment)
basic_auth config key has been moved at the root level of the main config
merge pre-commit and commitizen environments under ci-cd environment
improve makefile with meaningful names and additional commands
adapt setup_dev_env.sh and compose_init.sh to the new ci-cd environment
…uilding process

update pyproject.toml
add an OmegaConf resolver to find data-lunch path and use it in config path (when required)
change relevant filepaths to absolute paths pointing to the installed package (using the new 'pkg_path' OmegaConf resolver)
change psycopg to binary (in requirements.txt) to avoid problems with pip install
add a MANIFEST.in to include required resources in distribution files
…unch

select a shorter and simpler name for PyPI
data_lunch_app is converted to dlunch
project name is set to dlunch
PANEL_APP env variable and docker image name are left as data_lunch_app
Add PyPI package build for tagged commit on master
Add TestPyPI package build for each push on development
move docker build to ci_cd.yaml and rename release action to bump_version
fix and improve makefile with commands to build an publish a PyPI package
external services can assess if the webapp is alive by calling '/health'
updates:
- [github.com/pycqa/flake8: 6.1.0 → 7.0.0](PyCQA/flake8@6.1.0...7.0.0)
@Michele-Alberti Michele-Alberti added the enhancement New feature or request label Jan 27, 2024
@Michele-Alberti Michele-Alberti self-assigned this Jan 27, 2024
@Michele-Alberti Michele-Alberti merged commit 3e194ae into main Jan 27, 2024
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants