Skip to content

Commit

Permalink
Merge pull request #289 from Morpho-lang/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
softmattertheory authored Jan 10, 2025
2 parents f489eb0 + ae40c55 commit 9fbe94d
Show file tree
Hide file tree
Showing 168 changed files with 1,791 additions and 10,861 deletions.
42 changes: 0 additions & 42 deletions .github/workflows/NoNanBoxing.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ dkms.conf
.DS_Store
.entitlements
.vscode/settings.json
.vscode/

test/FailedTests*.txt
*.png
Expand All @@ -72,3 +73,4 @@ test/vtk/tetrahedron.vtk
devguide/devguide.lyx~
build/*
build-xcode/*
*.valgrind
8 changes: 0 additions & 8 deletions .vscode/settings.json

This file was deleted.

10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@ if(MORPHO_GCSTRESSTEST)
target_compile_definitions(morpho PUBLIC _DEBUG_STRESSGARBAGECOLLECTOR)
endif()

# Set resources directory
if(MORPHO_RESOURCESDIR)
target_compile_definitions(morpho PUBLIC MORPHO_RESOURCESDIR=\"${MORPHO_RESOURCESDIR}\")
# Set help directory
if(MORPHO_HELP_BASEDIR)
target_compile_definitions(morpho PUBLIC MORPHO_HELP_BASEDIR=\"${MORPHO_HELP_BASEDIR}\")
endif()

if(MORPHO_MODULE_BASEDIR)
target_compile_definitions(morpho PUBLIC MORPHO_MODULE_BASEDIR=\"${MORPHO_MODULE_BASEDIR}\")
endif()

# Create source groups for IDE
Expand Down
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to Morpho

Thankyou for your interest in helping to improve Morpho. We welcome contributions from everyone. If you are unsure of anything, feel free to reach out via the Github, submit an issue or make a pull request.
Thankyou for your interest in helping to improve Morpho! We welcome contributions from everyone. If you are unsure of anything, feel free to reach out via the Github, submit an issue or make a pull request.

There are many ways you can contribute to Morpho:

Expand All @@ -12,15 +12,15 @@ There are many ways you can contribute to Morpho:

* If you use Morpho but are new to GitHub, or to contributing to Morpho, the issues labeled [`good first issue`](https://github.com/Morpho-lang/morpho/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) highlight easy-to-fix bugs that will get you started. [Here](https://gist.github.com/Chaser324/ce0505fbed06b947d962) is a guide that explains the best practices for making a pull request.

* Morpho is highly modular and modules providing new features are especially welcome. The [devguide](https://github.com/Morpho-lang/morpho-devguide/blob/main/devguide.pdf) explains how to package morpho code into an easily downloadable module.
* Morpho is highly modular and modules providing new features are especially welcome. The [devguide](https://github.com/Morpho-lang/morpho-devguide) explains how to package morpho code into an easily downloadable module. The [morphopm](https://github.com/Morpho-lang/morpho-morphopm) package manager can be used to download and install modules.

* Help with unit tests, additional documentation etc. are also great ways to contribute to the project.

All contributors are expected to follow the [Morpho Code of Conduct](https://github.com/Morpho-lang/morpho/blob/main/CODE_OF_CONDUCT.md).

For further guidance and pointers, a developer's guide gradually being assembled [devguide](https://github.com/Morpho-lang/morpho-devguide/blob/main/devguide.pdf). In the meantime, we encourage you to [join our Slack community](https://join.slack.com/t/morphoco/shared_invite/zt-1hiby4iqv-UhqKEeqZih0vSG3k4gEfXQ) or get in touch via email.
For further guidance and pointers, a developer's guide is gradually being assembled [devguide](https://github.com/Morpho-lang/morpho-devguide/blob/main/devguide.pdf). We also encourage you to [join our Slack community](https://join.slack.com/t/morphoco/shared_invite/zt-1hiby4iqv-UhqKEeqZih0vSG3k4gEfXQ) or get in touch via email.

## Unit-tests
## Unit tests

Morpho has an extensive set of unit-tests to make sure any new piece of code doesn't break essential functionality. Moreover, code within any pull requests to `dev` or `main` is automatically put through the test suite. While this will catch failing tests, if any, you can make sure all the tests are passing on your branch beforehand by running the test suite locally:

Expand All @@ -31,7 +31,7 @@ If you have fixed a new bug, chances are the existing unit-tests didn't capture

We highly welcome contributions to the testing suite. Try writing tests that don't overlap with the existing tests, and help us lock down any remaining bugs in Morpho's functionality.

### Formatting a unit-test
### Formatting a unit test

While a new unit-testing module is [in the works](https://github.com/Morpho-lang/morpho/pull/147), the current unit-test are executed in `python` by looking for the keyword `expect`. For instance, here is an example from the test `power.morpho` that tests the arithmetic power operator:

Expand Down
41 changes: 21 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,43 @@ The Morpho language. Morpho is a programmable environment for shape optimization
* **Familiar**. Morpho uses syntax similar to other C-family languages. The syntax fits on a postcard, so it's easy to learn.
* **Fast**. Morpho programs run as efficiently as other well-implemented dynamic languages like *wren* or *lua* (Morpho is often significantly faster than Python, for example). Morpho leverages numerical libraries like *BLAS*, *LAPACK* and *SUITESPARSE* to provide high performance.
* **Class-based**. Morpho is highly object-oriented, which simplifies coding and enables reusability.
* **Extendable**. Functionality is easy to add via packages, both in Morpho and in C or other compiled languages.
* **Extendable**. Functionality is easy to add via packages, both in Morpho and in C or other compiled languages. Packages can be downloaded, installed and distributed via the [morphopm](https://github.com/Morpho-lang/morpho-morphopm) package manager.

*Morpho is based upon work supported by the National Science Foundation under grants DMR-1654283 and OAC-2003820.*

In academic publications, please cite morpho as:

* Joshi, C. et al. "A programmable environment for shape optimization and shapeshifting problems", Nat Comput Sci (2024) [doi.org/10.1038/s43588-024-00749-7](https://doi.org/10.1038/s43588-024-00749-7).

A preprint of the paper is also available on the [arXiv preprint server](https://arxiv.org/abs/2208.07859).

## Learn and use morpho

Documentation is available on [readthedocs](https://morpho-lang.readthedocs.io/en/latest/), an extensive [user manual](https://github.com/Morpho-lang/morpho-manual/blob/main/manual.pdf) and a [developer guide](https://github.com/Morpho-lang/morpho-devguide/blob/main/devguide.pdf). A [Slack community](https://join.slack.com/t/morphoco/shared_invite/zt-1o6azavwl-XMtjjFwxW~P6C8rc~YbBlA) is also available for people interested in using morpho and seeking support.

**New!** We now have a sequence of tutorial videos on our [Youtube channel](https://www.youtube.com/@Morpho-lang) to help you learn Morpho:
We now have a sequence of tutorial videos on our [Youtube channel](https://www.youtube.com/@Morpho-lang) to help you learn Morpho:

* An [introduction to the Morpho language](https://youtu.be/eVPGWpNDeq4)
* Introduction to [shape optimization with Morpho](https://youtu.be/odCkR0PDKa0)

In academic publications, please cite morpho as:

*Joshi, C. et al., "Morpho -- A programmable environment for shape optimization and shapeshifting problems", [arXiv:2208.07859](https://arxiv.org/abs/2208.07859) (2022)*

We expect to update this once the paper is published.

Participation in the morpho community, both as users and developers, is bound by our [Code of Conduct](CODE_OF_CONDUCT.md).

## Contributing
## Community and Contributions

Morpho is under active development and we welcome contributions! Please see the [Contributor's guide](CONTRIBUTING.md) for more information about how you can get involved in the morpho project. For those interested in extending morpho or working with the source a [Developer guide](https://github.com/Morpho-lang/morpho-devguide) is also provided in a separate repository.

We provide a [Roadmap](https://github.com/Morpho-lang/morpho/wiki/Road-Map) for future development plans that might give you ideas for how you could contribute.

We also welcome bug reports and suggestions: Please feel free to use the *Issues* feature on our github repository to bring these to the developers' attention.

Participation in the morpho community, both as users and developers, is bound by our [Code of Conduct](CODE_OF_CONDUCT.md).

## Installation

Code in this repository builds morpho as a shared library. Morpho also requires two subsidiary programs, a [terminal app](https://github.com/Morpho-lang/morpho-cli), and a [viewer application](https://github.com/Morpho-lang/morpho-morphoview).

For this release, morpho can be installed on all supported platforms using the homebrew package manager. Alternatively, the program can be installed from source as described below. We are continuously working on improving morpho installation, and hope to provide additional mechanisms for installation in upcoming releases.

Morpho packages to extend the program's capability can be downloaded, installed and distributed via the associated [morphopm](https://github.com/Morpho-lang/morpho-morphopm) package manager.

### Installation with homebrew

The simplest way to install morpho is through the [homebrew package manager](https://brew.sh). To do so:
Expand All @@ -54,23 +56,26 @@ The simplest way to install morpho is through the [homebrew package manager](htt
```
brew update
brew tap morpho-lang/morpho
brew install morpho morpho-cli morpho-morphoview
brew install morpho morpho-cli morpho-morphoview morpho-morphopm
```

If you need to uninstall morpho, simply open a terminal and type `brew uninstall morpho-cli morpho-morphoview morpho`. It's very important to uninstall the homebrew morpho in this way before attempting to install from source as below.
If you need to uninstall morpho, simply open a terminal and type `brew uninstall morpho-morphopm morpho-cli morpho-morphoview morpho`. It's very important to uninstall the homebrew morpho in this way before attempting to install from source as below.

### Install from source

The second way to install morpho is by compiling the source code directly. Morpho now leverages the [Cmake](https://cmake.org) build system, which enables platform independent builds. Windows users must first install Windows Subsystem for Linux; some instructions to do so are found below.

#### Gather dependencies

You can use any appropriate package manager to install morpho's dependencies via the terminal. Using homebrew (preferred on macOS):
You can use any appropriate package manager to install morpho's dependencies via the terminal.

Using homebrew (preferred on macOS):

```
brew update
brew install cmake glfw suite-sparse freetype povray libgrapheme
```

Using apt (preferred on Ubuntu):

```
Expand Down Expand Up @@ -178,10 +183,6 @@ to navigate back out of the morpho-morphoview folder.

Windows support is provided through Windows Subsystem for Linux (WSL), which is an environment that enables windows to run linux applications. We highly recommend using WSL2, which is the most recent version and provides better support for GUI applications; some instructions for WSL1 are provided [in the manual](https://github.com/Morpho-lang/morpho-manual/blob/main/manual.pdf). Detailed information on running GUI applications in WSL2 is found on the [Microsoft WSL support page](https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps).

1. Begin by installing the [Ubuntu App](https://ubuntu.com/desktop/wsl) from the Microsoft store.

2. Once the Ubuntu terminal is working in Windows, you can install morpho either through homebrew or by building from source.
1. Begin by installing the [Ubuntu App](https://ubuntu.com/desktop/wsl) from the Microsoft store.

---
### Other Tests
[![No NAN Boxing](https://github.com/Morpho-lang/morpho/actions/workflows/nonanboxing.yml/badge.svg)](https://github.com/Morpho-lang/morpho/actions/workflows/nonanboxing.yml)
2. Once the Ubuntu terminal is working in Windows, you can install morpho either through homebrew or by building from source.
136 changes: 0 additions & 136 deletions benchmark/Adhesion/adhesion.m3

This file was deleted.

34 changes: 0 additions & 34 deletions benchmark/Adhesion/adhesion.morpho

This file was deleted.

Loading

0 comments on commit 9fbe94d

Please sign in to comment.