fmu-settings 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fmu-settings might be problematic. Click here for more details.
- fmu_settings-0.0.1/.coveragerc +4 -0
- fmu_settings-0.0.1/.github/pull_request_template.md +18 -0
- fmu_settings-0.0.1/.github/workflows/ci.yml +58 -0
- fmu_settings-0.0.1/.github/workflows/codeql.yml +43 -0
- fmu_settings-0.0.1/.github/workflows/publish.yml +41 -0
- fmu_settings-0.0.1/.gitignore +98 -0
- fmu_settings-0.0.1/CONTRIBUTING.md +34 -0
- fmu_settings-0.0.1/LICENSE +674 -0
- fmu_settings-0.0.1/PKG-INFO +69 -0
- fmu_settings-0.0.1/README.md +38 -0
- fmu_settings-0.0.1/SECURITY.md +16 -0
- fmu_settings-0.0.1/pyproject.toml +120 -0
- fmu_settings-0.0.1/setup.cfg +4 -0
- fmu_settings-0.0.1/src/fmu/__init__.py +6 -0
- fmu_settings-0.0.1/src/fmu/settings/__init__.py +12 -0
- fmu_settings-0.0.1/src/fmu/settings/_fmu_dir.py +337 -0
- fmu_settings-0.0.1/src/fmu/settings/_init.py +131 -0
- fmu_settings-0.0.1/src/fmu/settings/_logging.py +30 -0
- fmu_settings-0.0.1/src/fmu/settings/_version.py +21 -0
- fmu_settings-0.0.1/src/fmu/settings/models/__init__.py +5 -0
- fmu_settings-0.0.1/src/fmu/settings/models/_enums.py +34 -0
- fmu_settings-0.0.1/src/fmu/settings/models/_mappings.py +118 -0
- fmu_settings-0.0.1/src/fmu/settings/models/project_config.py +49 -0
- fmu_settings-0.0.1/src/fmu/settings/models/smda.py +90 -0
- fmu_settings-0.0.1/src/fmu/settings/models/user_config.py +73 -0
- fmu_settings-0.0.1/src/fmu/settings/py.typed +0 -0
- fmu_settings-0.0.1/src/fmu/settings/resources/config_managers.py +211 -0
- fmu_settings-0.0.1/src/fmu/settings/resources/managers.py +96 -0
- fmu_settings-0.0.1/src/fmu/settings/types.py +20 -0
- fmu_settings-0.0.1/src/fmu_settings.egg-info/PKG-INFO +69 -0
- fmu_settings-0.0.1/src/fmu_settings.egg-info/SOURCES.txt +38 -0
- fmu_settings-0.0.1/src/fmu_settings.egg-info/dependency_links.txt +1 -0
- fmu_settings-0.0.1/src/fmu_settings.egg-info/requires.txt +11 -0
- fmu_settings-0.0.1/src/fmu_settings.egg-info/top_level.txt +1 -0
- fmu_settings-0.0.1/tests/conftest.py +142 -0
- fmu_settings-0.0.1/tests/test_fmu_dir.py +317 -0
- fmu_settings-0.0.1/tests/test_init.py +163 -0
- fmu_settings-0.0.1/tests/test_resources/test_project_config.py +293 -0
- fmu_settings-0.0.1/tests/test_resources/test_resource_managers.py +106 -0
- fmu_settings-0.0.1/tests/test_resources/test_user_config.py +77 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Resolves #issue
|
|
2
|
+
|
|
3
|
+
Briefly describe changes here, e.g. "Added a precise description about the
|
|
4
|
+
changes made to the code, and what the PR is solving."
|
|
5
|
+
|
|
6
|
+
## Checklist
|
|
7
|
+
|
|
8
|
+
- [ ] Tests added (if not, comment why)
|
|
9
|
+
- [ ] Test coverage equal or up from main (run pytest with `--cov=src/ --cov-report term-missing`)
|
|
10
|
+
- [ ] If not squash merging, every commit passes tests
|
|
11
|
+
- [ ] Appropriate [commit prefix](https://upgraded-funicular-eywe4gy.pages.github.io/developing/#commit-prefixes) and precise commit message used
|
|
12
|
+
- [ ] All debug prints and unnecessary comments removed
|
|
13
|
+
- [ ] Docstrings are correct and updated
|
|
14
|
+
- [ ] Documentation is updated, if necessary
|
|
15
|
+
- [ ] Latest main rebased/merged into branch
|
|
16
|
+
- [ ] Added comments on this PR where appropriate to help reviewers
|
|
17
|
+
- [ ] Moved issue status on project board
|
|
18
|
+
- [ ] Checked the boxes in this checklist ✅
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
name: ci
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
release:
|
|
11
|
+
types:
|
|
12
|
+
- published
|
|
13
|
+
schedule:
|
|
14
|
+
# Run nightly to check that tests are working with latest dependencies
|
|
15
|
+
- cron: "0 0 * * *"
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
check:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
strategy:
|
|
21
|
+
matrix:
|
|
22
|
+
python-version: ["3.11", "3.12"]
|
|
23
|
+
|
|
24
|
+
steps:
|
|
25
|
+
- name: Checkout commit locally
|
|
26
|
+
uses: actions/checkout@v4
|
|
27
|
+
with:
|
|
28
|
+
fetch-depth: 0
|
|
29
|
+
|
|
30
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
31
|
+
uses: actions/setup-python@v5
|
|
32
|
+
with:
|
|
33
|
+
python-version: ${{ matrix.python-version }}
|
|
34
|
+
|
|
35
|
+
- name: Install with dependencies
|
|
36
|
+
if: ${{ always() }}
|
|
37
|
+
run: |
|
|
38
|
+
pip install -U pip
|
|
39
|
+
pip install -e ".[dev]"
|
|
40
|
+
|
|
41
|
+
- name: List all installed packages
|
|
42
|
+
run: pip freeze
|
|
43
|
+
|
|
44
|
+
- name: Ruff check
|
|
45
|
+
if: ${{ always() }}
|
|
46
|
+
run: ruff check
|
|
47
|
+
|
|
48
|
+
- name: Ruff format
|
|
49
|
+
if: ${{ always() }}
|
|
50
|
+
run: ruff format --check
|
|
51
|
+
|
|
52
|
+
- name: Check typing with mypy
|
|
53
|
+
if: ${{ always() }}
|
|
54
|
+
run: mypy src tests
|
|
55
|
+
|
|
56
|
+
- name: Run tests
|
|
57
|
+
if: ${{ always() }}
|
|
58
|
+
run: pytest -n auto tests --cov=src/ --cov-report term-missing
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: CodeQL
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, "version-*"]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main, "version-*"]
|
|
8
|
+
schedule:
|
|
9
|
+
- cron: "0 0 * * *"
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
analyze:
|
|
13
|
+
name: Analyze
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
permissions:
|
|
16
|
+
security-events: write
|
|
17
|
+
packages: read
|
|
18
|
+
actions: read
|
|
19
|
+
contents: read
|
|
20
|
+
|
|
21
|
+
strategy:
|
|
22
|
+
fail-fast: false
|
|
23
|
+
matrix:
|
|
24
|
+
include:
|
|
25
|
+
- language: actions
|
|
26
|
+
build-mode: none
|
|
27
|
+
- language: python
|
|
28
|
+
build-mode: none
|
|
29
|
+
|
|
30
|
+
steps:
|
|
31
|
+
- name: Checkout repository
|
|
32
|
+
uses: actions/checkout@v4
|
|
33
|
+
|
|
34
|
+
- name: Initialize CodeQL
|
|
35
|
+
uses: github/codeql-action/init@v3
|
|
36
|
+
with:
|
|
37
|
+
languages: ${{ matrix.language }}
|
|
38
|
+
build-mode: ${{ matrix.build-mode }}
|
|
39
|
+
|
|
40
|
+
- name: Perform CodeQL Analysis
|
|
41
|
+
uses: github/codeql-action/analyze@v3
|
|
42
|
+
with:
|
|
43
|
+
category: "/language:${{matrix.language}}"
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
pull-requests: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
pypi-publish:
|
|
13
|
+
name: Upload release to PyPI
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
environment:
|
|
16
|
+
name: pypi
|
|
17
|
+
url: https://pypi.org/p/fmu-settings
|
|
18
|
+
permissions:
|
|
19
|
+
id-token: write
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- name: Checkout
|
|
23
|
+
uses: actions/checkout@v4
|
|
24
|
+
with:
|
|
25
|
+
fetch-depth: 0
|
|
26
|
+
|
|
27
|
+
- name: Set up Python 3.12
|
|
28
|
+
uses: actions/setup-python@v5
|
|
29
|
+
with:
|
|
30
|
+
python-version: 3.12
|
|
31
|
+
|
|
32
|
+
- name: Install build dependencies
|
|
33
|
+
run: |
|
|
34
|
+
pip install -U pip
|
|
35
|
+
pip install build
|
|
36
|
+
|
|
37
|
+
- name: Build distributions
|
|
38
|
+
run: python -m build
|
|
39
|
+
|
|
40
|
+
- name: Publish package distributions to PyPI
|
|
41
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# Distribution / packaging
|
|
7
|
+
.Python
|
|
8
|
+
build/
|
|
9
|
+
develop-eggs/
|
|
10
|
+
dist/
|
|
11
|
+
downloads/
|
|
12
|
+
eggs/
|
|
13
|
+
.eggs/
|
|
14
|
+
lib/
|
|
15
|
+
lib64/
|
|
16
|
+
parts/
|
|
17
|
+
sdist/
|
|
18
|
+
var/
|
|
19
|
+
wheels/
|
|
20
|
+
pip-wheel-metadata/
|
|
21
|
+
share/python-wheels/
|
|
22
|
+
*.egg-info/
|
|
23
|
+
.installed.cfg
|
|
24
|
+
*.egg
|
|
25
|
+
MANIFEST
|
|
26
|
+
|
|
27
|
+
# PyInstaller
|
|
28
|
+
# Usually these files are written by a python script from a template
|
|
29
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
30
|
+
*.manifest
|
|
31
|
+
*.spec
|
|
32
|
+
|
|
33
|
+
# Installer logs
|
|
34
|
+
pip-log.txt
|
|
35
|
+
pip-delete-this-directory.txt
|
|
36
|
+
|
|
37
|
+
# Unit test / coverage reports
|
|
38
|
+
htmlcov/
|
|
39
|
+
.tox/
|
|
40
|
+
.nox/
|
|
41
|
+
.coverage
|
|
42
|
+
.coverage.*
|
|
43
|
+
.cache
|
|
44
|
+
nosetests.xml
|
|
45
|
+
coverage.xml
|
|
46
|
+
*.cover
|
|
47
|
+
*.py,cover
|
|
48
|
+
.hypothesis/
|
|
49
|
+
.pytest_cache/
|
|
50
|
+
|
|
51
|
+
# Sphinx documentation
|
|
52
|
+
docs/_build/
|
|
53
|
+
|
|
54
|
+
# PyBuilder
|
|
55
|
+
target/
|
|
56
|
+
|
|
57
|
+
# Jupyter Notebook
|
|
58
|
+
.ipynb_checkpoints
|
|
59
|
+
|
|
60
|
+
# IPython
|
|
61
|
+
profile_default/
|
|
62
|
+
ipython_config.py
|
|
63
|
+
|
|
64
|
+
# pyenv
|
|
65
|
+
.python-version
|
|
66
|
+
|
|
67
|
+
# pipenv
|
|
68
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
69
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
70
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
71
|
+
# install all needed dependencies.
|
|
72
|
+
#Pipfile.lock
|
|
73
|
+
|
|
74
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
75
|
+
__pypackages__/
|
|
76
|
+
|
|
77
|
+
# Environments
|
|
78
|
+
.env
|
|
79
|
+
.venv
|
|
80
|
+
env/
|
|
81
|
+
venv/
|
|
82
|
+
ENV/
|
|
83
|
+
env.bak/
|
|
84
|
+
venv.bak/
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
# Rope project settings
|
|
88
|
+
.ropeproject
|
|
89
|
+
|
|
90
|
+
# mkdocs documentation
|
|
91
|
+
/site
|
|
92
|
+
|
|
93
|
+
# vscode
|
|
94
|
+
.vscode/
|
|
95
|
+
|
|
96
|
+
# setuptools_scm version
|
|
97
|
+
_version.py
|
|
98
|
+
.mypy_cache/
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
This document contains information for contributing to this project.
|
|
4
|
+
All contributions are welcome!
|
|
5
|
+
|
|
6
|
+
## Developing
|
|
7
|
+
|
|
8
|
+
Clone and install into a virtual environment.
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
git clone git@github.com:equinor/fmu-settings.git
|
|
12
|
+
cd fmu-settings
|
|
13
|
+
# Create or source virtual/Komodo env
|
|
14
|
+
pip install -U pip
|
|
15
|
+
pip install -e ".[dev]"
|
|
16
|
+
# Make a feature branch for your changes
|
|
17
|
+
git checkout -b some-feature-branch
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Run the tests with
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
pytest -n auto tests
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Ensure your changes will pass the various linters before making a pull
|
|
27
|
+
request. It is expected that all code will be typed and validated with
|
|
28
|
+
mypy.
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
ruff check
|
|
32
|
+
ruff format --check
|
|
33
|
+
mypy src tests
|
|
34
|
+
```
|