Skip to content

Commit

Permalink
Basic python packaging (#20)
Browse files Browse the repository at this point in the history
* moved all code under a package dir
* install instructions
  • Loading branch information
dangunter authored Nov 13, 2023
1 parent 71f50b8 commit 60e6755
Show file tree
Hide file tree
Showing 29 changed files with 128 additions and 11 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
# workspace
Internal repo for sharing code

## Installation
To install dependencies (developer mode),
from the top directory of the repo, run:
```
pip install -r .\requirements-dev.txt
```

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.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,21 @@
)
from idaes.core.util.model_statistics import degrees_of_freedom

from workspace.UKy_flowsheet.old_leaching.leach_solution_properties import LeachSolutionParameters
from workspace.UKy_flowsheet.old_leaching.leach_solids_properties import CoalRefuseParameters
from workspace.UKy_flowsheet.old_leaching.leach_reactions import CoalRefuseLeachingReactions
from prommis_workspace.UKy_flowsheet.old_leaching.leach_solution_properties import LeachSolutionParameters
from prommis_workspace.UKy_flowsheet.old_leaching.leach_solids_properties import CoalRefuseParameters
from prommis_workspace.UKy_flowsheet.old_leaching.leach_reactions import CoalRefuseLeachingReactions

from workspace.Solvent_Extraction.REESXmodel import REESX
from workspace.Solvent_Extraction.REEAqdistribution import REESolExAqParameters
from workspace.Solvent_Extraction.REEOgdistribution import REESolExOgParameters
from prommis_workspace.Solvent_Extraction.REESXmodel import REESX
from prommis_workspace.Solvent_Extraction.REEAqdistribution import REESolExAqParameters
from prommis_workspace.Solvent_Extraction.REEOgdistribution import REESolExOgParameters

from workspace.precipitate.precipitator import Precipitator
from workspace.precipitate.precip_prop import AqueousStateParameterBlock, PrecipitateStateParameterBlock
from prommis_workspace.precipitate.precipitator import Precipitator
from prommis_workspace.precipitate.precip_prop import AqueousStateParameterBlock, PrecipitateStateParameterBlock

from workspace.roasting.ree_oxalate_roster import REEOxalateRoaster
from prommis_workspace.roasting.ree_oxalate_roster import REEOxalateRoaster

from workspace.UKy_flowsheet.Translators.translator_leaching_SX import Translator_leaching_SX
from workspace.UKy_flowsheet.Translators.translator_SX_precipitator import Translator_SX_precipitator
from prommis_workspace.UKy_flowsheet.Translators.translator_leaching_SX import Translator_leaching_SX
from prommis_workspace.UKy_flowsheet.Translators.translator_SX_precipitator import Translator_SX_precipitator

from idaes.models.properties.modular_properties.base.generic_property import (
GenericParameterBlock,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
104 changes: 104 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
[build-system]
requires = [
"setuptools>=61",
"wheel",
"setuptools_scm[toml]"
]
build-backend = "setuptools.build_meta"

[project]
name = "prommis_workspace"
description = "prommis workspace"
readme = "README.md"
version = "0.23.11" #Version format 0.YY.MM
license = {text="BSD"}
requires-python = ">=3.8"
authors = [
{name="The Prommis Project"}
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: Unix",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Scientific/Engineering :: Chemistry",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
# Don't version setuptools, various bits complain
"setuptools",
# For running tests
"pytest",
]
keywords = ["IDAES", "energy systems", "chemical engineering", "process modeling"]

[project.optional-dependencies]
# Just for developers (they should also add 'jb')
dev = [
# For adding copyright headers (see addheader.yml and the readme)
"addheader >= 0.3.0",
# Dev versions of idaes/idaes-ui
# Not handled by the toml file yet, see requirements-dev.txt
#"git+https://github.com/idaes/idaes-pse.git@main",
#"git+https://github.com/IDAES/idaes-ui.git@main"
]
# For packaging
pkg = [
"build",
"twine"
]

[project.urls]
github = "https://github.com/prommis/workspace"
issues = "https://github.com/prommis/workspace/issues"

[tool.setuptools]
include-package-data = true
zip-safe = false

[tool.setuptools.packages]
find = {namespaces = false}

[tool.setuptools.package-data]
prommis = [
"*.template",
"*.json",
"*.yaml",
"*.svg",
"*.png",
"*.jpg",
"*.csv",
"*.ipynb",
"*.txt",
"*.js",
"*.css",
"*.html",
"*.json.gz",
"*.dat",
"*.yml",
"*.yaml",
]

[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra"
testpaths = [
"prommis_workspace"
]
markers = [
"component: between unit and integration test",
"unit: test one small unit of functionality",
"integration: test integrated functionality"
]
5 changes: 5 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# install req
git+https://github.com/idaes/idaes-pse.git@main
git+https://github.com/IDAES/idaes-ui.git@main

-e .[dev]

0 comments on commit 60e6755

Please sign in to comment.