Skip to content

Commit

Permalink
Initial population of repo.
Browse files Browse the repository at this point in the history
Co-authored-by: Arfima Dev <[email protected]>
Co-authored-by: Gonzalo Álvarez <[email protected]>
Co-authored-by: Jonathan Yánez <[email protected]>
Co-authored-by: Víctor de Luna <[email protected]>
Co-authored-by: Virginia Morales <[email protected]>

Signed-off-by: Xavier Barrachina Civera <[email protected]>
  • Loading branch information
xbarra committed Jul 17, 2024
1 parent f5de0cc commit 4bac535
Show file tree
Hide file tree
Showing 38 changed files with 3,019 additions and 666 deletions.
30 changes: 2 additions & 28 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,28 +1,2 @@
# .coveragerc to control coverage.py
[run]
branch = True
source = osc_physrisk_financial
# omit = bad_file.py

[paths]
source =
src/
*/site-packages/

[report]
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover

# Don't complain about missing debug-only code:
def __repr__
if self\.debug

# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError

# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:
[coverage:report]
skip_empty = true
3 changes: 0 additions & 3 deletions .flake8

This file was deleted.

3 changes: 3 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ default: true
extends: null

MD013: false
MD033: {
"allowed_elements": ["img"]
}
25 changes: 11 additions & 14 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
---
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"
jobs:
post_install:
- pip install --upgrade pdm
- VIRTUAL_ENV=$(dirname $(dirname $(which python))) pdm install -dG docs

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# Build documentation with MkDocs
#mkdocs:
# configuration: mkdocs.yml

# Optionally build your docs in additional formats such as PDF
formats:
- pdf

build:
os: ubuntu-22.04
tools:
python: "3.11"

python:
install:
- requirements: docs/requirements.txt
- {path: ., method: pip}
7 changes: 6 additions & 1 deletion AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@
Contributors
============

* github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Arfima Dev <[email protected]>
* Gonzalo Álvarez <[email protected]>
* Jonathan Yánez <[email protected]>
* Víctor de Luna <[email protected]>
* Virginia Morales <[email protected]>
* Xavier Barrachina <[email protected]>
4 changes: 1 addition & 3 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,4 @@ Changelog
Version 0.1
===========

- Feature A added
- FIX: nasty bug #1729 fixed
- add your changes here!
- Initial version!
84 changes: 20 additions & 64 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -1,28 +1,3 @@
.. todo:: THIS IS SUPPOSED TO BE AN EXAMPLE. MODIFY IT ACCORDING TO YOUR NEEDS!

The document assumes you are using a source repository service that promotes a
contribution model similar to `GitHub's fork and pull request workflow`_.
While this is true for the majority of services (like GitHub, GitLab,
BitBucket), it might not be the case for private repositories (e.g., when
using Gerrit).

Also notice that the code examples might refer to GitHub URLs or the text
might use GitHub specific terminology (e.g., *Pull Request* instead of *Merge
Request*).

Please make sure to check the document having these assumptions in mind
and update things accordingly.

.. todo:: Provide the correct links/replacements at the bottom of the document.

.. todo:: You might want to have a look on `PyScaffold's contributor's guide`_,

especially if your project is open source. The text should be very similar to
this template, but there are a few extra contents that you might decide to
also include, like mentioning labels of your issue tracker or automated
releases.


============
Contributing
============
Expand Down Expand Up @@ -72,25 +47,20 @@ by adding missing information and correcting mistakes.
This means that the docs are kept in the same repository as the project code, and
that any documentation update is done in the same way was a code contribution.

.. todo:: Don't forget to mention which markup language you are using.

e.g., reStructuredText_ or CommonMark_ with MyST_ extensions.

.. todo:: If your project is hosted on GitHub, you can also mention the following tip:

.. tip::
Please notice that the `GitHub web interface`_ provides a quick way of
propose changes in ``osc-physrisk-financial``'s files. While this mechanism can
be tricky for normal code contributions, it works perfectly fine for
contributing to the docs, and can be quite handy.

If you are interested in trying this method out, please navigate to
the ``docs`` folder in the source repository_, find which file you
would like to propose changes and click in the little pencil icon at the
top, to open `GitHub's code editor`_. Once you finish editing the file,
please write a message in the form at the bottom of the page describing
which changes have you made and what are the motivations behind them and
submit your proposal.
.. tip::
Please notice that the `GitHub web interface`_ provides a quick way of
propose changes in ``osc-physrisk-financial``'s files. While this mechanism can
be tricky for normal code contributions, it works perfectly fine for
contributing to the docs, and can be quite handy.

If you are interested in trying this method out, please navigate to
the ``docs`` folder in the source repository_, find which file you
would like to propose changes and click in the little pencil icon at the
top, to open `GitHub's code editor`_. Once you finish editing the file,
please write a message in the form at the bottom of the page describing
which changes have you made and what are the motivations behind them and
submit your proposal.

