From 090edbee98ee2fca2002c05ac2a36c93507cd5d2 Mon Sep 17 00:00:00 2001 From: Kjetil Brakstad <64000017+kjbrak@users.noreply.github.com> Date: Mon, 26 Aug 2024 11:27:01 +0200 Subject: [PATCH] docs: update broken links and rename files (#573) Update links in README .md and CONTRIBUTING.md to point to the correct files. Rename files in contribute dir to snake_case and remove numbers from filenames. Remove some whitespace from file file contents. --- CONTRIBUTING.md | 2 +- README.md | 6 ++--- .../{01-documentation.md => documentation.md} | 6 ++--- .../{02-markdown.md => markdown.md} | 0 .../{01-get-started.md => get_started.md} | 10 ++++----- ...nal-commits.md => conventional_commits.md} | 0 .../contribute/guides/{01-git.md => git.md} | 22 +++++++++---------- 7 files changed, 23 insertions(+), 23 deletions(-) rename docs/docs/contribute/documentation-guide/{01-documentation.md => documentation.md} (92%) rename docs/docs/contribute/documentation-guide/{02-markdown.md => markdown.md} (100%) rename docs/docs/contribute/{01-get-started.md => get_started.md} (94%) rename docs/docs/contribute/guides/{02-conventional-commits.md => conventional_commits.md} (100%) rename docs/docs/contribute/guides/{01-git.md => git.md} (95%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fdf3f7ae5d..0a0b9b648a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,4 +15,4 @@ Feel free to create issues for bug reports or questions about the code. For ques There are a few things you need to know. -We wrote a [Contribution Guide](/contribute/get-started) to help you get started. +We wrote a [Contribution Guide](docs/docs/contribute/get_started.md) to help you get started. diff --git a/README.md b/README.md index a0daabed49..757a323f7e 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ eCalc™ is a software tool for calculation of energy demand and greenhouse gas --- ## Reference Links -* [**Documentation**](/about/) +* [**Documentation**](/docs/docs/about/) * [**Contribution**](CONTRIBUTING.md) * [**Security**](SECURITY.md) * [**Code of Conduct**](CODE_OF_CONDUCT.md) @@ -49,7 +49,7 @@ eCalc™ uses a bottom-up approach to give high-quality installation and portfol eCalc™ is both a Python library and has a command line interface (CLI) to use with eCalc YAML Models. We currently recommend using eCalc™ from the command line with eCalc YAML Models, since the Python API is about to change soon, but the YAML will be more or less stable and backwards compatible. -To get started, please refer to the [eCalc™ Docs - Getting Started](/about/getting_started/), +To get started, please refer to the [eCalc™ Docs - Getting Started](/docs/docs/about/getting_started/), or follow the quick guide below: ### Prerequisites @@ -99,7 +99,7 @@ and making a pull request. See [Contribution Document](CONTRIBUTING.md) on how to contribute. -See the [Developer Guide](/contribute/get-started) for details. +See the [Developer Guide](/docs/docs/contribute/get_started.md) for details. ## Examples Jupyter Notebook examples can be found in /examples. In order to run these examples, you need to install the optional diff --git a/docs/docs/contribute/documentation-guide/01-documentation.md b/docs/docs/contribute/documentation-guide/documentation.md similarity index 92% rename from docs/docs/contribute/documentation-guide/01-documentation.md rename to docs/docs/contribute/documentation-guide/documentation.md index 87377cf18a..d8646ee279 100644 --- a/docs/docs/contribute/documentation-guide/01-documentation.md +++ b/docs/docs/contribute/documentation-guide/documentation.md @@ -12,7 +12,7 @@ It is entirely possible to make changes by using your web browser alone. However changes, we recommend that you run the documentation locally with the following prerequisites: * *Linux or macOS*: For [Windows you can run Ubuntu or similar in WSL 2](https://docs.microsoft.com/en-us/windows/wsl/install-win10). -* *Git*: [Set up Git](../guides/01-git.md#setting-up-git) +* *Git*: [Set up Git](../guides/git.md#setting-up-git) * *Node*: Download from nodejs.org or use [nvm](https://github.com/nvm-sh/nvm) :::info @@ -22,7 +22,7 @@ This has some limitations such as missing navigation bar, and it does not previe ## Contributing -As a contributor you will have to use Git. Please find the [Git Documentation](../guides/01-git.md) for more details about git. +As a contributor you will have to use Git. Please find the [Git Documentation](../guides/git.md) for more details about git. ## How it works @@ -32,7 +32,7 @@ From Docusaurus own documentation: While Docusaurus is rich on features, we use it mostly to host markdown pages. The main bulk of the documentation is located in `documentation/docs`. This is where you as a collaborator are encouraged to make changes. -For a quick intro to Markdown, see our [Markdown section](02-markdown.md). +For a quick intro to Markdown, see our [Markdown section](markdown.md). ## Special features diff --git a/docs/docs/contribute/documentation-guide/02-markdown.md b/docs/docs/contribute/documentation-guide/markdown.md similarity index 100% rename from docs/docs/contribute/documentation-guide/02-markdown.md rename to docs/docs/contribute/documentation-guide/markdown.md diff --git a/docs/docs/contribute/01-get-started.md b/docs/docs/contribute/get_started.md similarity index 94% rename from docs/docs/contribute/01-get-started.md rename to docs/docs/contribute/get_started.md index a4957f4f50..7584714c2e 100644 --- a/docs/docs/contribute/01-get-started.md +++ b/docs/docs/contribute/get_started.md @@ -22,7 +22,7 @@ The threshold for contributing is low, and we appreciate any contribution great ::: ## Prerequisites -* See [Documentation guide](documentation-guide/01-documentation.md) for how to get started with contributions to this +* See [Documentation guide](documentation-guide/documentation.md) for how to get started with contributions to this documentation. ## How to contribute @@ -37,8 +37,8 @@ to explain the change without referring to an issue. ### Make a Pull Request To contribute to the project, you will have to make the change and create a Pull Request on GitHub. How you do this depends on your role. -1. Equinor internal contributors, you may open a [Pull Request directly](guides/git#pull-requests), -2. Independent contributors, you will [Fork the repository](guides/git#fork-the-repository). +1. Equinor internal contributors, you may open a [Pull Request directly](guides/git.md#pull-requests), +2. Independent contributors, you will [Fork the repository](guides/git.md#fork-the-repository). ### Get code review {#get-code-review} Once a Pull Request has been made, we will give you feedback and maybe suggest changes. @@ -53,7 +53,7 @@ Here you will find more information about the * Work on your own fork of the main repo * Use a separate branch for each issue you’re working on * Use conventional commit. See our [Git commit format](#git-commit-format) for details, - and our [Git guide](guides/01-git.md) for our full guide + and our [Git guide](guides/git.md) for our full guide * Please include [unit tests](https://en.wikipedia.org/wiki/Unit_testing) with all your code changes * We follow [Trunk Based Development](https://trunkbaseddevelopment.com/) style of working with short-lived feature branches. @@ -70,7 +70,7 @@ is the issue you're fixing. Therefore, an example would be `closes #42` would cl ## Git commit format Git commits are required to follow [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/). Please see -our [Conventional Commit Guide](guides/02-conventional-commits.md) for examples. +our [Conventional Commit Guide](guides/conventional_commits.md) for examples. ## Readability We use the [pre-commit hooks](https://pre-commit.com/) in order to ensure uniform formatting and to exclude potential code issues. diff --git a/docs/docs/contribute/guides/02-conventional-commits.md b/docs/docs/contribute/guides/conventional_commits.md similarity index 100% rename from docs/docs/contribute/guides/02-conventional-commits.md rename to docs/docs/contribute/guides/conventional_commits.md diff --git a/docs/docs/contribute/guides/01-git.md b/docs/docs/contribute/guides/git.md similarity index 95% rename from docs/docs/contribute/guides/01-git.md rename to docs/docs/contribute/guides/git.md index f01e68c92f..5c4487a53b 100644 --- a/docs/docs/contribute/guides/01-git.md +++ b/docs/docs/contribute/guides/git.md @@ -103,7 +103,7 @@ git add . ``` ### Commit changes -Commit any files you've added with git add, and also commit any files you've changed since then: +Commit any files you've added with git add, and also commit any files you've changed since then: ```shell git commit -m ": /- ``` -3. Add the changed files +3. Add the changed files ```shell git add ``` -4. Commit your changes using the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) formatting for the commit messages. +4. Commit your changes using the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) formatting for the commit messages. ```shell git commit -m ": " ``` @@ -152,7 +152,7 @@ Here's a quick guide: ### Fork the repository -For external developers, you will [contribute to the project through forking](https://docs.github.com/en/get-started/quickstart/contributing-to-projects). +For external developers, you will [contribute to the project through forking](https://docs.github.com/en/get-started/quickstart/contributing-to-projects). Here's a quick guide: @@ -165,17 +165,17 @@ Here's a quick guide: ```shell git remote add upstream git@github.com:equinor/template-fastapi-react.git ``` -4. Create a branch locally with a succinct but descriptive name and prefixed with change type. +4. Create a branch locally with a succinct but descriptive name and prefixed with change type. ```shell git checkout -b /- ``` -5. Make the changes in the created branch. +5. Make the changes in the created branch. 6. Add and run tests for your changes if needed (we only take pull requests with passing tests). -7. Add the changed files +7. Add the changed files ```shell git add ``` -8. Commit your changes using the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) formatting for the commit messages. +8. Commit your changes using the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) formatting for the commit messages. ```shell git commit -m ": " ``` @@ -188,8 +188,8 @@ Here's a quick guide: ```shell git push origin feature/my-new-feature ``` -11. Submit a [Pull Request from a fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork). Please provide us with some explanation of why you made the changes you made. For new features make sure to explain a standard use case to us. +11. Submit a [Pull Request from a fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests creating-a-pull-request-from-a-fork). Please provide us with some explanation of why you made the changes you made. For new features make sure to explain a standard use case to us. That's it... thank you for your contribution! -After your pull request is merged, you can safely delete your branch. +After your pull request is merged, you can safely delete your branch.