Transforms measurements from drillcores.
Supports alpha, beta and gamma measurements.
Supports .csv and .xlsx files.
Supports adding the column names of your data files to a custom-built config.ini file for each user.
TODO: Convention support
Currently supported convention explanation found in Documentation and Help
Documentation and Help: https://drillcore-transformations.readthedocs.io.
To run pytest in currently installed environment:
poetry run pytest
To run full extensive test suite:
poetry run doit # Add -n <your-cpu-core-count> to execute tasks in parallel # E.g. poetry run doit -n 8 -v 0 # -v 0 is added to limit verbosity to mininum (optional) # doit makes sure tasks are run in the correct order # E.g. if a task uses a requirements.txt file that other task produces # the producer is run first even with parallel execution
Formatting and linting
Formatting & linting:
poetry run doit pre_commit poetry run doit lint
Docs can be built locally to test that
ReadTheDocs can also build
poetry run doit docs
To list all available commands from
poetry run doit list
Development dependencies for
Used to handle Python package dependencies.
# Use poetry run to execute poetry installed cli tools such as invoke, # nox and pytest. poetry run <cmd>
A general task executor that is a replacement for a
Understands task dependencies and can run tasks in parallel even while running them in the order determined from dependencies between tasks. E.g. requirements.txt is a requirement for running tests and therefore the task creating requirements.txt will always run before the test task.
# Tasks are defined in dodo.py # To list doit tasks from command line poetry run doit list # To run all tasks in parallel (recommended before pushing and/or # committing) # 8 is the number of cpu cores, change as wanted # -v 0 sets verbosity to very low. (Errors will always still be printed.) poetry run doit -n 8 -v 0
noxis a replacement for
tox. Both are made to create reproducible Python environments for testing, making docs locally, etc.
# To list available nox sessions # Sessions are defined in noxfile.py poetry run nox --list
copieris a project templater. Many Python projects follow a similar framework for testing, creating documentations and overall placement of files and configuration.
copierallows creating a template project (e.g. https://github.com/nialov/nialov-py-template) which can be firstly cloned as the framework for your own package and secondly to pull updates from the template to your already started project.
# To pull copier update from github/nialov/nialov-py-template poetry run copier update
pytestis a Python test runner. It is used to run defined tests to check that the package executes as expected. The defined tests in
./testscontain many regression tests (done with
pytest-regressions) that make it almost impossible to add features to
drillcore_transformationsthat changes the results of functions and methods.
# To run tests implemented in ./tests directory and as doctests # within project itself: poetry run pytest
# To check coverage of tests # (Implemented as nox session!) poetry run nox --session test_pip
Creates documentation from files in
# To create documentation # (Implemented as nox session!) poetry run nox --session docs
Big thanks to all maintainers of the above packages!
PhD Jussi Mattila for tips, code snippets and sample materials.
Authors of Orientation uncertainty goes bananas for great article and complementary excel-file.
Copyright © 2020, Nikolas Ovaskainen.
References and Credits
Big thanks to PhD Jussi Mattila for his Brittle Structures course at the University of Turku, code snippets and tips for the development of this module and for handing over sample materials for testing.