Skip to content

Commit 6551d5c

Browse files
committed
Initial population of repo.
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]>
1 parent f5de0cc commit 6551d5c

38 files changed

+3019
-666
lines changed

.coveragerc

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,2 @@
1-
# .coveragerc to control coverage.py
2-
[run]
3-
branch = True
4-
source = osc_physrisk_financial
5-
# omit = bad_file.py
6-
7-
[paths]
8-
source =
9-
src/
10-
*/site-packages/
11-
12-
[report]
13-
# Regexes for lines to exclude from consideration
14-
exclude_lines =
15-
# Have to re-enable the standard pragma
16-
pragma: no cover
17-
18-
# Don't complain about missing debug-only code:
19-
def __repr__
20-
if self\.debug
21-
22-
# Don't complain if tests don't hit defensive assertion code:
23-
raise AssertionError
24-
raise NotImplementedError
25-
26-
# Don't complain if non-runnable code isn't run:
27-
if 0:
28-
if __name__ == .__main__.:
1+
[coverage:report]
2+
skip_empty = true

.flake8

Lines changed: 0 additions & 3 deletions
This file was deleted.

.markdownlint.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ default: true
88
extends: null
99

1010
MD013: false
11+
MD033: {
12+
"allowed_elements": ["img"]
13+
}

.readthedocs.yml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,24 @@
1+
---
12
# Read the Docs configuration file
23
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
34

45
# Required
56
version: 2
67

8+
# Set the OS, Python version and other tools you might need
9+
build:
10+
os: ubuntu-22.04
11+
tools:
12+
python: "3.11"
13+
jobs:
14+
post_install:
15+
- pip install --upgrade pdm
16+
- VIRTUAL_ENV=$(dirname $(dirname $(which python))) pdm install -dG docs
17+
718
# Build documentation in the docs/ directory with Sphinx
819
sphinx:
920
configuration: docs/conf.py
1021

11-
# Build documentation with MkDocs
12-
#mkdocs:
13-
# configuration: mkdocs.yml
14-
1522
# Optionally build your docs in additional formats such as PDF
1623
formats:
1724
- pdf
18-
19-
build:
20-
os: ubuntu-22.04
21-
tools:
22-
python: "3.11"
23-
24-
python:
25-
install:
26-
- requirements: docs/requirements.txt
27-
- {path: ., method: pip}

AUTHORS.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,9 @@
22
Contributors
33
============
44

5-
* github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
5+
* Arfima Dev <[email protected]>
6+
* Gonzalo Álvarez <[email protected]>
7+
* Jonathan Yánez <[email protected]>
8+
* Víctor de Luna <[email protected]>
9+
* Virginia Morales <[email protected]>
10+
* Xavier Barrachina <[email protected]>

CHANGELOG.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,4 @@ Changelog
55
Version 0.1
66
===========
77

8-
- Feature A added
9-
- FIX: nasty bug #1729 fixed
10-
- add your changes here!
8+
- Initial version!

CONTRIBUTING.rst

Lines changed: 20 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,3 @@
1-
.. todo:: THIS IS SUPPOSED TO BE AN EXAMPLE. MODIFY IT ACCORDING TO YOUR NEEDS!
2-
3-
The document assumes you are using a source repository service that promotes a
4-
contribution model similar to `GitHub's fork and pull request workflow`_.
5-
While this is true for the majority of services (like GitHub, GitLab,
6-
BitBucket), it might not be the case for private repositories (e.g., when
7-
using Gerrit).
8-
9-
Also notice that the code examples might refer to GitHub URLs or the text
10-
might use GitHub specific terminology (e.g., *Pull Request* instead of *Merge
11-
Request*).
12-
13-
Please make sure to check the document having these assumptions in mind
14-
and update things accordingly.
15-
16-
.. todo:: Provide the correct links/replacements at the bottom of the document.
17-
18-
.. todo:: You might want to have a look on `PyScaffold's contributor's guide`_,
19-
20-
especially if your project is open source. The text should be very similar to
21-
this template, but there are a few extra contents that you might decide to
22-
also include, like mentioning labels of your issue tracker or automated
23-
releases.
24-
25-
261
============
272
Contributing
283
============
@@ -72,25 +47,20 @@ by adding missing information and correcting mistakes.
7247
This means that the docs are kept in the same repository as the project code, and
7348
that any documentation update is done in the same way was a code contribution.
7449

75-
.. todo:: Don't forget to mention which markup language you are using.
76-
77-
e.g., reStructuredText_ or CommonMark_ with MyST_ extensions.
7850

