Skip to content

Commit

Permalink
Merge pull request #66 from VegeWaterDynamics/open_repository
Browse files Browse the repository at this point in the history
Open repository
  • Loading branch information
rogerkuou authored Dec 5, 2022
2 parents 041413f + f754517 commit b72af2c
Show file tree
Hide file tree
Showing 35 changed files with 230 additions and 2,316 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.6', '3.7', '3.8']
python-version: ['3.9', '3.10']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand Down
19 changes: 0 additions & 19 deletions CHANGELOG.rst

This file was deleted.

60 changes: 30 additions & 30 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
# YAML 1.2
---
abstract: "ml_lsmodel_ascat is a Machine Learning package written in Python. It trains surrogate model to connect soil and vegetation states/parameters to microwave observations."
authors:
-
affiliation: "Netherlands eScience Center"
family-names: Ku
given-names: Ou
-
affiliation: "Delft University of Technology"
family-names: Shan
given-names: Xu
-
affiliation: "Netherlands eScience Center"
family-names: Georgievska
given-names: Sonja
-
affiliation: "Delft University of Technology"
family-names: Steele-Dunne
given-names: Susan
cff-version: "0.1.0"
title: "ml_lsmodel_ascat"
date-released: YYYY-MM-DD
doi: <insert your DOI here>
version: "0.1.0"
repository-code: "https://github.com/VegeWaterDynamics/ml_lsmodel_ascat"
identifiers:
keywords:
message: "If you use this software, please cite it using these metadata."
license: "Apache Software License 2.0"
# YAML 1.2
---
abstract: "motrainer (Measurement Operator Trainer) is a Machine Learning package written in Python. It trains surrogate model to connect soil and vegetation states/parameters to microwave observations."
authors:
-
affiliation: "Netherlands eScience Center"
family-names: Ku
given-names: Ou
-
affiliation: "Delft University of Technology"
family-names: Shan
given-names: Xu
-
affiliation: "Netherlands eScience Center"
family-names: Georgievska
given-names: Sonja
-
affiliation: "Delft University of Technology"
family-names: Steele-Dunne
given-names: Susan
cff-version: "0.1.0"
title: "motrainer"
date-released: "2022-12-10"
doi: <insert your DOI here>
version: "0.1.0"
repository-code: "https://github.com/VegeWaterDynamics/motrainer"
identifiers:
keywords:
message: "If you use this software, please cite it using these metadata."
license: "Apache Software License 2.0"
88 changes: 44 additions & 44 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
############################
Contributing guidelines
############################

We welcome any kind of contribution to our software, from simple comment or question to a full fledged `pull request <https://help.github.com/articles/about-pull-requests/>`_. Please read and follow our `Code of Conduct <CODE_OF_CONDUCT.rst>`_.

A contribution can be one of the following cases:

#. you have a question;
#. you think you may have found a bug (including unexpected behavior);
#. you want to make some kind of change to the code base (e.g. to fix a bug, to add a new feature, to update documentation).

The sections below outline the steps in each case.

You have a question
*******************

#. use the search functionality `here <https://github.com/VegeWaterDynamics/ml_lsmodel_ascat/issues>`__ to see if someone already filed the same issue;
#. if your issue search did not yield any relevant results, make a new issue;
#. apply the "Question" label; apply other labels when relevant.

You think you may have found a bug
**********************************

#. use the search functionality `here <https://github.com/VegeWaterDynamics/ml_lsmodel_ascat/issues>`__ to see if someone already filed the same issue;
#. if your issue search did not yield any relevant results, make a new issue, making sure to provide enough information to the rest of the community to understand the cause and context of the problem. Depending on the issue, you may want to include:
- the `SHA hashcode <https://help.github.com/articles/autolinked-references-and-urls/#commit-shas>`_ of the commit that is causing your problem;
- some identifying information (name and version number) for dependencies you're using;
- information about the operating system;
#. apply relevant labels to the newly created issue.

You want to make some kind of change to the code base
*****************************************************

#. (**important**) announce your plan to the rest of the community *before you start working*. This announcement should be in the form of a (new) issue;
#. (**important**) wait until some kind of consensus is reached about your idea being a good idea;
#. if needed, fork the repository to your own Github profile and create your own feature branch off of the latest master commit. While working on your feature branch, make sure to stay up to date with the master branch by pulling in changes, possibly from the 'upstream' repository (follow the instructions `here <https://help.github.com/articles/configuring-a-remote-for-a-fork/>`__ and `here <https://help.github.com/articles/syncing-a-fork/>`__);
#. make sure the existing tests still work by running ``python setup.py test``;
#. add your own tests (if necessary);
#. update or expand the documentation;
#. `push <http://rogerdudler.github.io/git-guide/>`_ your feature branch to (your fork of) the ml_lsmodel_ascat repository on GitHub;
#. create the pull request, e.g. following the instructions `here <https://help.github.com/articles/creating-a-pull-request/>`__.

