Skip to content

Commit

Permalink
Merge pull request #1 from eagles-project/new_branch
Browse files Browse the repository at this point in the history
New project and package structure sprint
  • Loading branch information
josephhardinee authored Nov 15, 2021
2 parents 127938d + 984bcc5 commit f8b629e
Show file tree
Hide file tree
Showing 143 changed files with 14,239 additions and 14,616 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/run_esmac_diags_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: run_esmac_diags_ci.yml
on: [push,pull_request ]
jobs:
build_and_publish:
name: Setup Environment, and run test suite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Environment
uses: conda-incubator/setup-miniconda@v2
with:
python-version: 3.7
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
activate-environment: esmac_diags
environment-file: environment.yml
- name: Install esmac_diags
shell: bash -l {0}
run: |
pip install -e .
- name: Run Pytest
shell: bash -l {0}
run: |
pytest
138 changes: 138 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
# 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

# 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
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

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__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/
8 changes: 0 additions & 8 deletions Python_Dependency.txt

This file was deleted.

29 changes: 17 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,28 @@

This Earth System Model (ESM) aerosol-cloud diagnostics package (ESMAC Diags) is currently used to evaluate aerosols, clouds and aerosol-cloud interactions simulated by the Department of Energy’s (DOE) Energy Exascale Earth System Model (E3SM). The first version (v1.0) focuses on comparing simulated aerosol properties with in-situ aircraft, ship and surface measurements. Various types of diagnostics and metrics are performed for aerosol number, size distribution, chemical composition, and CCN concentration to assess how well E3SM represents observed aerosol properties across spatial scales. Metrics for various meteorological and aerosol precursor quantities from the same field campaigns are also included. Version 2 is under development focusing on aerosol-cloud interactions.

More information can be found in README_ESMAC_Diags_v1.0.pdf
More information can be found in README_ESMAC_Diags_v1.0-alpha.pdf

# Package dependencies
This code is dependent on the following python packages:
## To install
This code is best run using a conda virtual environment. To install the required environment one can do
```bash
conda env create -f environment.yml
```
to set up a esmac_diags environment. Note if running this on a HPC system, you may need to load the appropriate module for anaconda.

os
sys
glob
time
numpy
scipy
matplotlib
netCDF4
Once the environment has been created you can activate it with ```conda activate esmac_diags``` and then this code can be installed with
```bash
pip install -e .
```
Which will install the code as editable allowing you to make changes to the codebase and it be reflected in the installed package.


# Test run
To verify the package, enter scripts/ directory and run scripts_testcase.csh. Then check the directory in testcase/figures/. There should be three figures generated:
To verify the package, enter scripts/ directory and run
```bash
python run_testcase.py
```
Then go to the directory in testcase/figures/. There should be three figures generated:

flighttrack_ACEENA_20170630a.png

Expand Down
Binary file modified README_ESMAC_Diags_v1.0-alpha.pdf
Binary file not shown.
1 change: 0 additions & 1 deletion data

This file was deleted.

17 changes: 17 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: esmac_diags
channels:
- conda-forge
- anaconda
- defaults
dependencies:
- pip
- matplotlib
- numpy
- scipy
- sphinx
- conda-build
- pytest
- pytest-shutil
- ipython
- black
- netCDF4
1 change: 0 additions & 1 deletion figures

This file was deleted.

11 changes: 11 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -q"
testpaths = [
"tests"
]
norecursedirs = "src/esmac_diags/*"
Loading

0 comments on commit f8b629e

Please sign in to comment.