Skip to content

Commit e5abdc8

Browse files
author
Lionel Untereiner
authored
Packaging as namespace packages (#13)
Converting to python namespace packages
1 parent 60511cf commit e5abdc8

File tree

144 files changed

+664
-478
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+664
-478
lines changed

.github/workflows/doc-test.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: "Pull Request Docs Check"
2+
on:
3+
- pull_request
4+
5+
jobs:
6+
docs:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v1
10+
- uses: ammaraskar/sphinx-action@dev
11+
with:
12+
docs-folder: "docs/"
13+
build-command: "sphinx-build -b html . _build"

.github/workflows/python-package.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ jobs:
1313
runs-on: ubuntu-22.04
1414
strategy:
1515
fail-fast: false
16+
max-parallel: 3
1617
matrix:
17-
python-version: ["3.8", "3.9", "3.10", "3.11"]
18-
package-name: ["geos_ats_package", "geosx_mesh_doctor", "geosx_mesh_tools_package", "geosx_xml_tools_package", "hdf5_wrapper_package", "pygeosx_tools_package", "timehistory_package"]
18+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
19+
package-name: ["geos-ats", "geos-mesh", "geos-timehistory", "geos-xml-tools", "hdf5-wrapper", "pygeos-tools"]
1920

2021
steps:
2122
- uses: actions/checkout@v3
@@ -24,16 +25,17 @@ jobs:
2425
uses: actions/setup-python@v3
2526
with:
2627
python-version: ${{ matrix.python-version }}
28+
cache: 'pip'
2729
- name: Install package
28-
working-directory: ./${{ matrix.package-name }}
30+
# working-directory: ./${{ matrix.package-name }}
2931
run: |
3032
python -m pip install --upgrade pip
3133
python -m pip install pytest yapf toml
32-
python -m pip install .
34+
python -m pip install ${{ matrix.package-name }}/
3335
- name: Lint with yapf
34-
working-directory: ./${{ matrix.package-name }}
36+
# working-directory: ./${{ matrix.package-name }}
3537
run: |
36-
yapf -r --diff . --style ../.style.yapf
38+
yapf -r --diff ${{ matrix.package-name }} --style .style.yapf
3739
# - name: Test with pytest
3840
# working-directory: ./${{ matrix.package-name }}
3941
# run: |

.gitignore

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

.readthedocs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
version: 2
55

66
build:
7-
os: "ubuntu-20.04"
7+
os: ubuntu-22.04
88
apt_packages:
99
- npm
1010
- plantuml
@@ -18,9 +18,9 @@ build:
1818
- npm install -g @mermaid-js/[email protected]
1919

2020
# Set requirements to build the docs
21-
python:
22-
install:
23-
- requirements: docs/requirements.txt
21+
# python:
22+
# install:
23+
# - requirements: docs/requirements.txt
2424

2525
# Build documentation in the docs/ directory with Sphinx
2626
sphinx:

docs/conf.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@
1818

1919
# Add python modules to be documented
2020
python_root = '..'
21-
python_modules = ( 'geosx_mesh_tools_package', 'geosx_xml_tools_package', 'geosx_mesh_doctor', 'geos_ats_package',
22-
'hdf5_wrapper_package', 'pygeosx_tools_package', 'timehistory_package' )
21+
python_modules = ( 'geos-xml-tools', 'geos-mesh', 'geos-ats', 'hdf5-wrapper', 'pygeos-tools', 'geos-timehistory' )
2322
for m in python_modules:
24-
sys.path.insert( 0, os.path.abspath( os.path.join( python_root, m ) ) )
23+
sys.path.insert( 0, os.path.abspath( os.path.join( python_root, m, 'src' ) ) )
2524

2625
# -- Project information -----------------------------------------------------
2726

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
GEOS ATS
33
==========
44

5-
The `geos_ats` python package includes tools for managing integrated tests for GEOS.
5+
The `geos-ats` python package includes tools for managing integrated tests for GEOS.
66
It is built using the `Automated Test System <https://ats.readthedocs.io/en/latest/>`_ (ATS) package.
77
The available console scripts for this package and its API are described below.
88

@@ -13,7 +13,7 @@ run_geos_ats
1313
Primary entry point for running integrated tests.
1414

1515
.. argparse::
16-
:module: geos_ats.command_line_parsers
16+
:module: geos.ats.command_line_parsers
1717
:func: build_command_line_parser
1818
:prog: run_geos_ats
1919

@@ -29,11 +29,11 @@ Primary entry point for running integrated tests.
2929
Debugging
3030
------------------
3131

32-
If for any reason you need to debug the geos_ats package, we recommend that you create a local copy of this entry point in the `build/integratedTests` directory: `geosPythonPackages/geos_ats_package/geos_ats/debug_geos_ats.py`.
32+
If for any reason you need to debug the geos-ats package, we recommend that you create a local copy of this entry point in the `build/integratedTests` directory: `geosPythonPackages/geos-ats_package/geos-ats/debug_geos-ats.py`.
3333
This script is designed as a debugger entry point, and will read the autogenerated run script that was built during setup.
34-
To use it, you must either have geos_ats installed in your target python environment, or a copy of geosPythonPackages in the expected location (`/usr/workspace/[username]/geosPythonPackages`).
34+
To use it, you must either have geos-ats installed in your target python environment, or a copy of geosPythonPackages in the expected location (`/usr/workspace/[username]/geosPythonPackages`).
3535

36-
We recommend that you use VSCode with the Python extension to debug geos_ats.
36+
We recommend that you use VSCode with the Python extension to debug geos-ats.
3737
To begin the debugging session, you simply need to load the entry script, set any initial breakpoints you desire, then select the Debug run option.
3838
Note that this approach can only be used to debug the python code associated with tests, and not the underlying GEOS tests.
3939

@@ -45,14 +45,14 @@ API
4545
Restart Check
4646
^^^^^^^^^^^^^^^
4747

48-
.. automodule:: geos_ats.helpers.restart_check
48+
.. automodule:: geos.ats.helpers.restart_check
4949
:members:
5050

5151

5252
Curve Check
5353
^^^^^^^^^^^^^^^
5454

55-
.. automodule:: geos_ats.helpers.curve_check
55+
.. automodule:: geos.ats.helpers.curve_check
5656
:members:
5757

5858

0 commit comments

Comments
 (0)