Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation to project #68

Merged
merged 9 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:
code:
- 'conda_anaconda_telemetry/**'
- 'tests/**'
- 'docs/**'
- '*.py'
- 'conda.recipe/**'
- '.github/workflows/tests.yml'
Expand Down Expand Up @@ -162,6 +163,33 @@ jobs:
--basetemp=${{ runner.temp }}
-n auto


build_docs:
needs: changes
if: github.event_name == 'schedule' || needs.changes.outputs.code == 'true'

runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.ref }}
clean: true
fetch-depth: 0

- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
with:
run-post: false # skip post cleanup
miniconda-version: latest
channels: defaults

- name: Install Dependencies
run: conda env update --name base --file docs/environment.yml

- name: Build Docs
run: conda run --name base make -C docs html

# required check
analyze:
needs: [tests]
Expand Down
39 changes: 18 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,29 @@
# conda-anaconda-telemetry
# Conda Anaconda Telemetry

Anaconda Telemetry for conda
Welcome to the Conda Anaconda Telemetry project! This project is a plugin that
submits data about conda's usage to Anaconda. This helps Anaconda learn more about
those using conda. This plugin is also an example of how others can leverage conda's
plugin system to begin collecting more information about their conda users too.

## Development
## Installation

To begin developing for this project, source the `develop.sh` script (macOS and Linux only).
Run the following command from the root of your project directory.
To begin using this plugin, install it in your base environment with the following command:

```bash
source develop.sh
```commandline
conda install --name base conda-anaconda-telemetry
```

This will create a new environment in the `./env` folder of your project and modifies
`CONDA_EXE` to point to an isolated version of conda within this environment.
## Disabling

To update this environment when new dependencies are added to `requirements.txt`, you
can run the same `source develop.sh` command as above.
To disable this plugin, you can either add the following to your `.condarc` file:

### Setting up OTEL collector and Elastic Search
```yaml
plugins:
anaconda_telemetry: false
```

This project comes with a `docker-compose.yaml` file which can be used to start
a locally running instance of ElasticSearch and an OTEL collector container that
will submit data to ElasticSearch. To initialize this, you first need to copy
the `env-template` file to the location `.env` with the following command:
Or remove it from your base environment:

```bash
cp env-template .env
```commandline
conda remove --name base conda-anaconda-telemetry
```

This `.env` file contains sensitive information such as passwords and encryption keys.
Please update these environment variables as needed.
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Binary file added docs/_static/Anaconda_Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading