Giter Site home page Giter Site logo

smtg-bham / thermoparser Goto Github PK

View Code? Open in Web Editor NEW
37.0 9.0 13.0 192.43 MB

A tool for streamlining data analysis and visualisation for thermoelectrics and charge carrier transport in computational materials science.

Home Page: https://smtg-bham.github.io/ThermoParser/

License: GNU Affero General Public License v3.0

Python 100.00%
thermoelectric chemistry physics materials science materials-science plotting tp matplotlib python

thermoparser's Introduction

The ThermoParser logo, which looks like "TP"

________

///// \\ ________/________________________________________________________________ | | :| / | | ___ ___/ ___ ___ | | | | / | | | | / :| / | | / / | / | | | | | | | | | | | ___ _____ | | | | ___ | | | | ___/:| ___ ___ | :3.1.4|____________________________________:_______________________/____________:_____/

The build status badge

The tests status badge

The docs status badge

The JOSS publication badge

ThermoParser is a toolkit used to simplify the analysis of data produced by specialist materials science codes, centred around thermoelectrics, but also useful for anything pertaining to electronic and/ or phononic transport. ThermoParser is a Python library which contains functions for data retrieval, manipulation and plotting, which can be easily used with a little Python knowlege to generate a wide array of high-quality plots in only a few lines of code. ThermoParser also contains a suite of command-line tools which can retrieve specific data, save derived properties and plot graphs in a single command.

Click on the image to go to the gallery!

A phonon dispersion where widened bands show phonon scattering

Installation

ThermoParser can easily be installed with git and pip:

git clone https://github.com/smtg-bham/ThermoParser.git
cd ThermoParser
pip install .

After installing, you may want to copy ThermoParser/tprc.yaml to ~/.config/tprc.yaml, if you want to set your own default axis labels, unit conversions, default style sheets (two are provided), other aesthetic alterations and more!

Mac

If installing on an m1 mac, you can't currently pip install h5py, so a longer process is required:

  1. Install brew
  2. Install hdf5 with brew
  3. python3 -m pip install cython numpy
  4. brew info hdf5 to retrieve the path to your hdf5 install
  5. HDF5_DIR=YOUR_HDF5_PATH --no-build-isolation h5py
  6. git clone https://github.com/smtg-bham/ThermoParser.git
  7. cd ThermoParser
  8. pip install --user -e .

Using conda may circumvent this process.

Command Line Interface (CLI)

ThermoParser uses click, which has an easily navigable structure from the command-line, detailed in the tutorials. The most frequently useful commands are included in the CLI for maximum ease, including the tp get functions, which verbosely retrieve data from files which are normally tiresome and error-prone to navigate; and most of the simplest plot-types available through the Python interface.

Python Interface

ThermoParser is designed to have four main stages:

  1. Axes:

    Pick an axis layout from tp.axes.

  2. Load:

    Use the functions is tp.data.load to load the relevant data.

  3. Add:

    Use functions in tp.plot modules to add graphs to the axes.

  4. Save:

    Use plt.savefig or equivalent to produce the figure.

As ThermoParser is dependent on matplotlib, each stage can be substituted with bespoke code, e.g. using matplotlib.pyplot.subplots or matplotlib.axes.Axes.scatter. These can still be supplemented with ThermoParser helper functions, such as default labels which the user can set in tp.settings, colourmap generators in tp.plot.colour or legend helpers such as tp.axes.legend.alphabetise.

The best way to get a feel for ThermoParser is to see it in action: Take a look at our examples and tutorials. Currently supported codes are:

Current plotting modes are split into four areas.

  • tp.plot.phonons contains plots along a high-symmetry path, including phonon dispersions and plots which project other quantities onto these paths in various ways.
  • tp.plot.frequency plots frequency on the x-axis, including density of states (DoS), cumulative kappa, "waterfall" and density plots. Each function has a main argument, which can be useful when plotting multiple quantities on the same set of axes; and an invert argument, which swaps the x and y axes to let you plot DoS-style next to a tp.plot.phonons plot.
  • tp.plot.mfp contains a cumulative kappa against mean free path plot.
  • tp.plot.heatmap contains a heatmap plotter, and wrappers which format appropriately for ZT against temperature and doping concentration; and one which plots the lattice thermal conductivity required to reach a target ZT, again against temperature and doping.

