Skip to content

Packaging as namespace packages #13

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

Merged
merged 34 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
8315692
Resolving merge conflict
cssherman May 13, 2024
2422994
WIP: geos-mesh-doctor
Mar 13, 2024
945bdd9
Resolving merge conflicts
cssherman May 13, 2024
2fe738f
WIP: geos-mesh-tools
Mar 13, 2024
7a1ee5c
WIP: geos-timehistory
Mar 13, 2024
174188f
WIP: geos-xml-tools
Mar 13, 2024
7679472
WIP: doc
Mar 13, 2024
b2546f7
WIP: CI
Mar 13, 2024
af1e7e2
WIP: CI
Mar 13, 2024
c02d281
WIP: CI
Mar 13, 2024
84f77b2
WIP: geos-mesh-doctor
Mar 13, 2024
d7e8e05
WIP
Mar 13, 2024
cdb3e96
WIP: fix pyproject files
Mar 13, 2024
f8f2118
WIP: fix pyproject files
Mar 13, 2024
6adaf79
fix: h5 wrapper namespace
Mar 26, 2024
cf3a45b
doc: change module names
Mar 26, 2024
42cfae8
ci: add doc check workflow
Mar 26, 2024
c9ec727
doc: versions aren't pinned
Mar 26, 2024
5068af9
doc: explicit requirements
Mar 26, 2024
cee50d5
doc: test with build command
Mar 26, 2024
d2972e9
ci: update sphinx
Mar 26, 2024
9a37bc9
ci: update sphinx
Mar 26, 2024
2b9ade7
docs: update doc
Mar 26, 2024
6e14f17
docs: update doc
Mar 26, 2024
5678e66
docs: update doc
Mar 26, 2024
9faff8d
docs: update doc
Mar 26, 2024
307f23e
Fixing geos-ats configuration issue
cssherman May 13, 2024
32c4ca0
chore: should satisfy yapf
May 17, 2024
e12ee59
chore: forget one dot
May 17, 2024
23d41ba
Fixing changes to hdf5_wrapper
cssherman Jun 5, 2024
d574dc2
Reverting some package name changes, consolidating mesh package
cssherman Jun 5, 2024
f42295b
Fixing documentation issues, moving pygeos_tools files
cssherman Jun 5, 2024
4db5734
Applying the formatter
cssherman Jun 5, 2024
d59b694
Fixing geos-mesh name in testing script
cssherman Jun 6, 2024
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
13 changes: 13 additions & 0 deletions .github/workflows/doc-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: "Pull Request Docs Check"
on:
- pull_request

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: ammaraskar/sphinx-action@dev
with:
docs-folder: "docs/"
build-command: "sphinx-build -b html . _build"
14 changes: 8 additions & 6 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ jobs:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
max-parallel: 3
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
package-name: ["geos_ats_package", "geosx_mesh_doctor", "geosx_mesh_tools_package", "geosx_xml_tools_package", "hdf5_wrapper_package", "pygeosx_tools_package", "timehistory_package"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
package-name: ["geos-ats", "geos-mesh", "geos-timehistory", "geos-xml-tools", "hdf5-wrapper", "pygeos-tools"]

steps:
- uses: actions/checkout@v3
Expand All @@ -24,16 +25,17 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install package
working-directory: ./${{ matrix.package-name }}
# working-directory: ./${{ matrix.package-name }}
run: |
python -m pip install --upgrade pip
python -m pip install pytest yapf toml
python -m pip install .
python -m pip install ${{ matrix.package-name }}/
- name: Lint with yapf
working-directory: ./${{ matrix.package-name }}
# working-directory: ./${{ matrix.package-name }}
run: |
yapf -r --diff . --style ../.style.yapf
yapf -r --diff ${{ matrix.package-name }} --style .style.yapf
# - name: Test with pytest
# working-directory: ./${{ matrix.package-name }}
# run: |
Expand Down
173 changes: 161 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,165 @@
#MACOS
DS_Store

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
*.exp
*.lib
*.obj
*.pyc
*.pyd.manifest
*.pyo

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
.DS_Store
.idea
.project
.pydevproject
.settings
build
dist
__pycache__
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
8 changes: 4 additions & 4 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
version: 2

build:
os: "ubuntu-20.04"
os: ubuntu-22.04
apt_packages:
- npm
- plantuml
Expand All @@ -18,9 +18,9 @@ build:
- npm install -g @mermaid-js/mermaid-cli@10.3.1

# Set requirements to build the docs
python:
install:
- requirements: docs/requirements.txt
# python:
# install:
# - requirements: docs/requirements.txt

# Build documentation in the docs/ directory with Sphinx
sphinx:
Expand Down
5 changes: 2 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@

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

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

Expand Down
14 changes: 7 additions & 7 deletions docs/geos_ats.rst → docs/geos-ats.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
GEOS ATS
==========

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

Expand All @@ -13,7 +13,7 @@ run_geos_ats
Primary entry point for running integrated tests.

.. argparse::
:module: geos_ats.command_line_parsers
:module: geos.ats.command_line_parsers
:func: build_command_line_parser
:prog: run_geos_ats

Expand All @@ -29,11 +29,11 @@ Primary entry point for running integrated tests.
Debugging
------------------

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`.
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`.
This script is designed as a debugger entry point, and will read the autogenerated run script that was built during setup.
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`).
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`).

We recommend that you use VSCode with the Python extension to debug geos_ats.
We recommend that you use VSCode with the Python extension to debug geos-ats.
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.
Note that this approach can only be used to debug the python code associated with tests, and not the underlying GEOS tests.

Expand All @@ -45,14 +45,14 @@ API
Restart Check
^^^^^^^^^^^^^^^

.. automodule:: geos_ats.helpers.restart_check
.. automodule:: geos.ats.helpers.restart_check
:members:


Curve Check
^^^^^^^^^^^^^^^

.. automodule:: geos_ats.helpers.curve_check
.. automodule:: geos.ats.helpers.curve_check
:members:


Loading
Loading