Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/continuous_development.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Publish release to PyPi

on:
pull_request:
types:
- closed
branches:
- master

jobs:
build:
name: build
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout the source ode
uses: actions/checkout@v3

- name: Setup the Python environment
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Build the universal wheel
run: |
python -m pip install hatchling
python -m hatchling build

- uses: actions/upload-artifact@v4
with:
name: wheel
path: dist/

publish:
name: publish
needs: build
runs-on: ubuntu-latest
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
environment:
name: pypi
url: https://pypi.org/p/appabuild
steps:
- uses: actions/download-artifact@v4
with:
name: wheel
path: dist/

- name: Publish distribution package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
packages-dir: dist
password: ${{ secrets.PYPI_TOKEN }}
11 changes: 0 additions & 11 deletions app/cli/__main__.py

This file was deleted.

12 changes: 12 additions & 0 deletions app/cli/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from app.cli.database import app as database_app
from app.cli.lca import app as lca_app
import typer


cli_app = typer.Typer()
cli_app.add_typer(database_app, name="database")
cli_app.add_typer(lca_app, name="lca")


if __name__ == "__main__":
cli_app()
58 changes: 58 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.wheel]
packages = ["app", "appabuild"]

[project]
name = "appabuild"
version = "0.3.0"
authors = [{ name = "Maxime Peralta", email = "maxime.peralta@cea.fr"}]
maintainers= [{name = "Maxime Peralta", email = "maxime.peralta@cea.fr"}]
description = "Appa Build is a package to build impact models"
keywords = ["ecodesign", "life cycle assessment"]
license = { file = "LICENSE.md" }
readme = "README.md"
classifiers = [
"License :: OSI Approved :: Eclipse Public License 2.0 (EPL-2.0)",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Intended Audience :: Developers",
"Intended Audience :: Manufacturing",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
]
requires-python = ">=3.11,<3.12"
dependencies = [
"numpy==1.26.4",
"pandas==2.0.0",
"brightway2==2.4.7",
"bw2io==0.8.12",
"lca_algebraic==1.0.0",
"fastapi",
"uvicorn[standard]",
"flake8",
"black",
"isort",
"typer",
"omegaconf",
"pydantic",
"scipy",
"matplotlib==3.10.0",
"seaborn==0.12.2",
"plotly",
"aenum",
"kaleido",
"tqdm",
"ruamel.yaml",
"apparun==0.3.1",
"pre-commit",
"typer==0.15.1",
]

[project.scripts]
appabuild = "app.cli.main:cli_app"

[project.urls]
"Source" = "https://github.com/appalca/appabuild/"
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ uvicorn[standard]
flake8
black
isort
typer
typer==0.15.1
omegaconf
pydantic
scipy
Expand All @@ -22,3 +22,4 @@ tqdm
ruamel.yaml
apparun==0.3.0
pre-commit
hatchling
15 changes: 0 additions & 15 deletions setup.py

This file was deleted.

Loading