79-
.. todo:: If your project is hosted on GitHub, you can also mention the following tip:
80-
81-
.. tip::
82-
Please notice that the `GitHub web interface`_ provides a quick way of
83-
propose changes in ``osc-physrisk-financial``'s files. While this mechanism can
84-
be tricky for normal code contributions, it works perfectly fine for
85-
contributing to the docs, and can be quite handy.
86-
87-
If you are interested in trying this method out, please navigate to
88-
the ``docs`` folder in the source repository_, find which file you
89-
would like to propose changes and click in the little pencil icon at the
90-
top, to open `GitHub's code editor`_. Once you finish editing the file,
91-
please write a message in the form at the bottom of the page describing
92-
which changes have you made and what are the motivations behind them and
93-
submit your proposal.
51+
.. tip::
52+
Please notice that the `GitHub web interface`_ provides a quick way of
53+
propose changes in ``osc-physrisk-financial``'s files. While this mechanism can
54+
be tricky for normal code contributions, it works perfectly fine for
55+
contributing to the docs, and can be quite handy.
56+
57+
If you are interested in trying this method out, please navigate to
58+
the ``docs`` folder in the source repository_, find which file you
59+
would like to propose changes and click in the little pencil icon at the
60+
top, to open `GitHub's code editor`_. Once you finish editing the file,
61+
please write a message in the form at the bottom of the page describing
62+
which changes have you made and what are the motivations behind them and
63+
submit your proposal.
9464

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

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

154-
.. todo:: if you are not using pre-commit, please remove the following item:
155-
156124
#. Install |pre-commit|_::
157125

158126
pip install pre-commit
@@ -182,11 +150,9 @@ Implement your changes
182150

183151
to record your changes in git_.
184152

185-
.. todo:: if you are not using pre-commit, please remove the following item:
186-
187153
Please make sure to see the validation messages from |pre-commit|_ and fix
188154
any eventual issues.
189-
This should automatically use flake8_/black_ to check/fix the code style
155+
This should automatically use ruff_ to check/fix the code style
190156
in a way that is compatible with the project.
191157

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

221-
.. todo:: if you are using GitHub, you can uncomment the following paragraph
222-
223-
Find more detailed information in `creating a PR`_. You might also want to open
224-
the PR as a draft first and mark it as ready for review after the feedbacks
225-
from the continuous integration (CI) system or any required fixes.
187+
Find more detailed information in `creating a PR`_. You might also want to open
188+
the PR as a draft first and mark it as ready for review after the feedbacks
189+
from the continuous integration (CI) system or any required fixes.
226190

227191

228192
Troubleshooting
@@ -278,11 +242,6 @@ Maintainer tasks
278242
Releases
279243
--------
280244

281-
.. todo:: This section assumes you are using PyPI to publicly release your package.
282-
283-
If instead you are using a different/private package index, please update
284-
the instructions accordingly.
285-
286245
If you are part of the group of maintainers and have correct user permissions
287246
on PyPI_, the following steps can be used to release a new version for
288247
``osc-physrisk-financial``:
@@ -308,15 +267,12 @@ on PyPI_, the following steps can be used to release a new version for
308267
of environments, including private companies and proprietary code bases.
309268
310269
311-
.. <-- start -->
312-
.. todo:: Please review and change the following definitions:
313270
314271
.. |the repository service| replace:: GitHub
315272
.. |contribute button| replace:: "Create pull request"
316273

317-
.. _repository: https://github.com/<USERNAME>/osc-physrisk-financial
318-
.. _issue tracker: https://github.com/<USERNAME>/osc-physrisk-financial/issues
319-
.. <-- end -->
274+
.. _repository: https://github.com/os-climate/osc-physrisk-financial
275+
.. _issue tracker: https://github.com/os-climate/osc-physrisk-financial/issues
320276

321277

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

LICENSE

Lines changed: 0 additions & 1 deletion
This file was deleted.
File renamed without changes.

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!-- markdownlint-disable -->
2+
<!-- prettier-ignore-start -->
3+
> [!IMPORTANT]
4+
> 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)
5+
<!-- prettier-ignore-end -->
6+
<!-- markdownlint-enable -->
7+
8+
# osc-physrisk-financial
9+
10+
Physical climate risk financial valuation
11+
12+
<img src="docs/images/OS-Climate-Logo.png" alt="drawing" width="150"/>
13+
14+
## About osc-physrisk-financial
15+
16+
An [OS-Climate](https://os-climate.org) project, osc-physrisk-financial
17+
is a library for valuating assets under different climate risk scenarios.
18+
19+
## Using the library
20+
21+
The library can be run locally and is installed via:
22+
23+
```shell
24+
pip install osc-physrisk-financial
25+
```
26+
27+
The library uses the output generated by the
28+
[physrisk](https://github.com/os-climate/physrisk) library
29+
30+
### Note
31+
32+
This is the first stage of development, where the models are intentionally
33+
simple, focusing on setting up the proper structure of the library.

0 commit comments

Comments
 (0)