A set of example scripts is provided in the tp/examples folder and in our online examples, and there is documentation.

Contributing

We welcome any contributions, whether they be a feature request or a new piece of code (or anything else). Adding options is inteded to be straightforward; the modularity of the code means that each step is mostly independent of the others.

Bugs and feature requests can be submitted to the issue tracker, while contributions can be made using the fork and pull approach. Contributions should include comprehensive docstrings, and where appropriate examples, further documentation and tests are greatly appreciated. Documentation uses the sphinx package, and can be built from the docs directory with sphinx-build -b html src/ .. In order to build the docs, download the extra dependencies with, e.g., pip install .[docs] from the ThermoParser directory.

Testing

Tests use the unittest package, and can be run from the test directory with python3 -m unittest. If you don't already have unittest installed, it can be directly with pip install unitest or, e.g., pip install .[tests] from the ThermoParser directory.

Contributors

Many thanks to all those who contributed code or ideas to ThermoParser! Roughly chronologically, they are so far:

  • Kieran B. Spooner
  • Maud Einhorn
  • David O. Scanlon
  • Daniel W. Davies
  • Bonan Zhu
  • Sean R. Kavanagh
  • Warda Rahim
  • Katarina Brlec
  • Joe Willis

Thanks also to the JOSS reviewers, Evan Walter Clarke Spotte-Smith, Enric Tomás Grau-Luque, and Francesco Nattino; and the editor Mojtaba Barzegari. An unintimidating and productive review process, which I would recommend if the opportunity arises!

License

ThermoParser is licensed under the GNU Affero General Public License v3 (AGPLv3).

Requirements

ThermoParser uses the following open-source packages:

thermoparser's People

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

thermoparser's Issues

[joss review] Gallery

In the gallery I have found few examples that do not run as they are provided. Some examples:

  • For heatmaps, but also others, the kappa-mxxxx.hdf5 is not provided, and only when checking out the Python script in the tutorial I realised how to get these files.
  • Some of the commands in the gallery main page do not follow the correct syntax required by click to provide multiple values, e.g. : tp plot phonons band.yaml -c '#ff8000' -d projected_dos.dat --doscolour '#ffff00' '#00ffff' (should instead ends with: --doscolour '#ffff00' --doscolour '#00ffff')
  • Also, when fixing the problem above, the projected_dos.dat seems to include contributions for imaginary frequencies:
    tp-phonons
  • The command to run the ZTdiff (last CLI command on this page)seems to be missing some files? tp plot ztdiff ../data/zno/transport_75x75x75.json ../data/zno/boltztrap.hdf5 -k ../data/zno/kappa-m404021.hdf5 ../data/zno/kappa-m404021.hdf5 -l MRTA -l CRTA

JOSS review issue

Planning the upload to GitHub

Step 1: Planning the move

Uploading your project to GitHub gives you the feature-rich tools and collaboration needed to elevate your project to the next level. Not to mention, it's also pretty exciting. If you're doing this for the first time, you have a few options when uploading your project to GitHub. This course will guide you through the necessary steps to upload a local project to be hosted on GitHub.

I know some people like to get straight to the point while others like more information. For those who like more information, be sure to check out the drop-downs like this one ⬇️

Why move to GitHub?

Why move to GitHub?

You may be wondering what this GitHub thing is all about and why you should use it. If this sounds like you, here are a few reasons to make GitHub your project's new home:

  • Version control — Everything on GitHub is stored in Git, the best version control system around. Version control allows you to experiment and make mistakes in code without messing up your final product.
  • Keep your code in one place — Whether you work on multiple computers or just want to get some important projects off your computer, GitHub is the perfect place to store your projects online.
  • Collaboration — Once your code is on GitHub, you can invite others to work on your code with you, share it with the world, or send a link to a friend to help you debug a problem.

