Skip to content

Commit

Permalink
Merge pull request #1 from jdhughes-usgs/initial-pull
Browse files Browse the repository at this point in the history
setup: initial files from original repo
  • Loading branch information
jdhughes-usgs authored Jul 8, 2022
2 parents ede1b8e + 0e464bc commit 5f7cd0c
Show file tree
Hide file tree
Showing 10 changed files with 2,730 additions and 0 deletions.
94 changes: 94 additions & 0 deletions .github/workflows/modflow-devtools-linting-install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: modflow-devtools linting/installation

on:
schedule:
- cron: '0 3 * * 3' # run at 3 AM UTC every Wednesday
push:
branches:
- main
- develop
pull_request:
branches:
- develop
jobs:


modflow-devtools_lint:
name: modflow-devtools linting
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v2.3.4

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install packages
run: |
pip install numpy flopy pylint flake8 black
- name: Run isort
run: |
echo "if isort check fails update isort using"
echo " pip install isort --upgrade"
echo "and run"
echo " isort ./modflow-devtools"
echo "and then commit the changes."
isort --verbose --check --diff ./modflow-devtools
- name: Run black
run: |
echo "if black check fails update black using"
echo " pip install black --upgrade"
echo "and run"
echo " black ./modflow-devtools"
echo "and then commit the changes."
black --check --diff ./modflow-devtools
- name: Run flake8
run: flake8 --count --show-source ./modflow-devtools

- name: Run pylint
run: pylint --jobs=0 --errors-only ./modflow-devtools

modflow-devtools_setup:
name: standard installation
runs-on: ubuntu-latest
strategy:
fail-fast: false
defaults:
run:
shell: bash

steps:

# check out repo
- name: Checkout repo
uses: actions/checkout@v2.3.4

- name: Setup Python
uses: actions/setup-python@v2.2.2
with:
python-version: 3.9

- name: Upgrade pip and install build and twine
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Base modflow-devtools installation
run: |
pip --verbose install .
- name: Print modflow-devtools version
run: |
python -c "import modflow-devtools; print(modflow-devtools.__version__)"
- name: Build modflow-devtools, check dist outputs
run: |
python -m build
twine check --strict dist/*
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,7 @@ dmypy.json

# Pyre type checker
.pyre/

# pycharme
.idea/

40 changes: 40 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
License
=======

Unless otherwise noted, This project is in the public domain in the United
States because it contains materials that originally came from the United
States Geological Survey, an agency of the United States Department of
Interior. For more information, see the official USGS copyright policy at
https://www2.usgs.gov/visual-id/credit_usgs.html#copyright

Additionally, we waive copyright and related rights in the work worldwide
through the CC0 1.0 Universal public domain dedication.

CC0 1.0 Universal Summary
-------------------------

This is a human-readable summary of the
[Legal Code (read the full text)][1].

### No Copyright

The person who associated a work with this deed has dedicated the work to the
public domain by waiving all of his or her rights to the work worldwide under
copyright law, including all related and neighboring rights, to the extent
allowed by law.

You can copy, modify, distribute and perform the work, even for commercial
purposes, all without asking permission.

### Other Information

In no way are the patent or trademark rights of any person affected by CC0, nor
are the rights that other persons may have in the work or in how the work is
used, such as publicity or privacy rights.

Unless expressly stated otherwise, the person who associated a work with this
deed makes no warranties about the work, and disclaims liability for all uses
of the work, to the fullest extent permitted by applicable law. When using or
citing the work, you should not imply endorsement by the author or the
affirmer.
[1]: https://creativecommons.org/publicdomain/zero/1.0/legalcode
8 changes: 8 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
global-exclude .DS_Store *.pyc *.pyo *.pyd *.swp *.bak *~ .* *.sh *.yml *.md *.toml
exclude docs/*
exclude autotest/*
include pyproject.toml
include pymake/utils/usgsprograms.txt
include examples/*.bat
include examples/*.py

66 changes: 66 additions & 0 deletions mfdevtools/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
"""modflow-devtools is a Python package containing tools for MODFLOW
development."""


# pymake
from .config import (
__author__,
__date__,
__description__,
__email__,
__maintainer__,
__status__,
__version__,
)

# autotest
from .testing.testing import (
compare,
compare_budget,
compare_concs,
compare_heads,
compare_stages,
compare_swrbudget,
get_entries_from_namefile,
get_input_files,
get_mf6_blockdata,
get_mf6_comparison,
get_mf6_files,
get_mf6_ftypes,
get_mf6_mshape,
get_mf6_nper,
get_namefiles,
get_sim_name,
setup,
setup_comparison,
setup_mf6,
setup_mf6_comparison,
teardown,
)

# define public interfaces
__all__ = [
"__version__",
# testing
"setup",
"setup_comparison",
"teardown",
"get_namefiles",
"get_entries_from_namefile",
"get_sim_name",
"get_input_files",
"compare_budget",
"compare_swrbudget",
"compare_heads",
"compare_concs",
"compare_stages",
"compare",
"setup_mf6",
"setup_mf6_comparison",
"get_mf6_comparison",
"get_mf6_files",
"get_mf6_blockdata",
"get_mf6_ftypes",
"get_mf6_mshape",
"get_mf6_nper",
]
10 changes: 10 additions & 0 deletions mfdevtools/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
__author__ = "Joseph D. Hughes"
__date__ = "March 2, 2022"
__version__ = "0.0.1"
__maintainer__ = "Joseph D. Hughes"
__email__ = "jdhughes@usgs.gov"
__status__ = "Production"
__description__ = """
This is the modflow-devtools package that provides functionality used in the
MODFLOW development environment.
"""
Loading

0 comments on commit 5f7cd0c

Please sign in to comment.