Coder Social home page Coder Social logo

marcoalopez / grainsizetools Goto Github PK

View Code? Open in Web Editor NEW
66.0 14.0 23.0 21.37 MB

A Python script for estimating grain size and differential stress via piezometers

Home Page: http://marcoalopez.github.io/GrainSizeTools

License: Other

Python 97.21% TeX 2.79%
grain-size saltykov-method mylonites dynamic-recrystallization paleopiezometer recrystallization paleowattmeter grain-size-distribution grain-size-fraction grainsizetools-script

grainsizetools's People

Contributors

jsta avatar marcoalopez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

grainsizetools's Issues

JOSS review: packaging and organization

This is related to the installation (issue #7), and should be addressed before then. For python packaging, it is standard install the module as a single module and import packages from there (rather than individually installing each of the python scripts). e.g.

import grain_size_tools as gst
gst.extract_column()

This way there is less chance of name clash, and it is pretty clear what you are importing when.

I will start a pull request to give a few pointers

JOSS review: applying the Apache 2.0 license

The text in the License is the entire, all that needs to be included is the portion about the application of the license (see: https://opensource.org/licenses/Apache-2.0):

   Copyright [yyyy] [name of copyright owner]

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

where the [yyyy] is replaced by the year and [name of copyright owner] is replaced with the name of the copyright owners. Make sure you don't leave the brackets.

calc_diameters function not found

The docs direct new users to a function called calc_diameters which does not appear to exist:

NameError: name 'calc_diameters' is not defined

Dependency list

This issue is related to the ongoing JOSS review of this package. One of the criteria is:

Installation instructions: Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.

However, I found myself struggling to easily find the dependency list to get started. What do you think about adding a requirements.txt or environment.yml file?

organization and packaging

This is related to the JOSS pre-review issue: openjournals/joss-reviews#811

The package layout does not follow standard python packaging practices (see for example: https://packaging.python.org/tutorials/packaging-projects/).

/grain_size_tools  # repo
   /grain_size_tools  # python module
       __init__.py  # contains import to be brought in when the user runs import grain_size_tools
       tools.py
       piezometers.py
       ...

This would allow more flexible use - for example if a user wants to install your package through pypi and import it into a Jupyter notebook as a part of their workflow.

The main items to be addressed are:

Please let me know if there are more resources I can send along that would be helpful!

JOSS review: testing

I don't see a clear indication of automated tests or manual steps described so that the function of the software can be verified. Are there manual tests that can be run to check that the software is performing as expected?

For example, if there are simple examples where you know what the output of a function should be, then you can test that. The pytest module is a good resource to check out for setting up testing: https://docs.pytest.org/en/latest/

In addition, you can use a continuous integration service that will run the tests every time you update the code (or if a contributor suggests an update). This is a really helpful thing to do if you would like to invite others to participate in the development and maintenance of the code base. For example using TravisCI, there are GitHub instructions here: https://help.github.com/enterprise/2.14/admin/guides/developer-workflow/continuous-integration-using-travis-ci/

JOSS review: jupyter notebooks

Right now, the paths in the Jupyter notebooks are specific to your machine, it would be preferable to use relative paths so that when a user downloads them, they run out-of-the-box. e.g.

%run C:/Users/Marco/Documents/GitHub/GrainSizeTools/grain_size_tools/GrainSizeTools_script.py

could instead be

%run ../grain_size_tools/GrainSizeTools_script.py

and similarly for the files included in the notebook.

'../data_set.txt'

error when estimating ECD

dataset['diameters'] = 2 * np.sqrt(dataset['Area'] / np.pi)
Traceback (most recent call last):

File "C:\Users\HP\anaconda3\lib\site-packages\pandas\core\indexes\base.py", line 2895, in get_loc
return self._engine.get_loc(casted_key)

File "pandas_libs\index.pyx", line 70, in pandas._libs.index.IndexEngine.get_loc

File "pandas_libs\index.pyx", line 101, in pandas._libs.index.IndexEngine.get_loc

File "pandas_libs\hashtable_class_helper.pxi", line 1675, in pandas._libs.hashtable.PyObjectHashTable.get_item

File "pandas_libs\hashtable_class_helper.pxi", line 1683, in pandas._libs.hashtable.PyObjectHashTable.get_item

KeyError: 'Area'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File "", line 1, in
dataset['diameters'] = 2 * np.sqrt(dataset['Area'] / np.pi)

File "C:\Users\HP\anaconda3\lib\site-packages\pandas\core\frame.py", line 2902, in getitem
indexer = self.columns.get_loc(key)

File "C:\Users\HP\anaconda3\lib\site-packages\pandas\core\indexes\base.py", line 2897, in get_loc
raise KeyError(key) from err

KeyError: 'Area'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.