In case you feel like you've made a valuable contribution, but you don't know how to write or run tests for it, or how to generate the documentation: don't let this discourage you from making the pull request; we can help you! Just go ahead and submit the pull request, but keep in mind that you might be asked to append additional commits to your pull request.
############################
Contributing guidelines
############################

We welcome any kind of contribution to our software, from simple comment or question to a full fledged `pull request <https://help.github.com/articles/about-pull-requests/>`_. Please read and follow our `Code of Conduct <CODE_OF_CONDUCT.rst>`_.

A contribution can be one of the following cases:

#. you have a question;
#. you think you may have found a bug (including unexpected behavior);
#. you want to make some kind of change to the code base (e.g. to fix a bug, to add a new feature, to update documentation).

The sections below outline the steps in each case.

You have a question
*******************

#. use the search functionality `here <https://github.com/VegeWaterDynamics/motrainer/issues>`__ to see if someone already filed the same issue;
#. if your issue search did not yield any relevant results, make a new issue;
#. apply the "Question" label; apply other labels when relevant.

You think you may have found a bug
**********************************

#. use the search functionality `here <https://github.com/VegeWaterDynamics/motrainer/issues>`__ to see if someone already filed the same issue;
#. if your issue search did not yield any relevant results, make a new issue, making sure to provide enough information to the rest of the community to understand the cause and context of the problem. Depending on the issue, you may want to include:
- the `SHA hashcode <https://help.github.com/articles/autolinked-references-and-urls/#commit-shas>`_ of the commit that is causing your problem;
- some identifying information (name and version number) for dependencies you're using;
- information about the operating system;
#. apply relevant labels to the newly created issue.

You want to make some kind of change to the code base
*****************************************************

#. (**important**) announce your plan to the rest of the community *before you start working*. This announcement should be in the form of a (new) issue;
#. (**important**) wait until some kind of consensus is reached about your idea being a good idea;
#. if needed, fork the repository to your own Github profile and create your own feature branch off of the latest master commit. While working on your feature branch, make sure to stay up to date with the master branch by pulling in changes, possibly from the 'upstream' repository (follow the instructions `here <https://help.github.com/articles/configuring-a-remote-for-a-fork/>`__ and `here <https://help.github.com/articles/syncing-a-fork/>`__);
#. make sure the existing tests still work by running ``python setup.py test``;
#. add your own tests (if necessary);
#. update or expand the documentation;
#. `push <http://rogerdudler.github.io/git-guide/>`_ your feature branch to (your fork of) the motrainer repository on GitHub;
#. create the pull request, e.g. following the instructions `here <https://help.github.com/articles/creating-a-pull-request/>`__.

In case you feel like you've made a valuable contribution, but you don't know how to write or run tests for it, or how to generate the documentation: don't let this discourage you from making the pull request; we can help you! Just go ahead and submit the pull request, but keep in mind that you might be asked to append additional commits to your pull request.
2 changes: 0 additions & 2 deletions NOTICE

This file was deleted.

45 changes: 23 additions & 22 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
################################################################################
ml_lsmodel_ascat
MOTrainer: Measurement Operator Trainer
################################################################################

ml_lsmodel_ascat is a Machine Learning package written in Python.
It trains surrogate model to connect soil and vegetation states/parameters to microwave observations.
Measurement Operator Trainer is a Python package training measurement operators
(MO) for data assimilations purposes. At present, the MOTrainer trains Deep Neuron
Networks as measurement operators for Earth Observation (EO) application. The
trained predicts sensor measurement based on certain physical model states.

MOTrainer assumes the availability of the training dataset, i.e. input (model
status) and output (sensor data).

Installation
------------
Expand All @@ -12,42 +17,38 @@ First, please clone this repository to prepare for installation.

.. code-block:: console
git clone https://github.com/VegeWaterDynamics/ml_lsmodel_ascat.git
We recommend to install ``ml_lsmodel_ascat`` via ``mamba``. It can either be installed independently, or under
the ``base`` environment of ``conda``.
Please check the `installation guide <https://mamba.readthedocs.io/en/latest/installation.html>`_ to install ``mamba``.
git clone https://github.com/VegeWaterDynamics/motrainer.git