Where is your project?

Most users find it is easiest to upload a project that is already located on their local machine, so the goal of this first step is to make a local copy of the repository. First, let's make sure this course is going to give you the right steps:

Is your project on another version control system, such as Mercurial, Subversion, or another Git platform?

Moving your project from another version control system

If you are moving your project from another version control system, the steps are a bit different that uploading your project from your local machine. Because of this, we have a dedicated course for migrating your project to GitHub.

If you are moving your project from Mercurial, Subversion, or another Git platform, join the Migrating your project to GitHub course to migrate your project to GitHub.


Is your project using version control?

Is your project using version control

If you aren't sure whether or not your code is under version control, it probably isn't. However, here are a few tests you can apply to know for certain:

  • Can you view a history of the changes you have made?
  • Can you easily roll back to a previous version of your project?
  • Are you required to provide "messages" or "commits" when you make changes?

If none of these are true, your project isn't using version control.


⌨️ Activity: Exporting your project

Choose the drop-down below that best fits your current situation or for a printable version of the steps in this course, check out the Quick Reference Guide.

Your project is already on your local machine

Your project is already on your local machine

✨ Terrific! @kbspooner since you already have the project locally, you are almost ready to move it to GitHub.

To confirm: You have a project directory on your computer and you want to save it on GitHub.

  • If this is correct, close this issue to signal you are finished with this step. I will open a new issue to show you how to optimize your repository for Git operations.

  • If this is incorrect, please use the next drop-down to learn how to export your project to your local machine or join the Migrating your project to GitHub course to migrate your project to GitHub.


Your project is on a non-version controlled site, such as CodePen or Glitch

General instructions

There are many platforms that allow users to create and store projects. We can't cover them all, but we will do our best to cover the more common examples. First, let's cover general instructions:

  • Export your project using the tools available on the current site. This will usually happen via a .zip, or some other compressed format, downloaded directly to your local machine
  • Save the .zip file
  • Extract the .zip file

Now let's talk about specific platforms:

Exporting from CodePen

From the main page of your CodePen project:

  1. Click the Export button in the bottom right corner
  2. Save the exported .zip file in your local directory
  3. Extract the .zip file

Exporting from Glitch

From your Glitch project page:

  1. Click the dropdown next to your project name in the top right corner
  2. Select Advanced Options
  3. Select Download Project
  4. Save the exported file in your local directory
  5. Extract the file
  6. Rename the app folder as desired

Ready to move on?

Close this issue to signal you are finished with this step. I will open a new issue to show you how to optimize your repository for Git operations. 🎉


Watch below for my response

🤖 I'm waiting for you to close the issue before moving on.

Sometimes I respond too fast for the page to update! If you perform an expected action and don't see a response from me, wait a few seconds and refresh the page for your next steps.

PDOS is not complete

Dear developers,

Thank you for the great code. I have been using it for past few days - and stumbled upon something curious.

For my test case a certain section of PDOS is missing:

As you will see in the figure below the DoS around 13 THz is missing. When I manually plot DoS it seems fine.
Could this be a bug?

Man thanks for your time

best,
Alex

Screenshot from 2022-12-08 21-47-30

Public or private repository?

Step 4: Private or Public?

Right now, your repository is set to public.

You can change the visibility of a repository to Private or Public at any time in your repository's Settings tab, but there are some things you should know.

Private Repositories

If your repository is private, the only people who can see your code are you and the collaborators 📖 you've invited.

There is a small charge associated with Private repositories, but if your project has sensitive information, it's worth it.

Public Repositories

In public repositories, anybody can see your code. Millions of open source repositories on GitHub are public, too!

Licenses, code of conduct, and other files are important when you create a public repository. There are many benefits to this, but it's also a large responsibility. Keep in mind that once a repository is public and open source, there are certain implications about keeping it public, depending on the license chosen.

