Skip to content

Commit

Permalink
Update C and Fortran docs examples (#97)
Browse files Browse the repository at this point in the history
* Rename conda env file for C example

* Match C example babel.toml with 'babelize sample-config' output

* Update C example through babelizing

* Rename C example

[skip ci]

* Update reference to C example from Fortran example

* Update C example through installation

[skip ci]

* Replace Finder image with 'tree' output to show final directory structure

This hopefully makes the result clearer and removes a binary file from
the repo.

[skip-ci]

* Include bmi-tester in example environment

* Move parameters for C example to their own directory

* Move Python examples to c directory

* Include pymt in example environment

* Update Python examples for C heat model

* Update location of C Python example

* Finish updating C example

[skip-ci]

* Show a smaller tree for final result

* Update Fortran environment file; relax bmi-tester version requirement

* Update HeatF babelizer config file

* Minor edits; fix typos

* Add Fortran-Python examples

* Fix typo

* Update the Fortran example to match the C example

* Add news fragment

* Add code of conduct document to repo and docs

* Remove obsolete docs makefiles

* Add news fragments

---------

Co-authored-by: mcflugen <[email protected]>
  • Loading branch information
mdpiper and mcflugen authored Apr 10, 2024
1 parent 8b84c83 commit 54f43b4
Show file tree
Hide file tree
Showing 25 changed files with 445 additions and 358 deletions.
9 changes: 9 additions & 0 deletions CODE-OF-CONDUCT.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Code of Conduct
---------------

Everyone participating in this project is governed by the CSDMS `Code of Conduct`_.
By participating, you are expected to uphold this code.

.. Links
.. _Code of Conduct: https://github.com/csdms/project/blob/main/CODE-OF-CONDUCT.md
20 changes: 0 additions & 20 deletions docs/Makefile

This file was deleted.

35 changes: 0 additions & 35 deletions docs/make.bat

This file was deleted.

Binary file removed docs/source/_static/babelizer-bmi-example-c.png
Binary file not shown.
26 changes: 19 additions & 7 deletions docs/source/babel_heatc.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
[library]
[library.HeatModel]
# See https://babelizer.readthedocs.io/ for more information

# Describe the library being wrapped.
[library.HeatC]
language = "c"
library = "bmiheatc"
header = "bmi_heat.h"
entry_point = "register_bmi_heat"

# Describe compiler options need to build the library being wrapped.
[build]
undef_macros = []
define_macros = []
Expand All @@ -13,17 +16,26 @@ library_dirs = []
include_dirs = []
extra_compile_args = []

# Describe the newly wrapped package.
[package]
name = "pymt_heatc"
requirements = [""]
requirements = []

[info]
github_username = "pymt-lab"
package_author = "csdms"
package_author_email = "[email protected]"
package_license = "MIT"
summary = "PyMT plugin for the C heat model"
package_license = "MIT License"
summary = "PyMT component for the C heat model"

[ci]
python_version = ["3.9"]
os = ["linux", "mac", "windows"]
python_version = [
"3.10",
"3.11",
"3.12",
]
os = [
"linux",
"mac",
"windows",
]
23 changes: 18 additions & 5 deletions docs/source/babel_heatf.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
[library.HeatModel]
# See https://babelizer.readthedocs.io/ for more information

# Describe the library being wrapped.
[library.HeatF]
language = "fortran"
library = "bmiheatf"
header = ""
entry_point = "bmi_heat"

# Describe compiler options need to build the library being wrapped.
[build]
undef_macros = []
define_macros = []
Expand All @@ -12,17 +16,26 @@ library_dirs = []
include_dirs = []
extra_compile_args = []

# Describe the newly wrapped package.
[package]
name = "pymt_heatf"
requirements = [""]
requirements = []

[info]
github_username = "pymt-lab"
package_author = "csdms"
package_author_email = "[email protected]"
package_license = "MIT License"
summary = "PyMT plugin for the Fortran heat model"
summary = "PyMT component for the Fortran heat model"

[ci]
python_version = ["3.9"]
os = ["linux", "mac", "windows"]
python_version = [
"3.10",
"3.11",
"3.12",
]
os = [
"linux",
"mac",
"windows",
]
1 change: 1 addition & 0 deletions docs/source/code-of-conduct.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. include:: ../../CODE-OF-CONDUCT.rst
6 changes: 4 additions & 2 deletions docs/source/environment.yml → docs/source/environment-c.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# A conda environment file for the babelizer example
name: wrap
# A conda environment file for the babelizer C example
name: wrap-c
channels:
- conda-forge
dependencies:
Expand All @@ -10,3 +10,5 @@ dependencies:
- c-compiler
- bmi-c
- babelizer
- bmi-tester
- pymt>=1.3
4 changes: 3 additions & 1 deletion docs/source/environment-fortran.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# A conda environment file for the babelizer Fortran example
name: wrap
name: wrap-f
channels:
- conda-forge
dependencies:
Expand All @@ -10,3 +10,5 @@ dependencies:
- fortran-compiler
- bmi-fortran
- babelizer
- bmi-tester
- pymt>=1.3
Loading

0 comments on commit 54f43b4

Please sign in to comment.