After you succesfully installed ``mamba``, you can install the environment from the ``environment.yml`` file:
We recommend installing ``MOtrainer`` under a blank `conda environment
<https://docs.conda.io/en/latest/>`_. After activating the conda environment,
you can install ``MOTrainer`` from the source:

.. code-block:: console
mamba env create -f environment.yml
A new environment with the name ``vegetation`` will be created. You can activate it by:
cd motrainer
pip install .
.. code-block:: console
mamba activate env_ml_lsmodel_ascat
To make sure everything works, you can run:
Alternatively, you can also install ``motrainer`` via ``conda``.

.. code-block:: console
pytest tests/
conda env create -f environment.yml
Documentation
Usage examples
*************

.. _README:
The usage example of MOTrainer can be found `here <example/demo_jackknife.py>`_

Alternatively, the execution of MOTrainer can be scaled up to an HPC system by using
SLURM. Please refer to the example `here <example/demo_slurm/readme.md>`_.

Currently the package is not publicly released. Please refer to the source code for documentation.

Contributing
************

If you want to contribute to the development of ml_lsmodel_ascat,
If you want to contribute to the development of MOtrainer,
have a look at the `contribution guidelines <CONTRIBUTING.rst>`_.

License
Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = ml_lsmodel_ascat
SPHINXPROJ = motrainer
SOURCEDIR = .
BUILDDIR = _build

Expand Down
20 changes: 10 additions & 10 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# ml_lsmodel_ascat documentation build configuration file, created by
# motrainer documentation build configuration file, created by
# sphinx-quickstart on Tue Sep 29 12:58:55 2020.
#
# This file is execfile()d with the current directory set to its
Expand All @@ -19,7 +19,7 @@
import os
import sys

import ml_lsmodel_ascat
import motrainer

here = os.path.dirname(__file__)
sys.path.insert(0, os.path.abspath(os.path.join(here, '..')))
Expand Down Expand Up @@ -49,7 +49,7 @@
master_doc = 'index'

# General information about the project.
project = u'ml_lsmodel_ascat'
project = u'motrainer'
copyright = u'2020, '
author = u"Netherlands eScience Center, TUDelft"

Expand All @@ -58,9 +58,9 @@
# built documents.
#
# The short X.Y version.
version = ml_lsmodel_ascat.__version__
version = motrainer.__version__
# The full version, including alpha/beta/rc tags.
release = ml_lsmodel_ascat.__version__
release = motrainer.__version__

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -121,7 +121,7 @@
# -- Options for HTMLHelp output ------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'ml_lsmodel_ascat_doc'
htmlhelp_basename = 'motrainer_doc'


# -- Options for LaTeX output ---------------------------------------------
Expand All @@ -148,7 +148,7 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'ml_lsmodel_ascat.tex', u'ml_lsmodel_ascat Documentation',
(master_doc, 'motrainer.tex', u'motrainer Documentation',
u"Netherlands eScience Center, TUDelft", 'manual'),
]

Expand All @@ -158,7 +158,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'ml_lsmodel_ascat', u'ml_lsmodel_ascat Documentation',
(master_doc, 'motrainer', u'motrainer Documentation',
[author], 1)
]

Expand All @@ -169,7 +169,7 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'ml_lsmodel_ascat', u'ml_lsmodel_ascat Documentation',
author, 'ml_lsmodel_ascat', "Machine Learning module to train a surrogate module using Land-surface model dtput",
(master_doc, 'motrainer', u'motrainer Documentation',
author, 'motrainer', "Machine Learning module to train a surrogate module using Land-surface model dtput",
'Miscellaneous'),
]
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.. ml_lsmodel_ascat documentation master file, created by
.. motrainer documentation master file, created by
sphinx-quickstart on Thu Jun 21 11:07:11 2018.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to ml_lsmodel_ascat's documentation!
Welcome to motrainer's documentation!
==========================================================

.. toctree::
Expand Down
2 changes: 1 addition & 1 deletion docs/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if "%SPHINXBUILD%" == "" (
)
set SOURCEDIR=.
set BUILDDIR=_build
set SPHINXPROJ=ml_lsmodel_ascat
set SPHINXPROJ=motrainer

if "%1" == "" goto help

Expand Down
Loading

0 comments on commit b72af2c

Please sign in to comment.