It's important to note that public does not equal open source! The license associated with code determines whether or not it is open source.


Watch below for my response!

🤖 I'm waiting for you to close this issue.

json not needed in setup.py

To Reproduce
pip install -e . currently gives:

ERROR: Could not find a version that satisfies the requirement json (from ThermoPlotter==0.2.0) (from versions: none)
ERROR: No matching distribution found for json (from ThermoPlotter==0.2.0)

Probable solution
json is a built-in package in Python, so it can be removed from the list of requirements in setup.py.

[joss review] Tutorial X

While the title of the tutorial mentions VASP, the content seems to be on rather diverse topics and not necessarily related to VASP. Can a more suitable section be identified for such topics?

JOSS review issue

[joss review] Tutorial 2

Running the tutorial 2 Python script on my system (OS X, intel processor) leads to the error below.

Error traceback
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/miniconda3/envs/ThermoParser/lib/python3.11/multiprocessing/spawn.py", line 122, in spawn_main
  exitcode = _main(fd, parent_sentinel)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/envs/ThermoParser/lib/python3.11/multiprocessing/spawn.py", line 131, in _main
  prepare(preparation_data)
File "/opt/miniconda3/envs/ThermoParser/lib/python3.11/multiprocessing/spawn.py", line 246, in prepare
  _fixup_main_from_path(data['init_main_from_path'])
