Skip to content

Commit

Permalink
Updates for Ayala-specific requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
altcoder committed Jan 18, 2024
1 parent 922836d commit 483f890
Show file tree
Hide file tree
Showing 19 changed files with 52 additions and 119 deletions.
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ updates:
directory: "/"
schedule:
interval: daily
time: "13:00"
time: "16:16"
open-pull-requests-limit: 10
reviewers:
- dciborow
- altcoder
allow:
- dependency-type: direct
- dependency-type: indirect
Expand All @@ -17,6 +17,6 @@ updates:
directory: "/"
schedule:
interval: daily
time: "13:00"
time: "16:32"
commit-message:
prefix: "fix: "
21 changes: 0 additions & 21 deletions .github/workflows/CI.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python Build Workflow

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
release:
types: [created]
workflow_dispatch:

jobs:
validation:
uses: ac-analytics/action-python/.github/workflows/[email protected]
with:
workdir: '.'
testdir: 'tests'
File renamed without changes.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:

jobs:
publish:
uses: microsoft/action-python/.github/workflows/publish.yml@0.6.4
uses: ac-analytics/action-python/.github/workflows/publish.yml@v0.1.1
secrets:
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
TEST_PYPI_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: Python Release Workflow
on:
workflow_call:

jobs:
release:
uses: ac-analytics/action-python/.github/workflows/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3.5.2
- uses: actions/checkout@v4
with:
# [Required] Access token with `workflow` scope.
token: ${{ secrets.PAT }}
Expand Down
9 changes: 0 additions & 9 deletions CODE_OF_CONDUCT.md

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) Microsoft Corporation.
Copyright (c) Ayala Corporation.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Python Project Template

This project is a template for creating Python projects that follows the Python Standards declared in PEP 621. It uses a pyproject.yaml file to configure the project and Flit to simplify the build process and publish to PyPI. Flit simplifies the build and packaging process for Python projects by eliminating the need for separate setup.py and setup.cfg files. With Flit, you can manage all relevant configurations within the pyproject.toml file, streamlining development and promoting maintainability by centralizing project metadata, dependencies, and build specifications in one place.
This project is a template for creating Python projects that follows the Python Standards declared in PEP 621. It uses a pyproject.toml file to configure the project.

Flit is used to simplify the build process and publish to PyPI, however for private packages or more complicated setups the use of a separate setup.py and setup.cfg files is okay. However, with Flit, you can manage all relevant configurations within the pyproject.toml file, streamlining development and promoting maintainability by centralizing project metadata, dependencies, and build specifications in one place.

## Project Organization

Expand Down
41 changes: 0 additions & 41 deletions SECURITY.md

This file was deleted.

25 changes: 0 additions & 25 deletions SUPPORT.md

This file was deleted.

6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

# -- Project information -----------------------------------------------------

project = "ai-python docs"
copyright = "2022, Daniel Ciborowski"
author = "Daniel Ciborowski"
project = "python docs"
project_copyright = "2024, Ayala Corporation"
author = "AC Analytics"

# The full version, including alpha/beta/rc tags
release = "0.1.0"
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. ai-python docs documentation master file, created by
.. ada docs documentation master file, created by
sphinx-quickstart on Thu May 5 14:06:45 2022.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Expand Down
12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ requires = ["flit"]
build-backend = "flit.buildapi"

[project]
name = "py-project-toml"
name = "python-package-template"
authors = [
{name = "Daniel Ciborowski", email = "dciborow@microsoft.com"},
{name = "AC Analytics", email = "analytics@ayala.com"},
]
description = "Sample Python Project for creating a new Python Module"
readme = "README.md"
Expand Down Expand Up @@ -47,9 +47,9 @@ test = [
]

[project.urls]
Documentation = "https://github.com/microsoft/python-package-template/tree/main#readme"
Source = "https://github.com/microsoft/python-package-template"
Tracker = "https://github.com/microsoft/python-package-template/issues"
Documentation = "https://github.com/ac-analytics/python-package-template/tree/main#readme"
Source = "https://github.com/ac-analytics/python-package-template"
Tracker = "https://github.com/ac-analytics/python-package-template/issues"

[tool.flit.module]
name = "python_package"
Expand Down Expand Up @@ -168,7 +168,7 @@ extension-pkg-whitelist= [
"scipy"
]
ignore="CVS"
ignore-patterns="test.*?py,conftest.py"
ignore-patterns="test.*?py,conf.py,conftest.py"
init-hook='import sys; sys.setrecursionlimit(8 * sys.getrecursionlimit())'
jobs=0
limit-inference-results=100
Expand Down
4 changes: 2 additions & 2 deletions src/python_package/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# -------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Copyright (c) Ayala Corporation. All rights reserved.
# Licensed under the MIT License. See LICENSE in project root for information.
# -------------------------------------------------------------
"""Python Package Template"""
from __future__ import annotations

__version__ = "0.0.2"
__version__ = "0.1.0"
2 changes: 1 addition & 1 deletion src/python_package/hello_world.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ---------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Copyright (c) Ayala Corporation. All rights reserved.
# Licensed under the MIT License. See LICENSE in project root for information.
# ---------------------------------------------------------------------------------
"""This is a Sample Python file."""
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ---------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Copyright (c) Ayala Corporation. All rights reserved.
# Licensed under the MIT License. See LICENSE in project root for information.
# ---------------------------------------------------------------------------------
"""
Expand Down
4 changes: 2 additions & 2 deletions tests/test_methods.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ---------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Copyright (c) Ayala Corporation. All rights reserved.
# Licensed under the MIT License. See LICENSE in project root for information.
# ---------------------------------------------------------------------------------
"""This is a sample python file for testing functions from the source code."""
Expand All @@ -26,7 +26,7 @@ def test_hello(unit_test_mocks: None):

def test_int_hello():
"""
This test is marked implicitly as an integration test because the name contains "_init_"
This test is marked implicitly as an integration test because the name contains "_int_"
https://docs.pytest.org/en/6.2.x/example/markers.html#automatically-adding-markers-based-on-test-names
"""
hello_test()

0 comments on commit 483f890

Please sign in to comment.