When working on documentation changes in your local machine, you can
compile them using |tox|_::
Expand Down Expand Up @@ -151,8 +121,6 @@ Clone the repository

to be able to import the package under development in the Python REPL.

.. todo:: if you are not using pre-commit, please remove the following item:

#. Install |pre-commit|_::

pip install pre-commit
Expand Down Expand Up @@ -182,11 +150,9 @@ Implement your changes

to record your changes in git_.

.. todo:: if you are not using pre-commit, please remove the following item:

Please make sure to see the validation messages from |pre-commit|_ and fix
any eventual issues.
This should automatically use flake8_/black_ to check/fix the code style
This should automatically use ruff_ to check/fix the code style
in a way that is compatible with the project.

.. important:: Don't forget to add unit tests and documentation in case your
Expand Down Expand Up @@ -218,11 +184,9 @@ Submit your contribution
#. Go to the web page of your fork and click |contribute button|
to send your changes for review.

.. todo:: if you are using GitHub, you can uncomment the following paragraph

Find more detailed information in `creating a PR`_. You might also want to open
the PR as a draft first and mark it as ready for review after the feedbacks
from the continuous integration (CI) system or any required fixes.
Find more detailed information in `creating a PR`_. You might also want to open
the PR as a draft first and mark it as ready for review after the feedbacks
from the continuous integration (CI) system or any required fixes.


Troubleshooting
Expand Down Expand Up @@ -278,11 +242,6 @@ Maintainer tasks
Releases
--------

.. todo:: This section assumes you are using PyPI to publicly release your package.

If instead you are using a different/private package index, please update
the instructions accordingly.

If you are part of the group of maintainers and have correct user permissions
on PyPI_, the following steps can be used to release a new version for
``osc-physrisk-financial``:
Expand All @@ -308,15 +267,12 @@ on PyPI_, the following steps can be used to release a new version for
of environments, including private companies and proprietary code bases.
.. <-- start -->
.. todo:: Please review and change the following definitions:
.. |the repository service| replace:: GitHub
.. |contribute button| replace:: "Create pull request"

.. _repository: https://github.com/<USERNAME>/osc-physrisk-financial
.. _issue tracker: https://github.com/<USERNAME>/osc-physrisk-financial/issues
.. <-- end -->
.. _repository: https://github.com/os-climate/osc-physrisk-financial
.. _issue tracker: https://github.com/os-climate/osc-physrisk-financial/issues


.. |virtualenv| replace:: ``virtualenv``
Expand All @@ -331,7 +287,7 @@ on PyPI_, the following steps can be used to release a new version for
.. _descriptive commit message: https://chris.beams.io/posts/git-commit
.. _docstrings: https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html
.. _first-contributions tutorial: https://github.com/firstcontributions/first-contributions
.. _flake8: https://flake8.pycqa.org/en/stable/
.. _ruff: https://docs.astral.sh/ruff/
.. _git: https://git-scm.com
.. _GitHub's fork and pull request workflow: https://guides.github.com/activities/forking/
.. _guide created by FreeCodeCamp: https://github.com/FreeCodeCamp/how-to-contribute-to-open-source
Expand Down
1 change: 0 additions & 1 deletion LICENSE

This file was deleted.

File renamed without changes.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!-- markdownlint-disable -->
<!-- prettier-ignore-start -->
> [!IMPORTANT]
> On June 26 2024, Linux Foundation announced the merger of its financial services umbrella, the Fintech Open Source Foundation ([FINOS](https://finos.org)), with OS-Climate, an open source community dedicated to building data technologies, modeling, and analytic tools that will drive global capital flows into climate change mitigation and resilience; OS-Climate projects are in the process of transitioning to the [FINOS governance framework](https://community.finos.org/docs/governance); read more on [finos.org/press/finos-join-forces-os-open-source-climate-sustainability-esg](https://finos.org/press/finos-join-forces-os-open-source-climate-sustainability-esg)
<!-- prettier-ignore-end -->
<!-- markdownlint-enable -->
# osc-physrisk-financial

Physical climate risk financial valuation

<img src="docs/images/OS-Climate-Logo.png" alt="drawing" width="150"/>

## About osc-physrisk-financial

An [OS-Climate](https://os-climate.org) project, osc-physrisk-financial
is a library for valuating assets under different climate risk scenarios.

## Using the library

The library can be run locally and is installed via:

```shell
pip install osc-physrisk-financial
```

The library uses the output generated by the
[physrisk](https://github.com/os-climate/physrisk) library

### Note

This is the first stage of development, where the models are intentionally
simple, focusing on setting up the proper structure of the library.
54 changes: 0 additions & 54 deletions README.rst

This file was deleted.

7 changes: 7 additions & 0 deletions docs/assets.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Assets
======

.. automodule:: osc_physrisk_financial.assets
:members:
:undoc-members:
:show-inheritance:
Loading

0 comments on commit 4bac535

Please sign in to comment.