File "/opt/miniconda3/envs/ThermoParser/lib/python3.11/multiprocessing/spawn.py", line 297, in _fixup_main_from_path
  main_content = [runpy.run](https://github.com/SMTG-Bham/ThermoParser/issues/runpy.run)_path(main_path,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen runpy>", line 291, in run_path
File "<frozen runpy>", line 98, in _run_module_code
File "<frozen runpy>", line 88, in _run_code
File "/Users/fnattino/tmp/ThermoParser/ThermoParser/examples/data/zno/t02.py", line 25, in <module>
  tp.plot.phonons.add_wideband(ax, kdata, pdata, temperature=temperature,
File "/opt/miniconda3/envs/ThermoParser/lib/python3.11/site-packages/tp/plot/phonons.py", line 1193, in add_wideband
  with Pool(processes=workers) as pool:
       ^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/envs/ThermoParser/lib/python3.11/multiprocessing/context.py", line 119, in Pool
  return Pool(processes, initializer, initargs, maxtasksperchild,
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/envs/ThermoParser/lib/python3.11/multiprocessing/pool.py", line 215, in __init__
  self._repopulate_pool()
File "/opt/miniconda3/envs/ThermoParser/lib/python3.11/multiprocessing/pool.py", line 306, in _repopulate_pool
  return self._repopulate_pool_static(self._ctx, self.Process,
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/envs/ThermoParser/lib/python3.11/multiprocessing/pool.py", line 329, in _repopulate_pool_static
  w.start()
File "/opt/miniconda3/envs/ThermoParser/lib/python3.11/multiprocessing/process.py", line 121, in start
  self._popen = self._Popen(self)
                ^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/envs/ThermoParser/lib/python3.11/multiprocessing/context.py", line 288, in _Popen
  return Popen(process_obj)
         ^^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/envs/ThermoParser/lib/python3.11/multiprocessing/popen_spawn_[posix.py](https://github.com/SMTG-Bham/ThermoParser/issues/posix.py)", line 32, in __init__
  super().__init__(process_obj)
File "/opt/miniconda3/envs/ThermoParser/lib/python3.11/multiprocessing/popen_[fork.py](https://github.com/SMTG-Bham/ThermoParser/issues/fork.py)", line 19, in __init__
  self._launch(process_obj)
File "/opt/miniconda3/envs/ThermoParser/lib/python3.11/multiprocessing/popen_spawn_[posix.py](https://github.com/SMTG-Bham/ThermoParser/issues/posix.py)", line 42, in _launch
  prep_data = spawn.get_preparation_data(process_obj._name)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/envs/ThermoParser/lib/python3.11/multiprocessing/spawn.py", line 164, in get_preparation_data
  _check_not_importing_main()
File "/opt/miniconda3/envs/ThermoParser/lib/python3.11/multiprocessing/spawn.py", line 140, in _check_not_importing_main
  raise RuntimeError('''
RuntimeError: 
      An attempt has been made to start a new process before the
      current process has finished its bootstrapping phase.

      This probably means that you are not using fork to start your
      child processes and you have forgotten to use the proper idiom
      in the main module:

          if __name__ == '__main__':
              freeze_support()
              ...

      The "freeze_support()" line can be omitted if the program
      is not going to be frozen to produce an executable.

      To fix this issue, refer to the "Safe importing of main module"
      section in https://docs.python.org/3/library/multiprocessing.html

I think the error originates from the default settings of the Python multiprocessing library on OS X (see e.g. here. This can be solved by fixing the Python script in the following way:

Fixed script
import tp

# Variables
pfile = 'band.yaml'
kfile = 'kappa-m404021.hdf5'
poscar = 'POSCAR'
temperature = 300

colour = ['#000000', '#ff0000']

def main():
    # Axes
    fig, ax, _ = tp.axes.large.one('dark_background')

    # Load
    kdata = tp.data.load.phono3py(kfile, quantities='wideband')
    pdata = tp.data.load.phonopy_dispersion(pfile)

    # Plot
    tp.plot.phonons.add_wideband(ax, kdata, pdata, temperature=temperature,
                             colour=colour, poscar=poscar)

    # Save
    fig.savefig('tutorial-02.png')


if __name__ == "__main__":
    main()

Maybe worth considering the fix (and to mention that the loading function actually runs multiple processes)?

JOSS review issue

Preparing the project for Git

Step 2: Prepare the project

Working with Binary files

In general, there are two types of files: text files and binary files.

Text files, like most code files, are easily tracked with Git and are very lightweight.

However, binary files like spreadsheets, presentations with slides, and videos don't work well with Git. If your repository already has some of these files, it's best to have a plan in place before you enable Git version control.

You could choose to remove the binary files, or use another tool like git-lfs (Git Large File Storage). We won't get into detail on how to set up git-lfs in this course, but we will talk about .gitignore files next, which are key to protecting your code from becoming bloated with binaries.

Add a .gitignore

As we convert your project to a Git repository, it should only include the source code necessary to build or compile your project. In addition to avoiding binaries as we discussed above, you will also want to keep build artifacts out of your version controlled code.

To do this, you will create a file in your current project named .gitignore. Git will use the .gitignore to determine which files and directories should not be tracked under version control. The .gitignore file is stored in your repository in order to share the ignore rules with any other users that interact with the repository.

Since the files to be ignored are dependent on the language you are using, the open source community has contributed some great templates for .gitignore files in the github/gitignore repository.

⌨️ Activity: Prepare your repository

  1. Remove any binary files from your repository.
  2. In your local environment, create a .gitignore file. You can use a template or create your own.

When you are finished, close this issue. I will open a new issue with the next steps. 🎉


Watch below for my response

🤖 I'm waiting for you to close this issue before moving on.

[joss review] Tutorial 4

In Tutorial-04, what does the color of the dots in the waterfall plot represent? Is it contribution to the thermal conductivity? If this is the case, should one add a colorbar as in the similar gallery plot? I have tried to do so using tp.axes.small.two_h_colourbars(), but it produced an identical plot (without colorbar).

JOSS review issue

[joss review] Dependencies for building the documentation

In order to build the documentation, the package sphinx_rtd_theme is required in addition to sphinx, but not mentioned anywhere.

Also, sphinx is listed as part of the requirements.txt file, but you might consider creating instead a dependency set dedicated to building the documentation. See e.g. the setuptools extras_require field.

For instance, you could add to setup.py:

setup(
  ...
  extras_require={
    "docs"=["sphinx", "sphinx_rtd_theme"]
  }
  ...
)

to be able to install docs-related dependencies using: pip install .[docs]

JOSS review issue

[joss review] JOSS manuscript

Just a couple of minor comments on the manuscript:

  • The link to the gallery is broken (line 77), it points to an old repository?
  • In the ThermoParser section, you mention that the code lodes data into a common format with a meta directory, that includes metadata. But what is this general format and where is this directory created?

JOSS review issue

[joss review] CI

I see a .travis.yml file listing an old Python version in the root of the repository and a Travis CI badge with a broken link in the README - is Travis still used to automatically run tests? Maybe switch to GitHub actions (which is available for free)?

JOSS review issue

A few parting words

Nice Work

celebrate

Congratulations @kbspooner, you've completed this course! 🎉

What went well

Before I say good-bye, I want to recap all the tasks you've accomplished. You:

  • Learned what to do with an empty repo on GitHub ✨
  • Created a .gitignore and removed bulky binaries
  • Used your favorite local tools to push existing code
  • Set your code up in a GitHub repository 🎆

What's Next?

Now that you've moved your Git repository to GitHub, managing your repository and adding collaborators are common next steps. Here are some recommended courses we think you might be interested in:

Community Starter Kit
Hosting a project on GitHub enables you to share your work with millions of other developers. This course will walk you through the different items you can add to your repository to welcome new contributors and make it easier for them to report issues, suggest new features, or potentially submit a pull request!

Create a release based workflow
Now that you have a repository on GitHub learn how to utilize a release workflow to create new releases for your project through an efficient development workflow.

There's so much more you can do with GitHub, and you have a solid start. Now...what will you learn next?


I won't respond to this issue, just close it when you are done!

Suggestions for improvements

Hi!
As discussed, here are some of the things that would in my humble opinion make tp much more user friendly.

Make docs slightly more easy to navigate, especially for more advanced users. In this I think it would be handy to:

  • explain how the modularity of the package works e.g. for plotting you first start with the axes, then what type of legend/setup you want then what is the property you will be plotting
  • add a section to the docs that actually has what all the args/kwargs do for each function and what is carried forward between different modules.
  • maybe add more guided examples that explain what is going on to a more naive audience

Maybe modify plotting a bit:

  • there is the issue with phonons plotting if you use it in jupyter lab/notebooks. The way mpl args are set up in tp irreversibly changes the user defaults if they use rc.params in their preamble rather than style sheets. This does not happen with the ZT heatmap plots.
  • any chance we could get four_large.square.colourbar() 🥺? I've not tested this extensively but in general making sure all axes work with all legend set ups and layouts would be very welcome. Or at least explaining what axes work with what layouts in docs would be fab.
  • fig, ax, add_legend = tp.axes.one.dos_small_legend() gives AttributeError: list object has no attribute legend if you try to add_legend() retroactively - I believe this may have already been fixed, but thought I'd mention it again. The same script works for one_large

I haven't really looked at what CLI can do in depth but I still have opinions:

  • it would be very cool if you could look up a ZT (or Seebeck, PF, conductivity, mobility) for a specific temperature / carrier concentration in CLI.
  • also, it might be handy to have the option to save the file containing the calculated ZT from command line, just do it doesn't have to be re-calculated which may take some time every time you want to re-plot the heatmap.

Hope you find this useful!

[joss review] how is the documentation built

As far as I understand the docs are published on GitHub pages without using Jekyll (I also see the .nojekyll file), but there is a Jekyll config file in docs/_config.yml?

Also, why the folder docs/src/_build is checked in the repository? The build documentation is all available in docs , correct?

JOSS review issue

[joss review] review from @enricgrau

Regarding this JOSS review

Overall, the library shows a clear motivation and solution, along with comprehensive documentation, examples, and tutorials. I’d support for publication in JOSS after addressing my comments and concerns herein.

Manuscript
The paper is well written and structured. It presents a clear motivation and solution with the library. The authors do a good job of describing the library, its structure, and its use. Here are some observations to improve the current state of the manuscript:

  1. The first sentence states that “thermoelectric materials could be an important renewable energy source to help slow the climate crisis”. Why? How? Examples of this? This feels like a random phrase without further context. However, I do not think it is necessary to include it in the manuscript as the identified problem is motivation and justification enough for the library. In other words, I suggest removing this line or developing a broader context on why and how these materials can help with the climate crisis.
  2. The authors claim the library has been used in the literature, however, explicit mention of the library is not present in the cited articles. There is mention of the library ThermoPlotter in Kavenagh (2021), Herring Rodriguez (2023), Brlec (2022), and Spooner (2021) which looks to be a previous version of ThermParser. Clarifying this in the manuscript would increase confidence in this claim. However, I did not find any mention in neither Spooner (2020) or Einhorn (2020). Even though I’m not specifically questioning the use of the library on those specific articles, I don’t think it corresponds to include them due to the lack of any explicit mention of it. Please correct me if there is any kind of mention of the library in said articles that I did not catch.
  3. I believe there is a typo at L.16: BoltzTrap(2), other mentions of the library are L.50: BoltzTraP, L.155: BoltzTraP…
  4. Phrasing could be better in L.95-97. Is the “;” a typo? Maybe a bullet point structure could improve the understanding of future directions of the library (if there are several)
  5. For Author Contribution I recommend using CRediT for a clearer and fair characterization of the authors’ contribution.

Documentation
Gallery

  • The Tutorials links are broken
  • Clicking in figures links to a broken URL
  • The reference is not in the correct format. It displays the bibtex entry rather than “1. Maradudin, ….”

Tutorials
It is great that you show both CLI and Python options and the thorough explanation of what each stage is doing and which lines they correspond to. Good job! However, I did have trouble running them. Here are some comments:

  • There is no context on the data. You should include what kind of data the tutorial is working with to better understand its application (e.g. Where does the data come from? How was it measured?)
  • Links in the titles are broken (in https://smtg-bham.github.io/ThermoParser/tutorials.html), but in the menu they work.
  • Tutorial-02: no file kappa-m404021.hdf5 is incldued
  • Tutorial-03: with CLI I get raise ValueError(f"{v!r} is not a valid value for {k}") ValueError: "'#f0901f'" is not a valid value for color. Python works.
  • Tutorial-04: <sub>3</sub> appears as text
  • Tutorial-04: file kappa-m363636.hddf5 not included
  • Tutorial-05: file kappa-m363636.hddf5 not included
  • The main purpose of the library is for visualization. However, the authors claim that it is also for “analyzing”. After reviewing the documentation this is not clear to me. It would be helpful to strengthen this claim by including an example where this is the main focus. I could be misunderstanding this however. Please comment on this.

Installation

  • Build badge shows “unknown”
  • The “gallery” link is broken
  • I tested for Windows and installation works.

Python Package

  • Some functions (for example tp.setup.vasp.gen_ibz) show the first line highlighted in gray in the docs.

Repository

  • What version are we working with? There is only 1 release (v1.0.0), but the title says 3.0.0 (?). It would be great to explicitly mention the current version available and also using more clear title names for future releases (v1.0.0 instead of “Launch day”).

Tests
Tests are good. They run smoothly with 98% and 89% coverage for calculate.py and settings.py, respectively. Good job.

Uploading your project

Step 3: Make the move

Having a project already stored locally enables you to move it to GitHub rather quickly. The following activity provides instructions to move your local project to GitHub using various tools. Select the tool you are most comfortable with and get importing 😄.

⌨️ Activity: Moving your local project

  1. In the Code tab of this repository, copy the URL shown under Quick Setup.
  2. Follow the instructions below based on what tool you'd like to use locally.
Using the command line

Using the command line

  1. In your command line, navigate to your project directory. Type git init to initialize the directory as a Git repository.
  2. Type git remote add origin https://github.com/kbspooner/github-upload.git
  3. Type git add .
  4. Type git commit -m "initializing repository"
  5. Type git push -u origin master to push the files you have locally to the remote on GitHub. (You may be asked to log in.)

Note: You can also use a password protected SSH key to connect to GitHub. See Connecting to Githug with SSH in our documentation to learn more.


Using GitHub Desktop

Using GitHub Desktop

  1. In GitHub Desktop, add a local repository by clicking File > Add a Local Repository, and then navigating to your local repository.
  2. Create your first commit by typing a summary commit message in the field provided and clicking Commit to master
  3. Add the remote by clicking Repository > Repository Settings... and pasting the URL from your repository on GitHub into the "Primary remote repository (origin)" field. Click Save.
  4. Click Publish in the top right corner to push your repository to GitHub.

Using Visual Studio Code

Using Visual Studio Code

  1. In Visual Studio Code, open the folder for your project.
  2. Click the icon on the left for Source Control.
  3. On the top of the Source Control panel, click the Git icon.
  4. If the files you see match the repository you want to create, click Initialize Repository.
  5. Next to the word CHANGES, click the symbol of the plus sign to stage all of the changes.
    • This is part of the two stage commit. You can use this staging function to create meaningful commits throughout the development process.
  6. In the box in the Source Control panel, type a commit message. Something like "initial commit - moving project" could work.
  7. Click the checkmark at the top of the Source Control panel.
  8. Open the integrated terminal found under View > Integrated Terminal.
  9. In your command line, type git remote add origin https://github.com/kbspooner/github-upload
  10. In the Source Control Panel, click the expandable three dots that open a menu of options.
  11. When asked if you'd like to publish the branch, click Okay.

Using Atom

Using Atom

  1. In Atom, open the folder for your project
  2. At the top of your screen, click Packages. Select GitHub, and then toggle the Git Tab from the drop-down menu.
  3. Select Create Repository within the Git tab on the right-hand size of your screen.
  4. Select Init to accept the default prompt of the pop up window
  5. In the Git tab, you can see that your files are ready for staging. It should be accounted for, but double check to make sure that none of your binaries or files that you listed in the .gitignore are listed in this dialog menu.
    - If they are, double check your .gitignore file to make sure they're included or remove them from your directory.
  6. Select Stage All
    - This is part of the two stage commit. You can use this staging function to create meaningful commits throughout the development process.
  7. In the box at the bottom of the Git panel, type a commit message. Something like "initial commit - moving project" could work.
  8. Select Commit
  9. Close Atom
  10. In your command line, navigate to your project directory.
  11. Type git remote add origin https://github.com/kbspooner/github-upload
  12. Return to Atom, and select the Up/Down arrow icon at the bottom of your Git Tab
  13. Click Push, above the noted dialog.
  14. Return to your repository, and note a successful push by finding your files on GitHub's code tab.

Using Eclipse

Using Eclipse

  1. In Eclipse, from the Eclipse Marketplace, install the eGit GitHub plugin.
  2. Open your existing project.
  3. Display the Git Repositories window by selecting Window > Show View > Other > Git > Git Repositories.
  4. Click the Create a Git Repository button on the Git Repositories pane.
  5. Make changes to your project and create a commit.
  6. Push the master branch.
  7. When asked for a remote, paste the URL you copied earlier.
  8. Click next, and enter the branch name.


Watch below for my response

🤖 Once you push your project to GitHub, I'll provide the next steps in your journey.

[joss review] Python API documentation

The Python Package section of the documentation is quite difficult to read. Could it be improved by improving structuring and/or formatting?

For instance, functions seems to be listed twice in each module, the first time of which without any description/information (see e.g. https://smtg-bham.github.io/ThermoParser/tp.axes.html#functions). Also, some descriptions are quite "uninformative" (e.g. the top one: https://smtg-bham.github.io/ThermoParser/tp.html#tp-package), maybe these could be removed.

Also, I would name this section "Python API" in order to make it clearer what this section is actually about.

JOSS review issue

ThermoParser version

At the moment, there seems to be no direct way to access the package version from within Python, correct?

If would be nice if ThermoParser would follow the quasi-standard approach of providing the package version via the dunder tp.__version__ (typically returning a string)

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.